Parsing ambiguous grammar
First Claim
Patent Images
1. A method of handling ambiguous grammar comprising:
- extending a Left Right (LR) parser to permit non-determinism in a state machine containing a plurality of states, the state machine permitting more than one successor state in any given state with any given top stack symbol; and
inserting an epsilon representing an empty transition used in a replacement of a combination of symbols for collapsing common rules when a right-hand side of a grammar rule recurses into a non-terminal.
4 Assignments
0 Petitions
Accused Products
Abstract
A method of parsing ambiguous grammar includes pre-compiling the grammar into a binary format, parsing a query, outputting a graph by combining the parsed query and the binary format of the grammar and outputting a frame representation of potential parses in the graph.
135 Citations
12 Claims
-
1. A method of handling ambiguous grammar comprising:
-
extending a Left Right (LR) parser to permit non-determinism in a state machine containing a plurality of states, the state machine permitting more than one successor state in any given state with any given top stack symbol; and
inserting an epsilon representing an empty transition used in a replacement of a combination of symbols for collapsing common rules when a right-hand side of a grammar rule recurses into a non-terminal. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
edges corresponding to grammar rules; and
a given path through the graph structure representing a sequential application of a series of grammar rules.
-
-
12. The method of claim 11 further comprising:
-
converting the graph structure into a series of output directives; and
generating frames from the output directives.
-
Specification