diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2011-02-09 09:45:04 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2011-02-09 09:46:51 -0800 |
commit | e6d27783dbb3b8c11051e27e36dbe0727545420a (patch) | |
tree | d1c747e4980df9253b78f73d5c20056df2d1a102 /src | |
parent | de2a8cea722effad540c837cc1e24bb9ca168cc3 (diff) | |
download | vyatta-cfg-e6d27783dbb3b8c11051e27e36dbe0727545420a.tar.gz vyatta-cfg-e6d27783dbb3b8c11051e27e36dbe0727545420a.zip |
fix for bug 6791
* work around comment syntax ambiguity by ignoring comments not associated with any nodes.
(cherry picked from commit 1acfc5fd32f42264612d109c19be2268968c27d4)
Diffstat (limited to 'src')
-rw-r--r-- | src/cparse/cparse.ypp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cparse/cparse.ypp b/src/cparse/cparse.ypp index b1958e9..e4fb452 100644 --- a/src/cparse/cparse.ypp +++ b/src/cparse/cparse.ypp @@ -151,7 +151,7 @@ tree: node { add_node(); } LEFTB { go_down(); - } forest RIGHTB { + } forest comment RIGHTB { go_up(); } ; @@ -169,10 +169,10 @@ nodec: NODE { nname = $1.str; ndeact = $1.deactivated; } - | COMMENT NODE { + | COMMENT comment NODE { ncomment = $1.str; - nname = $2.str; - ndeact = $2.deactivated; + nname = $3.str; + ndeact = $3.deactivated; } ; |