Hello Sergey as LOWALPHA is declared as a "fragment" rule, it would only be included into other lexer rules and is not used to define and create a lexer token. Remove the "fragment' keyword and I guess it should work...
Regards Thomas ________________________________________ Von: [email protected] [[email protected]] im Auftrag von Sergei Smolov [[email protected]] Gesendet: Donnerstag, 22. April 2010 14:04 An: [email protected] Betreff: [antlr-interest] required (...)+ loop did not match anything at input '<EOF>' Hello, List! I try to develop a lexer\parser for SIP portocol grammar. But now I have the following error after an attempt to parse "INVITE sip:ssedai" string: line 1:12 mismatched character 's' expecting 'i' line 1:13 no viable alternative at character 'e' line 1:14 no viable alternative at character 'd' line 1:15 no viable alternative at character 'a' line 1:16 no viable alternative at character 'i' line 0:-1 required (...)+ loop did not match anything at input '<EOF>' Here is my grammar: ### grammar beginning ### grammar testGrammar; options { language = Java; backtrack = true; output = AST; } request : request_line EOF; request_line : method SP request_uri; method : Invite; Invite : 'INVITE'; SIP_BEGIN : 'sip:'; SP : ' '; request_uri : sip_url; sip_url : SIP_BEGIN user; user : (LOWALPHA+) -> LOWALPHA+; fragment LOWALPHA : 'a'..'z'; #### grammar end ##### What I am doing wrong? Thanks in advance. -- Sergey Smolov List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address 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.
