about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-07-16T20·43+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-07-16T20·43+0000
commit6f91f02f757f069b939b09eed51ff95de850b2c9 (patch)
treea4a0f88354f8b88bb9a64225b9ba003bc10cd810 /src
parent9590009a74a99100f6718f108098c066e4a0204f (diff)
* Make the rejects a bit more compact.
* Add lexical restrictions for keywords.

Diffstat (limited to 'src')
-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 7c4b2e3c56c5..1940b5afc8fd 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\_\']
 
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%