From f9935bba7998e8f6e6483a90124d86e0e16c2581 Mon Sep 17 00:00:00 2001 From: Adrian Thurston Date: Sat, 21 Jul 2012 09:36:25 -0400 Subject: fixed order of replacement element productions Had a code_expr ahead of a literal element in "stuff". Since code_expr allows a string we were getting the wrong tree. Note that accum has code_expr first because we want the strings. Going to need to sort this out! --- src/lmparse.kl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lmparse.kl b/src/lmparse.kl index 640c1e57..06db792c 100644 --- a/src/lmparse.kl +++ b/src/lmparse.kl @@ -725,13 +725,14 @@ repl_el: region_qual TK_Literal replItemList->append( replItem ); }; +repl_el: '"' lit_repl_el_list '"'; + repl_el: code_expr final { ReplItem *replItem = ReplItem::cons( $1->expr->loc, ReplItem::ExprType, $1->expr ); replItemList->append( replItem ); }; -repl_el: '"' lit_repl_el_list '"'; # # Accumulate List -- cgit v1.2.1