From: paulmcq Date: Sun, 25 Sep 2011 23:53:45 +0000 (+0000) Subject: ID# 3308400: allow Yacc-style %(code brackets}% X-Git-Tag: 0.13.6~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6ff82372f1644ec49c4615efeb59b8d1202e63e7;p=re2c ID# 3308400: allow Yacc-style %(code brackets}% --- diff --git a/re2c/scanner.re b/re2c/scanner.re index 87755cd1..1dd6dc10 100644 --- a/re2c/scanner.re +++ b/re2c/scanner.re @@ -64,7 +64,8 @@ Scanner::ParseMode Scanner::echo() tok = cursor; echo: /*!re2c - "/*!re2c" { + beginRE = "%{" | "/*!re2c"; + beginRE { if (rFlag) { fatal("found standard 're2c' block while using -r flag"); @@ -266,7 +267,8 @@ scan: goto comment; } - "*/" { + endRE = "%}" | "*/"; + endRE { tok = cursor; RETURN(0); }