bugGrammatica - Bugs: bug #4322, Parser: Use tree representation of...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #4322: Parser: Use tree representation of grammar production alternatives

Submitter:  Per Cederberg <cederberg>
Submitted:  Wed 16 Jul 2003 09:49:42 AM UTC
   
 
Severity:  2 - Normal Priority:  2
Item Group:  Future Improvement Status:  None
Assigned to:  None Open/Closed:  Open

Discussion

Wed 16 Jul 2003 09:49:42 AM UTC, original submission:  

Currently a grammar production consists of a list of production alternatives. Each alternative consists of a list of elements to be parsed. This causes problems, however, as the correct alternative must be chosen directly when entering a production.

The current solution involves calculating the look-ahead tokens for all alternatives. This may cause inherent ambiguities to be detected, although the ambiguity would be possible to resolve in a hand-written parser:

A = B+
  | B+ ... ;

A better representation would be a tree structure, allowing two alternatives to share a common left-hand part without requiring look-ahead tokens. The tree representation of the productions is probably only relevant for LL parsers.

Per Cederberg <cederberg>
Group administrator

 

Attached Files

This item currently has no attached files.

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

 

Votes

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.

 

History

No changes have been made to this item

Back to the top

Powered by Savane 3.16.
Corresponding source code