diff options
author | simonmar <unknown> | 2002-05-13 10:14:22 +0000 |
---|---|---|
committer | simonmar <unknown> | 2002-05-13 10:14:22 +0000 |
commit | 1402b19b0d1e4f07cd29397b0290cd1fb64932c9 (patch) | |
tree | b57cbe5162ad626c65ee0eceab43bff5a945d27e | |
parent | 0665331933d38a8b1ac7c66136d3f97ac6d15eff (diff) |
[haddock @ 2002-05-13 10:14:22 by simonmar]
Allow backquote as the right-hand quote as well as the left-hand
quote, as suggested by Dean Herrington.
Clean up the grammar a litte.
-rw-r--r-- | src/HaddockParse.y | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/HaddockParse.y b/src/HaddockParse.y index dfb1a116..789f0d94 100644 --- a/src/HaddockParse.y +++ b/src/HaddockParse.y @@ -56,12 +56,7 @@ seq :: { ParsedDoc } | elem { $1 } elem :: { ParsedDoc } - : STRING { DocString $1 } - | '/' STRING '/' { DocEmphasis (DocString $2) } - | URL { DocURL $1 } - | SQUO STRING SQUO { DocIdentifier $2 } - | BQUO STRING SQUO { DocIdentifier $2 } - | DQUO STRING DQUO { DocModule $2 } + : elem1 { $1 } | '@' seq1 '@' { DocMonospaced $2 } seq1 :: { ParsedDoc } @@ -72,10 +67,13 @@ elem1 :: { ParsedDoc } : STRING { DocString $1 } | '/' STRING '/' { DocEmphasis (DocString $2) } | URL { DocURL $1 } - | SQUO STRING SQUO { DocIdentifier $2 } - | BQUO STRING SQUO { DocIdentifier $2 } + | squo STRING squo { DocIdentifier $2 } | DQUO STRING DQUO { DocModule $2 } +squo :: { () } + : SQUO { () } + | BQUO { () } + { happyError :: [Token] -> Either String a happyError toks = |