[antlr-interest] Dot Grammar conversion from antlr v2 to v3 - regd.

Gavin Lambert antlr at mirality.co.nz
Tue Jun 10 13:47:07 PDT 2008


At 02:20 11/06/2008, ASHOK REDDY wrote:
>ashok at ashok-laptop:~/parser/v2v3-0.2/v2v3$ java v3me -combined 
>./../../DotLexer.g

I'm not familiar with the migration program, but should you be 
passing "-combined" for a lexer-only grammar?

>line 52:13 mismatched character 'r' expecting '''

Best guess, it's the charVocabulary line.  It might be trying to 
parse that even though it's in a comment, and ANTLR 3 at least 
doesn't support that kind of escape (as far as I recall).  Try 
deleting that line entirely and see if that helps.

>LITERALS
>     :  (  (ph> GRAPH_LITERAL {$setType(GRAPH_LITERAL);}
>         | (raph> DIGRAPH_LITERAL {$setType(DIGRAPH_LITERAL);}
>         | (ict> STRICT_LITERAL {$setType(STRICT_LITERAL);}
>         | (e> NODE_LITERAL {$setType(NODE_LITERAL);}
>         | (e> EDGE_LITERAL {$setType(EDGE_LITERAL);}
>         | () => EDGEOP_LITERAL {$setType(EDGEOP_LITERAL);}
>         | () => EDGEOP_LITERAL {$setType(EDGEOP_LITERAL);}
>         | ('{') => O_BRACKET {$setType(O_BRACKET);}
>         | ('}') => C_BRACKET {$setType(C_BRACKET);}
>         | ('[') => O_SQR_BRACKET {$setType(O_SQR_BRACKET);}
>         | (']') => C_SQR_BRACKET {$setType(C_SQR_BRACKET);}
>         | (';') => SEMI_COLON {$setType(SEMI_COLON);}
>         | ('=') => EQUAL {$setType(EQUAL);}
>         | (',') => COMMA {$setType(COMMA);}
>         | (':') => COLON {$setType(COLON);}
>         | ID {$setType(ID);})
>     ;

Hopefully it's just the email munching those rules, because what's 
quoted above isn't valid predicate syntax.



More information about the antlr-interest mailing list