Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compiler Tools Pccts > Lexing / Parsng...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 89 of 133
Post > Topic >>

Lexing / Parsng problem

by ziemann@[EMAIL PROTECTED] (Ziemann) Feb 4, 2005 at 08:05 AM

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
 




 1 Posts in Topic:
Lexing / Parsng problem
ziemann@[EMAIL PROTECTED]  2005-02-04 08:05:08 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 19:05:23 CDT 2008.