Changeset 6067
- Timestamp:
- 08/04/05 15:41:44 (3 years ago)
- svk:copy_cache_prev:
- 8204
- Location:
- src/Pugs
- Files:
-
- 4 modified
-
AST/Internals.hs (modified) (1 diff)
-
CodeGen.hs (modified) (1 diff)
-
Lexer.hs (modified) (2 diffs)
-
Parser.hs (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/AST/Internals.hs
r6061 r6067 1273 1273 readVar _ = return undef 1274 1274 1275 {-| 1276 The \'empty expression\' is just a no-op ('Noop'). 1277 -} 1275 1278 emptyExp :: Exp 1276 1279 emptyExp = Noop -
src/Pugs/CodeGen.hs
r5393 r6067 4 4 Code generation interface. 5 5 6 I sit beside the fire and think7 of all that I have seen,8 of meadow-flowers and butterflies9 in summers that have been...6 > I sit beside the fire and think 7 > of all that I have seen, 8 > of meadow-flowers and butterflies 9 > in summers that have been... 10 10 -} 11 11 -
src/Pugs/Lexer.hs
r5539 r6067 94 94 return (c:cs) 95 95 96 {-| 97 Match any amount of whitespace (not including newlines), followed by a newline 98 (as matched by 'ruleEndOfLine'). 99 -} 96 100 ruleWhiteSpaceLine :: GenParser Char st () 97 101 ruleWhiteSpaceLine = do … … 99 103 ruleEndOfLine 100 104 105 {-| 106 Match either a single newline, or EOF (which constitutes the termination of a 107 line anyway). 108 -} 101 109 ruleEndOfLine :: GenParser Char st () 102 110 ruleEndOfLine = choice [ do { char '\n'; return () }, eof ] -
src/Pugs/Parser.hs
r6035 r6067 57 57 return $ Pos (mkPos pos1 pos2) (unwrap exp) 58 58 59 mkPos :: SourcePos -> SourcePos -> Pos 59 {-| 60 Create a Pugs 'Pugs.AST.Pos' (for storing in the AST) from two Parsec 61 @SourcePos@ positions, being the start and end respectively of the current 62 region. 63 -} 64 mkPos :: SourcePos -- ^ Starting position of the region 65 -> SourcePos -- ^ Ending position of the region 66 -> Pos 60 67 mkPos pos1 pos2 = MkPos 61 68 { posName = sourceName pos1 … … 123 130 rest exp 124 131 132 {-| 133 Assert that we're at the beginning of a line, but consume no input (and produce 134 no result). 135 136 Used by 'ruleDocIntroducer', because POD-style regions must have their \'@=@\' 137 at the beginning of a line. 138 -} 125 139 ruleBeginOfLine :: RuleParser () 126 140 ruleBeginOfLine = do … … 129 143 return () 130 144 145 {-| 146 Match a single \'@=@\', but only if it occurs as the first character of a line. 147 -} 131 148 ruleDocIntroducer :: RuleParser Char 132 149 ruleDocIntroducer = (<?> "intro") $ do … … 134 151 char '=' 135 152 153 {-| 154 Match \'@=cut@\', followed by a newline (see 'ruleWhiteSpaceLine'). 155 156 The \'@=@\' must be the first character of the line ('ruleDocIntroducer'). 157 -} 136 158 ruleDocCut :: RuleParser () 137 159 ruleDocCut = (<?> "cut") $ do
