Skip to content
Snippets Groups Projects
Commit 6f91f02f authored by Eelco Dolstra's avatar Eelco Dolstra
Browse files

* Make the rejects a bit more compact.

* Add lexical restrictions for keywords.
parent 9590009a
No related branches found
No related tags found
No related merge requests found
...@@ -96,13 +96,7 @@ exports ...@@ -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 ...@@ -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\_\']
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment