* Do not filter when parsing. This is much faster.

* Add some rejections and lexical restrictions to the grammar to make
  this work.
This commit is contained in:
Eelco Dolstra 2003-11-10 11:00:38 +00:00
parent 15801c88fa
commit 06ae269c7c
2 changed files with 7 additions and 0 deletions

View file

@ -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

View file

@ -109,6 +109,7 @@ Expr parseExprFromFile(Path path)
SG_OUTPUT_ON();
SG_ASFIX2ME_ON();
SG_AMBIGUITY_ERROR_ON();
SG_FILTER_OFF();
initialised = true;
}