From 6f91f02f757f069b939b09eed51ff95de850b2c9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 16 Jul 2005 20:43:58 +0000 Subject: * Make the rejects a bit more compact. * Add lexical restrictions for keywords. --- src/libexpr/nix.sdf | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src') 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\_\'] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -- cgit 1.4.1