[antlr-interest] issues with ANTLRWorks
Arun Ramakrishnan
sinchronized.arun at gmail.com
Mon Oct 29 11:49:53 PDT 2012
I was going through this
tutorial<http://bkiers.blogspot.com/2011/03/2-introduction-to-antlr.html>(
the csv lexer ) and I ran into some problems with the interpreter in
Works. It seems to be having issues with intputs that have quotes.
For Example.
************* Combined Grammar ***********
prog : ( csvline LineBreak)* csvline LineBreak? EOF;
csvline : value ( Comma value )* ;
value : SimpleValue | QuotedValue;
Comma : ',';
LineBreak : '\r'? '\n' | '\r';
SimpleValue : ~(',' | '\r' | '\n' | '"')+ ;
QuotedValue : '"' ( '""' | ~'"' )* '"';
***************************************************
********* Input ***********
"hi","there"
****************************
thanks
Arun
ps:
ANTLRWorks 1.4.3
ANTLR 3.4
OSX 10.8 ( mountain lion )
More information about the antlr-interest
mailing list