[antlr-interest] some questions
Mohammad Sadnan Al-Manir
sadnanalmanir at yahoo.com
Sun Jun 8 01:03:25 PDT 2008
Dear respected everyone
As I am new to ANTLR, probably this questions have been asked before. But it would be great if someone could answer the following basic questions.
1) i am having problem when i want to use backslash and single quote as tokens
one example is like, the parser cannot handle this , even if i use backslash directly, it does not work either.
tokens{BKSLASH = '\' ;
SGQUOTE = ''' ;}
IRI_REF : '<' (('^' | SGQUOTE | DBQUOTE | BKSLASH ) ~('\u0000'..'\u0020'))* '>' ;
is there any way to solve the problem?
2) another problem with escape character
the suggested grammar is like
'\' [tbnrf\"']
which i have written in antlr as
ECHAR : '\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\''| '\');
is this right? or i have to use double backslash instead of single?
3) The third question is , if i want to convert my parser result into prolog program (its w3c's RIF-BLD to prolog), where can i start? can i use java here? if yes, is there any helping guide for this? If not, what other ways are there?
best regards...
al-manir
VIENNA, AUSTRIA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080608/f4b881df/attachment.html
More information about the antlr-interest
mailing list