Until now, q2c has used lex_match_hyphenated_word() wherever it was
necessary to match a plain identifier. But it is better to use
lex_match_id() when it can be, because it is simpler and faster, so this
commit does that.
---
src/language/lexer/q2c.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/language/lexer/q2c.c b/src/language/lexer/q2c.c
index cf5a04e..73602bd 100644
--- a/src/language/lexer/q2c.c
+++ b/src/language/lexer/q2c.c
@@ -1422,12 +1422,14 @@ make_match (const char *t)
"|| lex_match_id (lexer, \"FALSE\"))");
else if (isdigit ((unsigned char) t[0]))
sprintf (s, "lex_match_int (lexer, %s)", t);
- else
+ else if (strchr (t, hyphen_proxy))
{
char *c = unmunge (t);
sprintf (s, "lex_match_hyphenated_word (lexer, \"%s\")", c);
free (c);
}
+ else
+ sprintf (s, "lex_match_id (lexer, \"%s\")", t);
return s;
}
--
1.7.1
_______________________________________________
pspp-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/pspp-dev