From a968dc687d8a4fa3303a750d3ef1eea9369b2fdd Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Wed, 18 Nov 2015 08:56:02 -0500 Subject: support _ in identifiers --- minic/minic.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'minic') diff --git a/minic/minic.y b/minic/minic.y index b335f68..0abef05 100644 --- a/minic/minic.y +++ b/minic/minic.y @@ -6,7 +6,7 @@ #include enum { - NString = 16, + NString = 32, NGlo = 256, NVar = 512, NStr = 256, @@ -874,7 +874,7 @@ yylex() die("ident too long"); *p++ = c; c = getchar(); - } while (isalpha(c)); + } while (isalpha(c) || c == '_'); *p = 0; ungetc(c, stdin); for (i=0; kwds[i].s; i++) -- cgit 1.4.1