home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,298 of 2,753   
   Keenlearner to All   
   Infinite loop of aritmetic expression   
   10 Apr 08 02:06:14   
   
   From: yingun@gmail.com   
      
   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.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca