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

 
 

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

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

Submitted by:  Per Cederberg <cederberg>
Submitted on:  Wed 16 Jul 2003 09:49:42 AM UTC  
 
Severity: 2 - NormalItem Group: Future Improvement
Status: NoneAssigned to: None
Open/Closed: Open

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>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

No Changes Have Been Made to This Item

Back to the top


Powered by Savane 3.1-cleanup