From bb585fef2cf88eeac08ee6f77de1f0ea8130b396 Mon Sep 17 00:00:00 2001 From: hallgren Date: Thu, 29 Sep 2011 15:19:03 +0000 Subject: Example-based grammar writing: fix problems caused by the use of exprToAPI The editor needs to keep track of both the raw term and the nice term returned by exprToAPI. (Manually constructed linearization rules will now have the raw term and can not be tested.) Also replace metavariables in generalized terms with the apropriate parameter from the linearization rule. Also fix communication problems caused by inconsistent use of show/read vs showExpr/readExpr. --- src/editor/simple/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/editor/simple/editor.js') diff --git a/src/editor/simple/editor.js b/src/editor/simple/editor.js index 1a3dabf92..a2ddc80b3 100644 --- a/src/editor/simple/editor.js +++ b/src/editor/simple/editor.js @@ -790,7 +790,7 @@ function draw_lins(g,ci) { if(!msg) { if(f.template) conc.lins.push({fun:f.fun,args:f.args,lin:s}); - else f.lin=s; + else { f.lin=s; f.eb_lin=null; } reload_grammar(g); } cont(msg); -- cgit v1.2.3