From 6ff82372f1644ec49c4615efeb59b8d1202e63e7 Mon Sep 17 00:00:00 2001 From: paulmcq Date: Sun, 25 Sep 2011 23:53:45 +0000 Subject: [PATCH] ID# 3308400: allow Yacc-style %(code brackets}% --- re2c/scanner.re | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); } -- 2.40.0