[antlr-interest] (newbie) mismatched error
ali azimi
aliaazimi at yahoo.com
Mon Jul 16 14:00:59 PDT 2007
Hi,
I apologise for the inconsistencies in the grammar I posted earlier. Here is the more correct one.
For the input:
system; endsystem;
I get the following error message: What seems to be wrong? What is set null?
line 1:0 mismatched input 'system' expecting set null
the grammar is as following:
textualSystemDefinition
:packageReferenceClause* 'system' systemName? end 'endsystem' (systemName)? end-> ^(PACKREF packageReferenceClause* 'system' systemName end 'endsystem' systemName? end)
;
packageReferenceClause:
;
systemName:
name
;
end :('comment' characterstring)? ';' ->^(';' ^(COM 'comment' characterstring)? )
;
name :word('_'word)* ->^(word ^(WORD '_'word)*)
;
word :(alphaNumeric|'.')*alphaNumeric(alphaNumeric|'.')*
;
alphanumeric
:Uppercase|National|Lowercase|Decimaldigit
;
Decimaldigit
:'0'..'9'
;
National
:'#'|'@'|'"'|'$'|'['|']'|'{'|'}'|'^'|'~'
;
Lowercase
:'a'..'z'
;
Uppercase
:'A'..'Z'
;
Many thanks,
Al
---------------------------------
Moody friends. Drama queens. Your life? Nope! - their life, your story.
Play Sims Stories at Yahoo! Games.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070716/13f97484/attachment-0001.html
More information about the antlr-interest
mailing list