[brlcad-commits] SF.net SVN: brlcad:[47553] brlcad/trunk/doc/bison_to_lemon.txt
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <n_...@us...> - 2011-11-18 17:24:59
|
Revision: 47553 http://brlcad.svn.sourceforge.net/brlcad/?rev=47553&view=rev Author: n_reed Date: 2011-11-18 17:24:52 +0000 (Fri, 18 Nov 2011) Log Message: ----------- update on alias substitution Modified Paths: -------------- brlcad/trunk/doc/bison_to_lemon.txt Modified: brlcad/trunk/doc/bison_to_lemon.txt =================================================================== --- brlcad/trunk/doc/bison_to_lemon.txt 2011-11-18 17:22:43 UTC (rev 47552) +++ brlcad/trunk/doc/bison_to_lemon.txt 2011-11-18 17:24:52 UTC (rev 47553) @@ -163,6 +163,15 @@ WARNING: Converting from bison to lemon syntax is tedious and error-prone. +WARNING: Lemon does a global replacement of the alias within the action. + The following doesn't work, because the 's' in "%s" will get + substituted as well: + + text ::= STRING(s). { + /* will print something like "%yympsp[0].minor.yy0>>Shift 7" */ + printf("%s", s.string); + } + Lemon Makes All Terminals the Same Type ----------------------------------------- In Bison, you typically create a union that specifies the possible types of tokens, and then you declare the types for individual tokens: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |