]> git.saurik.com Git - bison.git/blobdiff - data/lalr1.cc
%define token.prefix.
[bison.git] / data / lalr1.cc
index 97ba371bd8795235b5f1a93fc0eeaeb5c0991c56..851c165bea4bc290daf59227cc21fac996fcc8d1 100644 (file)
@@ -146,9 +146,10 @@ m4_define([b4_rhs_location],
 # b4_symbol(NUM, FIELD)
 # ---------------------
 # Recover a FIELD about symbol #NUM.  Thanks to m4_indir, fails if
-# undefined.
+# undefined.  If FIELD = id, prepend the prefix.
 m4_define([b4_symbol],
-[m4_indir([b4_symbol($1, $2)])])
+[m4_if([$2], [id], [b4_percent_define_get([token.prefix])])dnl
+m4_indir([b4_symbol($1, $2)])])
 
 
 # b4_symbol_if(NUM, FIELD, IF-TRUE, IF-FALSE)