about summary refs log tree commit diff
path: root/src/libexpr
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-07-16T21·38+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-07-16T21·38+0000
commit6f82a78de7ac02ec5665f17248c4fe98bd4f5847 (patch)
treeca0a74ce378b48c96847abecb141fda0affbb3bb /src/libexpr
parent6f91f02f757f069b939b09eed51ff95de850b2c9 (diff)
* Define paths using regexps, as is done in the Flex definition.
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/nix.sdf7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libexpr/nix.sdf b/src/libexpr/nix.sdf
index 1940b5afc8fd..19e9bd1e92db 100644
--- a/src/libexpr/nix.sdf
+++ b/src/libexpr/nix.sdf
@@ -93,7 +93,7 @@ exports
 
 module Nix-Lexicals
 exports
-  sorts Id Int Str Path PathComp Uri
+  sorts Id Int Str Path Uri
   lexical syntax
     [a-zA-Z\_][a-zA-Z0-9\_\']* -> Id
     "rec" | "let" | "if" | "then" | "else" | "assert" | "with" | "inherit" -> Id {reject}
@@ -102,10 +102,7 @@ exports
 
     "\"" ~[\n\"]* "\"" -> Str
 
-    "." ("/" PathComp)+ -> Path
-    ".." ("/" PathComp)+ -> Path
-    ("/" PathComp)+ -> Path
-    [a-zA-Z0-9\.\_\-\+]+ -> PathComp
+    [a-zA-Z0-9\.\_\-\+]* ("/"[a-zA-Z0-9\.\_\-\+]+)+ -> Path
 
     [a-zA-Z] [a-zA-Z0-9\+\-\.]* ":" [a-zA-Z0-9\%\/\?\:\@\&\=\+\$\,\-\_\.\!\~\*\']* -> Uri