summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Grammar/lexer
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2013-09-19 20:48:10 +0000
committerhallgren <hallgren@chalmers.se>2013-09-19 20:48:10 +0000
commit021b5f06d3900fe2b10d5d3ccf6ac286a779ef16 (patch)
treecff0a0ca9c945dcef34f58a6e09fc5042c7abd65 /src/compiler/GF/Grammar/lexer
parent3d5b9bd1fd46a51651cbfbd45f03e5b878aebbac (diff)
Introduce type RawIdent; only 9 imports of Data.ByteString.Char8 remain
The fact that identifiers are represented as ByteStrings is now an internal implentation detail in module GF.Infra.Ident. Conversion between ByteString and identifiers is only needed in the lexer and the Binary instances.
Diffstat (limited to 'src/compiler/GF/Grammar/lexer')
-rw-r--r--src/compiler/GF/Grammar/lexer/Lexer.x4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/GF/Grammar/lexer/Lexer.x b/src/compiler/GF/Grammar/lexer/Lexer.x
index ca796808b..4050f4854 100644
--- a/src/compiler/GF/Grammar/lexer/Lexer.x
+++ b/src/compiler/GF/Grammar/lexer/Lexer.x
@@ -30,9 +30,9 @@ $u = [\0-\255] -- universal: any character
"{-" ([$u # \-] | \- [$u # \}])* ("-")+ "}" ;
$white+ ;
-@rsyms { tok (eitherResIdent (T_Ident . identC)) }
+@rsyms { tok (eitherResIdent (T_Ident . identC . rawIdentC)) }
\' ($u # \')* \' { tok (eitherResIdent (T_LString . BS.unpack)) }
-(\_ | $l)($l | $d | \_ | \')* { tok (eitherResIdent (T_Ident . identC)) }
+(\_ | $l)($l | $d | \_ | \')* { tok (eitherResIdent (T_Ident . identC . rawIdentC)) }
\" ([$u # [\" \\ \n]] | (\\ (\" | \\ | \' | n | t)))* \" { tok (T_String . unescapeInitTail . BS.unpack) }