From 2c861a2f6c040b348aa6ffe9a64f2eb106c2bbfb Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sat, 17 Jun 2017 12:27:47 +0200 Subject: [PATCH] cpp: add missing "finally" token, move ID Token to beginning of file --- pmd-cpp/etc/grammar/cpp.jj | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pmd-cpp/etc/grammar/cpp.jj b/pmd-cpp/etc/grammar/cpp.jj index 2af09bd98b..3f65d72a8e 100644 --- a/pmd-cpp/etc/grammar/cpp.jj +++ b/pmd-cpp/etc/grammar/cpp.jj @@ -288,6 +288,7 @@ TOKEN : | < FALSETOK: "false" > | < THROW: "throw" > | < AT: "@" > +| < FINALLY: "finally" > } TOKEN [IGNORE_CASE] : @@ -325,6 +326,12 @@ TOKEN : | < RSTRING : "R\"(" ( ~[")"] | ( ")" ~["\""] ) )* ")\"" > } +TOKEN : +{ + < ID : ["$", "a"-"z","A"-"Z", "_"] (["a"-"z","A"-"Z","0"-"9","_","$"])* > +} + + void translation_unit() : {} { @@ -1561,10 +1568,4 @@ void exception_list() : type_name() ( "," type_name())* } -TOKEN : -{ - < ID : ["$", "a"-"z","A"-"Z", "_"] (["a"-"z","A"-"Z","0"-"9","_","$"])* > -} - - /*end*/