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

2002Re: [jasspa] java indent and highligting

Expand Messages
  • Bryan Schofield
    Oct 9, 2006
    • 0 Attachment
      I see I missed the official release... but the java indentation needs
      a little something to fix handling of Strings

      indent .indent.java e "\"" "\"" "\\"
      indent .indent.java e "\'" "\'" "\\"



      On 10/6/06, jon@... <jon@...> wrote:
      > > 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.
      >
      >
      >
      > __________________________________________________________________________
      >
      > This is an unmoderated list. JASSPA is not responsible for the content of
      > any material posted to this list.
      >
      > To unsubscribe, send a mail message to
      >
      > mailto:jasspa-unsubscribe@yahoogroups.com
      >
      > or visit http://groups.yahoo.com/group/jasspa and
      > modify your account settings manually.
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
    • Show all 29 messages in this topic