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:45:04 -0800 |
commit | 1acfc5fd32f42264612d109c19be2268968c27d4 (patch) | |
tree | 30d495e06c063882723488ed92eecde546fbafda | |
parent | eae4990af17bf998731bf30c9d9f7f53d14bbbaf (diff) | |
download | vyatta-cfg-1acfc5fd32f42264612d109c19be2268968c27d4.tar.gz vyatta-cfg-1acfc5fd32f42264612d109c19be2268968c27d4.zip |
fix for bug 6791
* work around comment syntax ambiguity by ignoring comments not associated with any nodes.
-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 aeecaf3..535ec3d 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; } ; |