diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/GF/Infra/UseIO.hs | 11 | ||||
| -rw-r--r-- | src/GF/Parsing/MCFG/Active.hs | 16 | ||||
| -rw-r--r-- | src/GF/Parsing/MCFG/Active2.hs | 12 | ||||
| -rw-r--r-- | src/GF/Parsing/MCFG/Incremental.hs | 12 | ||||
| -rw-r--r-- | src/GF/Parsing/MCFG/Incremental2.hs | 12 | ||||
| -rw-r--r-- | src/GF/Parsing/MCFG/Naive.hs | 12 | ||||
| -rw-r--r-- | src/GF/Parsing/MCFG/Range.hs | 12 | ||||
| -rw-r--r-- | src/GF/Parsing/MCFG/ViaCFG.hs | 21 | ||||
| -rw-r--r-- | src/haddock/haddock-check.perl | 13 |
9 files changed, 100 insertions, 21 deletions
diff --git a/src/GF/Infra/UseIO.hs b/src/GF/Infra/UseIO.hs index 67f0d6c1b..7bf9edaf1 100644 --- a/src/GF/Infra/UseIO.hs +++ b/src/GF/Infra/UseIO.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/05/27 11:37:57 $ --- > CVS $Author: aarne $ --- > CVS $Revision: 1.16 $ +-- > CVS $Date: 2005/08/08 09:01:25 $ +-- > CVS $Author: peb $ +-- > CVS $Revision: 1.17 $ -- -- (Description of the module) ----------------------------------------------------------------------------- @@ -147,7 +147,7 @@ prefixPathName p f = case f of c:_ | isSep c -> f -- do not prefix [Unix style] absolute paths _ -> case p of "" -> f - _ -> p ++ "/" ++ f -- / actually works on windows + _ -> p ++ "/" ++ f -- note: / actually works on windows justInitPath :: FilePath -> FilePath justInitPath = reverse . drop 1 . dropWhile (not . isSep) . reverse @@ -303,7 +303,8 @@ readFileIOE f = ioe $ catch (readFile f >>= return . return) -- intended semantics: if file is not found, try @\$GF_LIB_PATH\/file@ -- (even if file is an absolute path, but this should always fail) -- it returns not only contents of the file, but also the path used --- FIXME: unix-specific, / is \ on Windows +-- +-- FIXME: unix-specific, \/ is \\ on Windows readFileLibraryIOE :: String -> FilePath -> IOE (FilePath, String) readFileLibraryIOE ini f = ioe $ catch ((do {s <- readFile initPath; return (return (initPath,s))})) diff --git a/src/GF/Parsing/MCFG/Active.hs b/src/GF/Parsing/MCFG/Active.hs index cb1440e24..a422f7e10 100644 --- a/src/GF/Parsing/MCFG/Active.hs +++ b/src/GF/Parsing/MCFG/Active.hs @@ -1,3 +1,15 @@ +---------------------------------------------------------------------- +-- | +-- Maintainer : PL +-- Stability : (stable) +-- Portability : (portable) +-- +-- > CVS $Date: 2005/08/08 09:01:25 $ +-- > CVS $Author: peb $ +-- > CVS $Revision: 1.5 $ +-- +-- MCFG parsing, the active algorithm +----------------------------------------------------------------------------- module GF.Parsing.MCFG.Active (parse, parseR) where @@ -20,7 +32,7 @@ import GF.Infra.Print ---------------------------------------------------------------------- -- * parsing ---parse :: (Ord n, Ord c, Ord l, Ord t) => String -> MCFParser c n l t +parse :: (Ord n, Ord c, Ord l, Ord t) => String -> MCFParser c n l t parse strategy pinfo starts toks = trace2 "MCFG.Active - strategy" (if isBU strategy then "BU" else if isTD strategy then "TD" else "None") $ @@ -28,7 +40,7 @@ parse strategy pinfo starts toks = Final (Abs cat rhs fun) found rrecs <- chartLookup chart Fin ] where chart = process strategy pinfo starts toks ---parse :: (Ord n, Ord c, Ord l, Ord t) => String -> MCFParser c n l t +-- parseR :: (Ord n, Ord c, Ord l, Ord t) => String -> MCFParser c n l t parseR strategy pinfo starts = trace2 "MCFG.Active Range - strategy" (if isBU strategy then "BU" else if isTD strategy then "TD" else "None") $ diff --git a/src/GF/Parsing/MCFG/Active2.hs b/src/GF/Parsing/MCFG/Active2.hs index a37c7c15d..f702c83b3 100644 --- a/src/GF/Parsing/MCFG/Active2.hs +++ b/src/GF/Parsing/MCFG/Active2.hs @@ -1,3 +1,15 @@ +---------------------------------------------------------------------- +-- | +-- Maintainer : PL +-- Stability : (stable) +-- Portability : (portable) +-- +-- > CVS $Date: 2005/08/08 09:01:25 $ +-- > CVS $Author: peb $ +-- > CVS $Revision: 1.2 $ +-- +-- MCFG parsing, the active algorithm (alternative version) +----------------------------------------------------------------------------- module GF.Parsing.MCFG.Active2 (parse) where diff --git a/src/GF/Parsing/MCFG/Incremental.hs b/src/GF/Parsing/MCFG/Incremental.hs index eafca578d..64a6c759e 100644 --- a/src/GF/Parsing/MCFG/Incremental.hs +++ b/src/GF/Parsing/MCFG/Incremental.hs @@ -1,3 +1,15 @@ +---------------------------------------------------------------------- +-- | +-- Maintainer : PL +-- Stability : (stable) +-- Portability : (portable) +-- +-- > CVS $Date: 2005/08/08 09:01:25 $ +-- > CVS $Author: peb $ +-- > CVS $Revision: 1.4 $ +-- +-- MCFG parsing, the incremental algorithm +----------------------------------------------------------------------------- module GF.Parsing.MCFG.Incremental (parse, parseR) where diff --git a/src/GF/Parsing/MCFG/Incremental2.hs b/src/GF/Parsing/MCFG/Incremental2.hs index 9d95f0fb0..880909758 100644 --- a/src/GF/Parsing/MCFG/Incremental2.hs +++ b/src/GF/Parsing/MCFG/Incremental2.hs @@ -1,3 +1,15 @@ +---------------------------------------------------------------------- +-- | +-- Maintainer : PL +-- Stability : (stable) +-- Portability : (portable) +-- +-- > CVS $Date: 2005/08/08 09:01:25 $ +-- > CVS $Author: peb $ +-- > CVS $Revision: 1.3 $ +-- +-- MCFG parsing, the incremental algorithm (alternative version) +----------------------------------------------------------------------------- module GF.Parsing.MCFG.Incremental2 (parse) where diff --git a/src/GF/Parsing/MCFG/Naive.hs b/src/GF/Parsing/MCFG/Naive.hs index 932261d2b..8697f9c4c 100644 --- a/src/GF/Parsing/MCFG/Naive.hs +++ b/src/GF/Parsing/MCFG/Naive.hs @@ -1,3 +1,15 @@ +---------------------------------------------------------------------- +-- | +-- Maintainer : PL +-- Stability : (stable) +-- Portability : (portable) +-- +-- > CVS $Date: 2005/08/08 09:01:25 $ +-- > CVS $Author: peb $ +-- > CVS $Revision: 1.5 $ +-- +-- MCFG parsing, the naive algorithm +----------------------------------------------------------------------------- module GF.Parsing.MCFG.Naive (parse, parseR) where diff --git a/src/GF/Parsing/MCFG/Range.hs b/src/GF/Parsing/MCFG/Range.hs index 7e5cc859a..91671fa00 100644 --- a/src/GF/Parsing/MCFG/Range.hs +++ b/src/GF/Parsing/MCFG/Range.hs @@ -1,3 +1,15 @@ +--------------------------------------------------------------------- +-- | +-- Maintainer : PL +-- Stability : (stable) +-- Portability : (portable) +-- +-- > CVS $Date: 2005/08/08 09:01:25 $ +-- > CVS $Author: peb $ +-- > CVS $Revision: 1.5 $ +-- +-- Definitions of ranges, and operations on ranges +----------------------------------------------------------------------------- module GF.Parsing.MCFG.Range ( Range(..), makeRange, concatRange, rangeEdge, edgeRange, minRange, maxRange, diff --git a/src/GF/Parsing/MCFG/ViaCFG.hs b/src/GF/Parsing/MCFG/ViaCFG.hs index 00fff83e0..9204ea9f1 100644 --- a/src/GF/Parsing/MCFG/ViaCFG.hs +++ b/src/GF/Parsing/MCFG/ViaCFG.hs @@ -1,12 +1,15 @@ -{-- Module -------------------------------------------------------------------- - Filename: ApproxParse.hs - Author: Håkan Burden - Time-stamp: <2005-04-18, 14:56> - - Description: An agenda-driven implementation of the active algorithm 4.3.4, - parsing through context-free approximation as described in - Ljunglöf (2004) -------------------------------------------------------------------------------} +---------------------------------------------------------------------- +-- | +-- Maintainer : PL +-- Stability : (stable) +-- Portability : (portable) +-- +-- > CVS $Date: 2005/08/08 09:01:25 $ +-- > CVS $Author: peb $ +-- > CVS $Revision: 1.4 $ +-- +-- MCFG parsing, through context-free approximation +----------------------------------------------------------------------------- module GF.Parsing.MCFG.ViaCFG where diff --git a/src/haddock/haddock-check.perl b/src/haddock/haddock-check.perl index a16eac9ef..93647bac7 100644 --- a/src/haddock/haddock-check.perl +++ b/src/haddock/haddock-check.perl @@ -41,10 +41,11 @@ sub check_headerline { if ($#ARGV >= 0) { @FILES = @ARGV; } else { - @dirs = qw{. api canonical cf cfgm compile for-ghc-nofud - grammar infra notrace parsers shell - source speech translate useGrammar util visualization - GF GF/* GF/*/* GF/*/*/*}; +# @dirs = qw{. api canonical cf cfgm compile for-ghc-nofud +# grammar infra notrace parsers shell +# source speech translate useGrammar util visualization +# GF GF/* GF/*/* GF/*/*/*}; + @dirs = qw{GF GF/* GF/*/* GF/*/*/*}; @FILES = grep(!/\/(Par|Lex)(GF|GFC|CFG)\.hs$/, glob "{".join(",",@dirs)."}/*.hs"); } @@ -70,7 +71,9 @@ for $file (@FILES) { # the module header $hdr_module = $module = ""; - s/^ (--+ \s* \n) +//sx; + s/^ \{-\# \s+ OPTIONS \s+ -cpp \s+ \#-\} //sx; # removing ghc options (cpp) + s/^ \s+ //sx; # removing initial whitespace + s/^ (--+ \s* \n) +//sx; # removing initial comment lines unless (s/^ -- \s \| \s* \n//sx) { push @ERR, "Incorrect module header"; } else { |
