From 86201df35c860520fd5898fa172c29238f0e19a0 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Thu, 12 Jun 2014 09:36:32 +0000 Subject: [PATCH] now GF keywords can be used as identifiers if they are quoted --- src/compiler/GF/Grammar/Lexer.x | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/GF/Grammar/Lexer.x b/src/compiler/GF/Grammar/Lexer.x index 0293d3915..681ae9024 100644 --- a/src/compiler/GF/Grammar/Lexer.x +++ b/src/compiler/GF/Grammar/Lexer.x @@ -34,7 +34,7 @@ $u = [.\n] -- universal: any character $white+ ; @rsyms { tok ident } -\' ([. # [\' \\ \n]] | (\\ (\' | \\)))+ \' { tok (res T_Ident . identS . unescapeInitTail . unpack) } +\' ([. # [\' \\ \n]] | (\\ (\' | \\)))+ \' { tok (T_Ident . identS . unescapeInitTail . unpack) } (\_ | $l)($l | $d | \_ | \')* { tok ident } \" ([$u # [\" \\ \n]] | (\\ (\" | \\ | \' | n | t)))* \" { tok (T_String . unescapeInitTail . unpack) }