From 9adbc4df1aaf1e19dee67341918693562c69b3a2 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Sat, 1 Aug 2015 00:52:11 +0200 Subject: [PATCH] Fix parser example in tutorial. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Thanks to Jean-Michaël Celerier for pointing this out. --- doc/tutorial/ginac.texi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/tutorial/ginac.texi b/doc/tutorial/ginac.texi index 1021a32a..3db3518e 100644 --- a/doc/tutorial/ginac.texi +++ b/doc/tutorial/ginac.texi @@ -6505,7 +6505,7 @@ to map input (sub)strings to arbitrary expressions: table["x"] = x+log(y)+1; parser reader(table); ex e = reader("5*x^3 - x^2"); - // e = 5*(x+log(y)+1)^3 + (x+log(y)+1)^2 + // e = 5*(x+log(y)+1)^3 - (x+log(y)+1)^2 @} @end example @@ -6518,8 +6518,8 @@ with @code{get_syms()} method: parser reader; ex e = reader("2*x+sin(y)"); symtab table = reader.get_syms(); - symbol x = reader["x"]; - symbol y = reader["y"]; + symbol x = ex_to(table["x"]); + symbol y = ex_to(table["y"]); @} @end example -- 2.49.0