[antlr-interest] (newbie) mismatched error

ali azimi aliaazimi at yahoo.com
Mon Jul 16 12:22:15 PDT 2007


Hi,
   
  Could you please tell me what I am doing wrong that the system emits the following error messages when my test file tries to recognise the input:  system s; endsystem;
   
  line 1:7 mismatched character 's' expecting 't'
  line 1:10 no viable alternative at input 'endsystem'
  
  The grammar is as following:
   
  textualSystemDefinition 
              :packageReferenceClause*('system' systemName end entityInSystem* 'endsystem'(systemName)?end->^(PACKREF packageReferenceClause* 'system' systemName end entityInSystem+ 'endsystem'systemName?end)
   
   
                                                        |typeBasedSystemDefinition->^(PACKREF packageReferenceClause* typeBasedSystemDefinition)
                                        )
              ;
   
  end       : ';' 
              ;
   
  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'+
   
  Thank you very much.
   
  Best Regards,
   
  Al

       
---------------------------------
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green Center.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070716/92265985/attachment.html 


More information about the antlr-interest mailing list