Do string sharing after unescaping in source and canonical grammars.

This commit is contained in:
bringert
2004-12-07 13:02:27 +00:00
parent 97dbfc25f2
commit f1b84584f8
4 changed files with 4 additions and 4 deletions

View File

@@ -131,7 +131,7 @@ alexInputPrevChar (p, c, s) = c
alex_action_1 = tok (\p s -> PT p (TS $ shareString s))
alex_action_2 = tok (\p s -> PT p (eitherResIdent (TV . shareString) s))
alex_action_3 = tok (\p s -> PT p (TL $ unescapeInitTail $ shareString s))
alex_action_3 = tok (\p s -> PT p (TL $ shareString $ unescapeInitTail s))
alex_action_4 = tok (\p s -> PT p (TI s))
{-# LINE 1 "GenericTemplate.hs" #-}
{-# LINE 1 "<built-in>" #-}

View File

@@ -24,7 +24,7 @@ $white+ ;
@rsyms { tok (\p s -> PT p (TS $ shareString s)) }
$l $i* { tok (\p s -> PT p (eitherResIdent (TV . shareString) s)) } -- H
\" ([$u # [\" \\ \n]] | (\\ (\" | \\ | \' | n | t)))* \"{ tok (\p s -> PT p (TL $ unescapeInitTail $ shareString s)) } -- H
\" ([$u # [\" \\ \n]] | (\\ (\" | \\ | \' | n | t)))* \"{ tok (\p s -> PT p (TL $ shareString $ unescapeInitTail s)) } -- H
$d+ { tok (\p s -> PT p (TI s)) }

View File

@@ -133,7 +133,7 @@ alexInputPrevChar (p, c, s) = c
alex_action_3 = tok (\p s -> PT p (TS $ shareString s))
alex_action_4 = tok (\p s -> PT p (eitherResIdent (T_LString . shareString) s))
alex_action_5 = tok (\p s -> PT p (eitherResIdent (TV . shareString) s))
alex_action_6 = tok (\p s -> PT p (TL $ unescapeInitTail $ shareString s))
alex_action_6 = tok (\p s -> PT p (TL $ shareString $ unescapeInitTail s))
alex_action_7 = tok (\p s -> PT p (TI s))
{-# LINE 1 "GenericTemplate.hs" #-}
{-# LINE 1 "<built-in>" #-}

View File

@@ -27,7 +27,7 @@ $white+ ;
\' ($u # \')* \' { tok (\p s -> PT p (eitherResIdent (T_LString . shareString) s)) } -- H
$l $i* { tok (\p s -> PT p (eitherResIdent (TV . shareString) s)) } -- H
\" ([$u # [\" \\ \n]] | (\\ (\" | \\ | \' | n | t)))* \"{ tok (\p s -> PT p (TL $ unescapeInitTail $ shareString s)) } -- H
\" ([$u # [\" \\ \n]] | (\\ (\" | \\ | \' | n | t)))* \"{ tok (\p s -> PT p (TL $ shareString $ unescapeInitTail s)) } -- H
$d+ { tok (\p s -> PT p (TI s)) }