forked from lix-project/lix
* Make the rejects a bit more compact.
* Add lexical restrictions for keywords.
This commit is contained in:
parent
9590009a74
commit
6f91f02f75
|
@ -96,13 +96,7 @@ exports
|
||||||
sorts Id Int Str Path PathComp Uri
|
sorts Id Int Str Path PathComp Uri
|
||||||
lexical syntax
|
lexical syntax
|
||||||
[a-zA-Z\_][a-zA-Z0-9\_\']* -> Id
|
[a-zA-Z\_][a-zA-Z0-9\_\']* -> Id
|
||||||
"rec" -> Id {reject}
|
"rec" | "let" | "if" | "then" | "else" | "assert" | "with" | "inherit" -> Id {reject}
|
||||||
"let" -> Id {reject}
|
|
||||||
"if" -> Id {reject}
|
|
||||||
"then" -> Id {reject}
|
|
||||||
"else" -> Id {reject}
|
|
||||||
"assert" -> Id {reject}
|
|
||||||
"inherit" -> Id {reject}
|
|
||||||
|
|
||||||
[0-9]+ -> Int
|
[0-9]+ -> Int
|
||||||
|
|
||||||
|
@ -120,6 +114,7 @@ exports
|
||||||
Int -/- [0-9]
|
Int -/- [0-9]
|
||||||
Path -/- [a-zA-Z0-9\.\_\-\+\/]
|
Path -/- [a-zA-Z0-9\.\_\-\+\/]
|
||||||
Uri -/- [a-zA-Z0-9\%\/\?\:\@\&\=\+\$\,\-\_\.\!\~\*\']
|
Uri -/- [a-zA-Z0-9\%\/\?\:\@\&\=\+\$\,\-\_\.\!\~\*\']
|
||||||
|
"rec" "let" "if" "then" "else" "assert" "with" "inherit" -/- [A-Za-z0-9\_\']
|
||||||
|
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
Loading…
Reference in a new issue