From: Ben Pfaff Date: Thu, 9 Oct 2008 05:25:36 +0000 (-0700) Subject: Make [ and ] valid tokens in the lexer. X-Git-Tag: sav-api~870^2~37 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3939ba46b53a33f99663cd5313fed19a9e992a8f;p=pspp Make [ and ] valid tokens in the lexer. The VARIABLE ATTRIBUTE and DATAFILE ATTRIBUTE commands use [ and ] to designate array elements. This is the first use for these tokens in the language implemented by PSPP, so until now these characters were rejected with an error whenever they appeared in a syntax file outside a comment or a quoted string. --- diff --git a/src/language/lexer/lexer.c b/src/language/lexer/lexer.c index 5b24522f5c..cc8cab8089 100644 --- a/src/language/lexer/lexer.c +++ b/src/language/lexer/lexer.c @@ -295,6 +295,7 @@ lex_get (struct lexer *lexer) break; case '(': case ')': case ',': case '=': case '+': case '/': + case '[': case ']': lexer->token = *lexer->prog++; break;