* parse.c (write_dollar_variable): New function.

* c-exp.y (yylex):  Replace code for recognizing '$' pseudo-variables
	with a call to write_dollar_variable.
	Simplify grammar correspondingly.
	* f-exp.y:  Likewise.
	* m2-exp.y:  Likewise.
	* ch-exp.y:  Likewise.  (Remove function match_dollar_tokens.)
	* scm-exp.c (scm_lreadr):  Call write_dollar_variable to handle '$'.
This commit is contained in:
Per Bothner
1995-10-05 22:15:49 +00:00
parent db552bdadc
commit c700638ca7
7 changed files with 123 additions and 374 deletions

View File

@ -373,6 +373,11 @@ scm_lreadr (skipping)
if (!skipping)
{
str.length = lexptr - str.ptr;
if (str.ptr[0] == '$')
{
write_dollar_variable (str);
return;
}
write_exp_elt_opcode (OP_NAME);
write_exp_string (str);
write_exp_elt_opcode (OP_NAME);