From 7e474ebfea020e4ed59324fbd9f8baf4b6fab705 Mon Sep 17 00:00:00 2001 From: sof Date: Tue, 28 May 2002 22:42:08 +0000 Subject: [haddock @ 2002-05-28 22:42:08 by sof] Handle lone occurrences of '/', e.g., -- | This/that. [did this in the lexer rather than in the parser, as I couldn't see a way not to introduce an S/R conflict that way.] --- src/HaddockParse.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/HaddockParse.y') diff --git a/src/HaddockParse.y b/src/HaddockParse.y index f74d2b69..17fbf2f4 100644 --- a/src/HaddockParse.y +++ b/src/HaddockParse.y @@ -12,13 +12,13 @@ import HsParseMonad %token SQUO { TokSpecial '\'' } BQUO { TokSpecial '`' } DQUO { TokSpecial '\"' } - '/' { TokSpecial '/' } '@' { TokSpecial '@' } URL { TokURL $$ } '*' { TokBullet } '(n)' { TokNumber } '>' { TokBirdTrack } PARA { TokPara } + EMPH { TokEmph $$ } STRING { TokString $$ } %monad { Either String } @@ -67,7 +67,7 @@ seq1 :: { Doc } elem1 :: { Doc } : STRING { DocString $1 } - | '/' STRING '/' { DocEmphasis (DocString $2) } + | EMPH { DocEmphasis (DocString $1) } | URL { DocURL $1 } | squo STRING squo { strToHsQNames $2 } | DQUO STRING DQUO { DocModule $2 } -- cgit v1.2.3