diff options
author | simonmar <unknown> | 2003-08-18 11:48:46 +0000 |
---|---|---|
committer | simonmar <unknown> | 2003-08-18 11:48:46 +0000 |
commit | ea54ebc01fc0a448ed523530a3a52271191337f1 (patch) | |
tree | aa3342c63081c4392eb6f77869111ccb2fdf87f4 /src/HaddockParse.y | |
parent | 8f9a1146972021379eadad3fc2a005871db882c8 (diff) |
[haddock @ 2003-08-18 11:48:46 by simonmar]
Fixes to the new lexer.
Diffstat (limited to 'src/HaddockParse.y')
-rw-r--r-- | src/HaddockParse.y | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/HaddockParse.y b/src/HaddockParse.y index db712c42..e1a1cb8c 100644 --- a/src/HaddockParse.y +++ b/src/HaddockParse.y @@ -10,8 +10,8 @@ import HsSyn %token '/' { TokSpecial '/' } '@' { TokSpecial '@' } DQUO { TokSpecial '\"' } - '#' { TokSpecial '#' } URL { TokURL $$ } + ANAME { TokAName $$ } '*' { TokBullet } '(n)' { TokNumber } '>..' { TokBirdTrack $$ } @@ -65,12 +65,16 @@ seq1 :: { Doc } elem1 :: { Doc } : STRING { DocString $1 } - | '/' STRING '/' { DocEmphasis (DocString $2) } - | '#' STRING '#' { DocAName $2 } + | '/' strings '/' { DocEmphasis $2 } | URL { DocURL $1 } + | ANAME { DocAName $1 } | IDENT { DocIdentifier $1 } | DQUO STRING DQUO { DocModule $2 } +strings :: { Doc } + : STRING { DocString $1 } + | STRING strings { docAppend (DocString $1) $2 } + { happyError :: [Token] -> Either String a happyError toks = |