diff options
author | Jon Loeliger <jdl@freescale.com> | 2007-10-22 16:09:56 -0500 |
---|---|---|
committer | Jon Loeliger <jdl@freescale.com> | 2007-10-25 11:13:29 -0500 |
commit | 7b3fb789d2cd5fed818f439d0c7aed44b9860fab (patch) | |
tree | 34096341311b428a243bb75d074a1cb397cbc922 /dtc-parser.y | |
parent | 3bef796b449320cefb8e52838ca90163df698722 (diff) | |
download | dtc-7b3fb789d2cd5fed818f439d0c7aed44b9860fab.tar.gz |
DTC: Remove the need for the GLR Parser.
Previously, there were a few shift/reduce and reduce/reduce
errors in the grammar that were being handled by the not-so-popular
GLR Parser technique.
Flip a right-recursive stack-abusing rule into a left-recursive
stack-friendly rule and clear up three messes in one shot: No more
conflicts, no need for the GLR parser, and friendlier stackness.
Compensate by reversing the property list on the node.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Diffstat (limited to 'dtc-parser.y')
-rw-r--r-- | dtc-parser.y | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/dtc-parser.y b/dtc-parser.y index 33cf540..61ed250 100644 --- a/dtc-parser.y +++ b/dtc-parser.y @@ -18,7 +18,6 @@ * USA */ -%glr-parser %locations %{ @@ -126,9 +125,9 @@ proplist: { $$ = NULL; } - | propdef proplist + | proplist propdef { - $$ = chain_property($1, $2); + $$ = chain_property($2, $1); } ; |