From d28e94557483b2038f0d0e0c3fe95cdfc4c0dc2a Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Tue, 21 Aug 2007 17:20:10 +0000 Subject: [PATCH] Don't allow *s in strings that aren't escapes. --- LexOccam.x | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LexOccam.x b/LexOccam.x index f8da74e..c7ff205 100644 --- a/LexOccam.x +++ b/LexOccam.x @@ -68,8 +68,8 @@ $hexDigit = [0-9 a-f A-F] $escapeChar = [cnrts \" \' \* \n] @escape = \* ( $escapeChar | \# $hexDigit $hexDigit ) -@stringLiteral = \" ( @escape | [^\"] )* \" -@charLiteral = \' ( @escape | [^\'] ) \' +@stringLiteral = \" ( @escape | [^\"\*] )* \" +@charLiteral = \' ( @escape | [^\'\*] ) \' -- Note that occam number literals don't include their signs -- if you say -- "-3", then that's the operator "-" applied to the literal "3".