diff options
| author | kr.angelov <kr.angelov@chalmers.se> | 2008-05-21 13:10:54 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@chalmers.se> | 2008-05-21 13:10:54 +0000 |
| commit | c544ef31823c7d2c28c28cae408cca5d71e6978d (patch) | |
| tree | b9693bc684d1737062e45438cedf7536cf5513d5 /src-3.0/GF/GFCC/Raw/ParGFCCRaw.hs | |
| parent | 529374caaa6d451400f57f1ff82106d89d603944 (diff) | |
use ByteString internally in Ident, CId and Label
Diffstat (limited to 'src-3.0/GF/GFCC/Raw/ParGFCCRaw.hs')
| -rw-r--r-- | src-3.0/GF/GFCC/Raw/ParGFCCRaw.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src-3.0/GF/GFCC/Raw/ParGFCCRaw.hs b/src-3.0/GF/GFCC/Raw/ParGFCCRaw.hs index b71904948..159eea5fb 100644 --- a/src-3.0/GF/GFCC/Raw/ParGFCCRaw.hs +++ b/src-3.0/GF/GFCC/Raw/ParGFCCRaw.hs @@ -1,9 +1,11 @@ module GF.GFCC.Raw.ParGFCCRaw (parseGrammar) where +import GF.GFCC.CId import GF.GFCC.Raw.AbsGFCCRaw import Control.Monad import Data.Char +import qualified Data.ByteString.Char8 as BS parseGrammar :: String -> IO Grammar parseGrammar s = case runP pGrammar s of @@ -27,7 +29,7 @@ pTerm n = skipSpaces >> (pParen <++ pApp <++ pNum <++ pStr <++ pMeta) <++ return (AInt (read x))) pMeta = char '?' >> return AMet - pIdent = liftM CId $ liftM2 (:) (satisfy isIdentFirst) (munch isIdentRest) + pIdent = liftM2 (:) (satisfy isIdentFirst) (munch isIdentRest) isIdentFirst c = c == '_' || isAlpha c isIdentRest c = c == '_' || c == '\'' || isAlphaNum c |
