I'm new to ANTLR, and I'm having trouble designing a lexicon and
grammar for what I think is really simple.  The DSL I'm dealing with
is mostly line-oriented, where the first character of a line indicates
what kind of thing the line is.  Example:

C This is a test.
E 1 2 3
C Previous line (# 2) was an "edge" line.

Lines starting with 'C' are comment lines, in which all characters
after the 'C' until the end-of-line are comment text that I want the
parser to report.

If I was using standard regular expressions to represent my tokens, I
would define a "comment" token something like this:
  ^C.*$

That is, <beginning of line> <the letter C> <zero or more
non-end-of-line characters> <end-of-line>

My problem is, to my knowledge ANTLR won't let me define tokens that
match on the beginning of a line ('^').

Any suggestions?

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to