Talk About Network



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 > Compilers > Infinite loop o...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 2385 of 2421
Post > Topic >>

Infinite loop of aritmetic expression

by Keenlearner <yingun@[EMAIL PROTECTED] > Apr 10, 2008 at 02:06 AM

I have my parser generator that will generate the Earley Chart parser,
I got not idea when I gave this input it will go infinite loop, my
processor working at maximum speed and then hang. Is my grammar
correct ?

Input : 6 ^ 2 + 1 - 4 * 3 / 2

art  -> art PLUS term
art  -> art MINUS term
art  -> term
term -> term TIMES factor
term -> term DEVIDE factor
term -> factor
factor -> factor EXPONENT primary
factor -> primary
primary -> LPAREN art RPAREN
primary -> NUMBER


^ : EXPONENT
+ : PLUS
- : MINUS
* : TIMES
/ : DEVIDE
[0-9]+ : NUMBER

Any idea why ? Thanks.




 1 Posts in Topic:
Infinite loop of aritmetic expression
Keenlearner <yingun@[E  2008-04-10 02:06:14 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Wed May 14 3:33:14 CDT 2008.