[antlr-interest] NoViableAltException on a very simple grammar fragment?
Vadim Tropashko
vadimtro at yahoo.com
Wed Jan 31 13:40:51 PST 2007
Sorry for the today's noise, no more setup issues --
grammar question.
I have the following grammar fragment:
block_stmt:
d_o_tDECLARE__decl_partd_o_t
'BEGIN'
seq_of_stmts
d_o_tEXC__ehd_o_td_o_tehd_o_td_o_td_o_t
'END' d_o_tsim_nd_o_t ';'
;
d_o_tDECLARE__decl_partd_o_t:
|
'DECLARE'
decl_part
;
which I'm expecting to have no difficulties to
recognize
begin
NULL;
end;
And the debugging trace indicates that there is some
problem:
0 Commence
1 Enter rule block_stmt
2 Location (1409,1)
3 Enter alt 1
4 Location (1410,3)
5 Enter rule ph1psh_
6 Location (436,1)
7 Enter alt 1
8 Location (438,1)
9 Exit rule ph1psh_
10 Location (1411,10)
11 Enter rule d_o_tDECLARE__decl_partd_o_t
12 Location (1418,1)
13 Enter decision 114 114
14 LT 1 (begin) 114
15 LT 1 (begin) 114
16 LT 1 (begin) 114
17 Recognition exception
NoViableAltException(0!=[null])
____________________________________________________________________________________
Have a burning question?
Go to www.Answers.yahoo.com and get answers from real people who know.
More information about the antlr-interest
mailing list