Here's my (grossly incomplete, but better than nothing) progress so far:
[BEGIN]
grammar name_reg;
options {
language=Java;
}
name_reg : ( options {greedy=false;} : . )* a_field b_field? c_field?
v_field? e_field? EOF;
a_field : STAR_A '\\\\' name '\\\\ ' dateblock? description '('
sources ')' .* ;
name : ( options {greedy=false;} : . )* ;
dateblock : '(' dates '). ';
dates : 'b. ' NUM NUM NUM NUM '/' NUM NUM;
description : ~'(' ( options {greedy=false;} : . )* ;
sources : ( options {greedy=false;} : . )* ;
b_field : STAR_B .*;
c_field : STAR_C .*;
v_field : STAR_V .*;
e_field : STAR_E .*;
STAR_A : '*a ';
STAR_B : '*b ';
STAR_C : '*c ';
STAR_V : '*v ';
STAR_E : '*e ';
PUNCTUATION : ' '|'.'|','|':'|'!'|'\n'|'('|')'|'-';
ALPHA : 'a'..'z'|'A'..'Z';
NUM : '0'..'9';
[END]
This is generating an error:
name_regParser.java:510: exception org.antlr.runtime.RecognitionException is
never thrown in body of corresponding try statement
catch (RecognitionException re) {
^
1 error
I'd be grateful for help troubleshooting this error, so that I can continue
to work on the grammar above.
Many thanks,
Sam
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address