Allow hyphens in identifier names
authorChris Lattner <sabre@nondot.org>
Tue, 4 Dec 2001 04:31:30 +0000 (04:31 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 4 Dec 2001 04:31:30 +0000 (04:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1409 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/Lexer.l

index e843e5e631865f2aa32e7c259d0e1002a1ba2d01..50da49adcc6279b1dc9cb83258e5ec25436ba382 100644 (file)
@@ -89,10 +89,10 @@ char *UnEscapeLexed(char *Buffer, bool AllowNull = false) {
 Comment    ;.*
 
 /* Variable(Value) identifiers start with a % sign */
-VarID       %[a-zA-Z$._][a-zA-Z$._0-9]*
+VarID       %[-a-zA-Z$._][-a-zA-Z$._0-9]*
 
 /* Label identifiers end with a colon */
-Label       [a-zA-Z$._0-9]+:
+Label       [-a-zA-Z$._0-9]+:
 
 /* Quoted names can contain any character except " and \ */
 StringConstant \"[^\"]+\"