bugPLY (Python Lex-Yacc) - Bugs: bug #5240, s/r problems with empty productions

 
 

bug #5240: s/r problems with empty productions

Submitter:  Invalid User ID <#23039>
Submitted:  Fri 12 Sep 2003 08:11:05 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 12 Sep 2003 08:11:05 AM UTC, original submission:  

I'm having problems with empty productions. I get shift/reduce conflicts if I use specified empty-production (rule empty:), but those conflits go away if I don't use empty rule.
Example:
"""nt : t
      |""" # works ok

"""nt : t
      | empty""" # in certain situations, gives errors

I have attached file which has better example. It has one s/r conflict - remove the two empty productions and the problem goes away.

I have only vague understanding how SLR(1) parsing works so can't really debug this myself.


Invalid User ID <#23039>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

No changes have been made to this item

Back to the top

Powered by Savane 3.13-caa5.
Corresponding source code