From 5811366a62325d2cacf5509c25ee564ae3269f9b Mon Sep 17 00:00:00 2001 From: fche Date: Wed, 4 Apr 2007 21:18:23 +0000 Subject: 2007-04-03 Pierre Peiffer * parse.cxx, parse.h (lexer::scan): Add $# and @# identifiers. (eval_pp_conditional, scan_pp): Allow the use of $x and @x identifiers. Produce more accurate error messages. * stap.1.in: Document $# and @# identifiers. 2007-04-04 Pierre Peiffer * parseok/fourteen.stp: Add test about $# and @# usage during the preprocessing. * parseko/preprocess10.stp: New test. * parseko/preprocess11.stp: New test. * parseko/preprocess12.stp: New test. --- testsuite/parseok/fourteen.stp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'testsuite/parseok') diff --git a/testsuite/parseok/fourteen.stp b/testsuite/parseok/fourteen.stp index cc51b90b..30ada648 100755 --- a/testsuite/parseok/fourteen.stp +++ b/testsuite/parseok/fourteen.stp @@ -15,3 +15,14 @@ global %: %( arch != "x86_64" %? other %: x86_64 %) %) %) + +global +%( $# != 2 %? /* and */ + %( @# < "1" %? /* and */ + %( @# == "0" %? /* and */ + %( $# >= 3 %? /* and */ + %( $2 >= "12" %? $3 FAIL5 %: $2 FAIL6 %) #This line must not be evaluated + %: PASS2 %) + %: "FAIL7" %) + %: "FAIL8" %) +%: "FAIL9" %) -- cgit