[antlr-interest] Quoted Strings in ANTLR 3.0.1 and 3.1.1

Fromm, Stefan Fromm at dresden-informatik.de
Thu Oct 23 10:51:48 PDT 2008


Hello Gavin,

EOF at the end of my top-level rule eliminated the error with accepting
''a''. Thank you for that tip. 

> QUOTED_STRING
>    : '\''
>      ( ('\'\'') => '\'\''
>      | ~'\''
>      )*
>      '\''
>    ;

did not work either. But now I'm not able to parse correctly:

'''a'
'''a'''
'''a''b'''

'a'''         
'a''b'
'a''b''c'

with ANTLR 3.1.1. 

''
''''
''''''
'''a''b'

are parsed correctly.

ANTLR 3.0.1 is working now with all test cases. I'll stick to that older
version for now. But still I'm curious what has changed from 3.0 to 3.1
that suddenly it stops working.

Best regards
Stefan



More information about the antlr-interest mailing list