[antlr-interest] Overloaded Lexemes!
John D. Mitchell
johnm-antlr at non.net
Wed Apr 28 09:12:30 PDT 2004
>>>>> "steve" == steve taplin <steve_taplin at yahoo.co.uk> writes:
[...]
> I am attempting to parse a computer language that contains comments (that
> may contain any characters). They are of the form:
> COMMENT TEXT(jasdfjalk;fjkl;%$£$%lldf'slf)
> COMMENT TEXT(jas...dfjalk;fjkl;%$£$%lldf'slfsd][}{}*&fdsadsvdf#'''""")
> ...
Is the comment start delimiter literally the characters "COMMENT TEXT"
followed by a left-parenthesis or is it the characters "COMMENT" followed
by another set of chacters (that your are refering to as TEXT) followed by
a left-parenthesis or something else?
Is whitespace allowed inside the comment? Anywhere, nowhere, or just
inside the parentheses?
Is the end delimiter exactly a right-parenthesis immediately followed by a
newline sequence or can there be other whitespace in-between?
In addition, must comments be contained completely on a single line or can
they span multiple lines? If there must be on a single line, is there some
reason that you need to care about the internal structure of the comment?
Did you make sure that you set a proper charVocab range?
Take care,
John
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list