From: ross Date: Wed, 29 Oct 2003 17:58:16 +0000 (+0000) Subject: [project @ 2003-10-29 17:58:16 by ross] X-Git-Tag: Approx_11550_changesets_converted~316 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=90ba37a1061685a0e084ea3d548156450b57309d;p=ghc-hetmet.git [project @ 2003-10-29 17:58:16 by ross] don't recognise (| or (# if followed by a symbol character, e.g. (||) good for STABLE, I hope --- diff --git a/ghc/compiler/parser/Lexer.x b/ghc/compiler/parser/Lexer.x index 52fc03e..97dbd77 100644 --- a/ghc/compiler/parser/Lexer.x +++ b/ghc/compiler/parser/Lexer.x @@ -204,7 +204,8 @@ $white_no_nl+ ; } <0,glaexts> { - "(|" / { ifExtension arrowsEnabled } { special IToparenbar } + "(|" / { ifExtension arrowsEnabled `alexAndPred` notFollowedBySymbol } + { special IToparenbar } "|)" / { ifExtension arrowsEnabled } { special ITcparenbar } } @@ -214,7 +215,7 @@ $white_no_nl+ ; } { - "(#" { token IToubxparen } + "(#" / { notFollowedBySymbol } { token IToubxparen } "#)" { token ITcubxparen } "{|" { token ITocurlybar } "|}" { token ITccurlybar } @@ -581,6 +582,9 @@ pop_and act loc end buf len = do popLexState; act loc end buf len notFollowedBy char _ _ _ (_,buf) = atEnd buf || currentChar buf /= char +notFollowedBySymbol _ _ _ (_,buf) + = atEnd buf || currentChar buf `notElem` "!#$%&*+./<=>?@\\^|-~" + ifExtension pred bits _ _ _ = pred bits {-