aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/nix.sdf
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-07-16 20:43:58 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-07-16 20:43:58 +0000
commit6f91f02f757f069b939b09eed51ff95de850b2c9 (patch)
treea4a0f88354f8b88bb9a64225b9ba003bc10cd810 /src/libexpr/nix.sdf
parent9590009a74a99100f6718f108098c066e4a0204f (diff)
* Make the rejects a bit more compact.
* Add lexical restrictions for keywords.
Diffstat (limited to 'src/libexpr/nix.sdf')
-rw-r--r--src/libexpr/nix.sdf9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/libexpr/nix.sdf b/src/libexpr/nix.sdf
index 7c4b2e3c5..1940b5afc 100644
--- a/src/libexpr/nix.sdf
+++ b/src/libexpr/nix.sdf
@@ -96,13 +96,7 @@ exports
sorts Id Int Str Path PathComp Uri
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}
- "assert" -> Id {reject}
- "inherit" -> Id {reject}
+ "rec" | "let" | "if" | "then" | "else" | "assert" | "with" | "inherit" -> Id {reject}
[0-9]+ -> Int
@@ -120,6 +114,7 @@ exports
Int -/- [0-9]
Path -/- [a-zA-Z0-9\.\_\-\+\/]
Uri -/- [a-zA-Z0-9\%\/\?\:\@\&\=\+\$\,\-\_\.\!\~\*\']
+ "rec" "let" "if" "then" "else" "assert" "with" "inherit" -/- [A-Za-z0-9\_\']
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%