summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--glcpp-lex.l2
-rw-r--r--glcpp-parse.y1
-rw-r--r--tests/071-punctuator.c1
3 files changed, 3 insertions, 1 deletions
diff --git a/glcpp-lex.l b/glcpp-lex.l
index 70d47d2..52269c6 100644
--- a/glcpp-lex.l
+++ b/glcpp-lex.l
@@ -38,7 +38,7 @@ NEWLINE [\n]
HSPACE [ \t]
HASH ^{HSPACE}*#{HSPACE}*
IDENTIFIER [_a-zA-Z][_a-zA-Z0-9]*
-PUNCTUATION [][(){}.&*~!/%<>^|;,+-]
+PUNCTUATION [][(){}.&*~!/%<>^|;,=+-]
OTHER [^][(){}.&*~!/%<>^|;,=#[:space:]+-]+
DECIMAL_INTEGER [1-9][0-9]*[uU]?
diff --git a/glcpp-parse.y b/glcpp-parse.y
index c89d7bf..01ca08e 100644
--- a/glcpp-parse.y
+++ b/glcpp-parse.y
@@ -426,6 +426,7 @@ operator:
| OR { $$ = OR; }
| ';' { $$ = ';'; }
| ',' { $$ = ','; }
+| '=' { $$ = '='; }
| PASTE { $$ = PASTE; }
| DEFINED { $$ = DEFINED; }
;
diff --git a/tests/071-punctuator.c b/tests/071-punctuator.c
new file mode 100644
index 0000000..959d682
--- /dev/null
+++ b/tests/071-punctuator.c
@@ -0,0 +1 @@
+a = b