Loading ...
Sorry, an error occurred while loading the content.

2000Re: [jasspa] java indent and highligting

Expand Messages
  • jon@jasspa.com
    Oct 6, 2006
    • 0 Attachment
      > unfortunately, the indent syntax isn't powerful enough to describe the
      > situtations needed.
      >
      > For example...
      >
      > if (true)
      > continuedStatement();
      >
      > if (true) {
      > indentedStatement();
      > }
      >
      > if (true)
      > {
      > indentedStatement();
      > }
      >
      > I do not know how to tell indent that the next line is a continuation,
      > unless it is a "{". I can write indent rules to handle the first 2 or
      > the last 2 but not all 3 at the same time.
      >
      >
      > indent .indent.java c "=\\s*$" t
      >
      > handles:
      >
      > private static final Logger LOG =
      > Logger.getLogger(PeakHourReportRunner.class);
      >

      Hi Bryan,

      We are aware of the short comings of the indentation. We have yet to come
      up with a better way of describing the indentation in terms of its
      grammer. At the moment we seem to do reasonably well with very little
      knowledge of the language in the template. All of the items that you have
      raised above require a little more information about the syntax in order
      to make them work properly. This is actually why C is burnt in because it
      is easier to handle it like this than coming up with all of the correct
      rules that are programmable.

      We have considered how we might express this, but so far have not come up
      with a sufficiently good way of minimally and generically describing the
      syntax of the target language for indentation.

      If anybody has any thoughts on how we can do this I would like to hear
      them because it is not trivial.

      Anybody looking for a Comp. Sci. project at University????

      Regards
      Jon.
    • Show all 29 messages in this topic