From c543a2f713184ccf6a5e9077dbfb985bdc7c5b4b Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 17 Jul 2016 17:01:41 +0200 Subject: lexer: even dashes can be in a NAME. --- GnuLdLexer.g4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GnuLdLexer.g4 b/GnuLdLexer.g4 index eb6090f..10475d8 100644 --- a/GnuLdLexer.g4 +++ b/GnuLdLexer.g4 @@ -160,7 +160,7 @@ QUOTE : '"' -> skip, pushMode(STRING); // | NAME # namePlain; //NAME : [\._a-zA-Z][\._a-zA-Z0-9]*; -NAME : [*\._a-zA-Z][*\.\/_a-zA-Z0-9]* | '/DISCARD/'; +NAME : [*\._a-zA-Z][*-\.\/_a-zA-Z0-9]* | '/DISCARD/'; // TODO: ld supports some really fancy expressions here, like "0101010b", "ffH", "ffx", "$Aa" etc //INT : '0x' [0-9a-fA-F]+ -- cgit v1.2.3