From d42984a08f8ea44123c84f267e060a7e97a003f0 Mon Sep 17 00:00:00 2001 From: bringert Date: Tue, 7 Dec 2004 13:02:27 +0000 Subject: Do string sharing after unescaping in source and canonical grammars. --- src/GF/Canon/LexGFC.hs | 2 +- src/GF/Canon/LexGFC.x | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/GF/Canon') diff --git a/src/GF/Canon/LexGFC.hs b/src/GF/Canon/LexGFC.hs index db745f20f..f26ed3e61 100644 --- a/src/GF/Canon/LexGFC.hs +++ b/src/GF/Canon/LexGFC.hs @@ -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 "" #-} diff --git a/src/GF/Canon/LexGFC.x b/src/GF/Canon/LexGFC.x index 2f7b2180c..b3332a48b 100644 --- a/src/GF/Canon/LexGFC.x +++ b/src/GF/Canon/LexGFC.x @@ -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)) } -- cgit v1.2.3