about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorSander van der Burg <s.vanderburg@tudelft.nl>2008-06-04T14·36+0000
committerSander van der Burg <s.vanderburg@tudelft.nl>2008-06-04T14·36+0000
commitc41a3ec3a9ebf0bfde5fe23fa10d800afe2d9bd9 (patch)
tree8f197564ecd532320182c0147729e4f5228d5dbf /src
parentbd955e15e1aac8a1490a680b9f5cfcce29f2331a (diff)
First attempt to update Nix SDF grammar to match the actual bison grammar
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/nix.sdf6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libexpr/nix.sdf b/src/libexpr/nix.sdf
index 2b99cf09a472..42fb21c3baad 100644
--- a/src/libexpr/nix.sdf
+++ b/src/libexpr/nix.sdf
@@ -7,7 +7,7 @@ definition
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% Top level syntax.
 
-module Nix
+module Main
 imports Nix-Exprs Nix-Layout
 
 
@@ -41,6 +41,7 @@ exports
     "with" Expr ";" Expr -> Expr {cons("With")}
 
     "rec" "{" Bind* "}" -> Expr {cons("Rec")}
+    "let" Bind* "in" Expr -> Expr {cons("Let")}
     "let" "{" Bind* "}" -> Expr {cons("LetRec")}
     "{" Bind* "}" -> Expr {cons("Attrs")}
 
@@ -105,7 +106,8 @@ exports
 
     [0-9]+ -> Int
 
-    "\"" ~[\n\"]* "\"" -> Str
+    "\"" (~[\"\\] | ("\\" ~[]) )* "\"" -> Str
+    "''" (~[\"\\] | ("\\" ~[]) )* "''" -> Str
 
     [a-zA-Z0-9\.\_\-\+]* ("/"[a-zA-Z0-9\.\_\-\+]+)+ -> Path