diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-11-10T11·00+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-11-10T11·00+0000 |
commit | 06ae269c7c5cdda32072f3f00cf644e540ba12cd (patch) | |
tree | 3fa693c3da7383b3c1e8c6e941339bb7554f8626 /src/fix-ng | |
parent | 15801c88fad38253b19ac2ea77e7597deab5fd6b (diff) |
* Do not filter when parsing. This is much faster.
* Add some rejections and lexical restrictions to the grammar to make this work.
Diffstat (limited to 'src/fix-ng')
-rw-r--r-- | src/fix-ng/fix.sdf | 6 | ||||
-rw-r--r-- | src/fix-ng/parser.cc | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/fix-ng/fix.sdf b/src/fix-ng/fix.sdf index 30f9306863c9..54f5d5266f79 100644 --- a/src/fix-ng/fix.sdf +++ b/src/fix-ng/fix.sdf @@ -91,6 +91,10 @@ exports lexical syntax [a-zA-Z\_][a-zA-Z0-9\_\']* -> Id "rec" -> Id {reject} + "let" -> Id {reject} + "if" -> Id {reject} + "then" -> Id {reject} + "else" -> Id {reject} "true" -> Id {reject} "false" -> Id {reject} "assert" -> Id {reject} @@ -108,6 +112,7 @@ exports lexical restrictions Id -/- [a-zA-Z0-9\_\'] Int -/- [0-9] + Path -/- [a-zA-Z0-9\.\_\-\+\/] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -126,6 +131,7 @@ exports "//" Uauthority Uabspath? -> Unetpath "/" Upathsegments -> Uabspath + "//" Uuric* -> Uabspath {reject} Urelsegment Uabspath? -> Urelpath (Uunreserved | Uescaped | [\;\@\&\=\+\$\,])+ -> Urelsegment diff --git a/src/fix-ng/parser.cc b/src/fix-ng/parser.cc index 43678ec9719d..93afe0627ad8 100644 --- a/src/fix-ng/parser.cc +++ b/src/fix-ng/parser.cc @@ -109,6 +109,7 @@ Expr parseExprFromFile(Path path) SG_OUTPUT_ON(); SG_ASFIX2ME_ON(); SG_AMBIGUITY_ERROR_ON(); + SG_FILTER_OFF(); initialised = true; } |