* 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:
parent
15801c88fa
commit
06ae269c7c
|
@ -91,6 +91,10 @@ exports
|
||||||
lexical syntax
|
lexical syntax
|
||||||
[a-zA-Z\_][a-zA-Z0-9\_\']* -> Id
|
[a-zA-Z\_][a-zA-Z0-9\_\']* -> Id
|
||||||
"rec" -> Id {reject}
|
"rec" -> Id {reject}
|
||||||
|
"let" -> Id {reject}
|
||||||
|
"if" -> Id {reject}
|
||||||
|
"then" -> Id {reject}
|
||||||
|
"else" -> Id {reject}
|
||||||
"true" -> Id {reject}
|
"true" -> Id {reject}
|
||||||
"false" -> Id {reject}
|
"false" -> Id {reject}
|
||||||
"assert" -> Id {reject}
|
"assert" -> Id {reject}
|
||||||
|
@ -108,6 +112,7 @@ exports
|
||||||
lexical restrictions
|
lexical restrictions
|
||||||
Id -/- [a-zA-Z0-9\_\']
|
Id -/- [a-zA-Z0-9\_\']
|
||||||
Int -/- [0-9]
|
Int -/- [0-9]
|
||||||
|
Path -/- [a-zA-Z0-9\.\_\-\+\/]
|
||||||
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
@ -126,6 +131,7 @@ exports
|
||||||
|
|
||||||
"//" Uauthority Uabspath? -> Unetpath
|
"//" Uauthority Uabspath? -> Unetpath
|
||||||
"/" Upathsegments -> Uabspath
|
"/" Upathsegments -> Uabspath
|
||||||
|
"//" Uuric* -> Uabspath {reject}
|
||||||
Urelsegment Uabspath? -> Urelpath
|
Urelsegment Uabspath? -> Urelpath
|
||||||
|
|
||||||
(Uunreserved | Uescaped | [\;\@\&\=\+\$\,])+ -> Urelsegment
|
(Uunreserved | Uescaped | [\;\@\&\=\+\$\,])+ -> Urelsegment
|
||||||
|
|
|
@ -109,6 +109,7 @@ Expr parseExprFromFile(Path path)
|
||||||
SG_OUTPUT_ON();
|
SG_OUTPUT_ON();
|
||||||
SG_ASFIX2ME_ON();
|
SG_ASFIX2ME_ON();
|
||||||
SG_AMBIGUITY_ERROR_ON();
|
SG_AMBIGUITY_ERROR_ON();
|
||||||
|
SG_FILTER_OFF();
|
||||||
|
|
||||||
initialised = true;
|
initialised = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue