I have a lexing/parsing problem:
The following input data is given: 12345
Each token consists of one digit.
The input stream must be parsed based on the value of the 'b' token in
that way, that the value specifies the number of 'c' tokens which
follow the 'b' token.
Rule: a, b, c{b}, d
The input stream should be tokenized and parsed in the following
way:
a = 1
b = 2
c = 3
c = 4
d = 5
Is there any way to handle this problem with Antlr? I can not find
any way to use the value of a token in the iteration clause of another
token.
Regards,
Sascha