From 1acfc5fd32f42264612d109c19be2268968c27d4 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Wed, 9 Feb 2011 09:45:04 -0800 Subject: fix for bug 6791 * work around comment syntax ambiguity by ignoring comments not associated with any nodes. --- src/cparse/cparse.ypp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/cparse/cparse.ypp') 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; } ; -- cgit v1.2.3