mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-14 02:06:16 +02:00
First attempt to update Nix SDF grammar to match the actual bison grammar
This commit is contained in:
parent
bd955e15e1
commit
c41a3ec3a9
1 changed files with 4 additions and 2 deletions
|
@ -7,7 +7,7 @@ definition
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
%% Top level syntax.
|
%% Top level syntax.
|
||||||
|
|
||||||
module Nix
|
module Main
|
||||||
imports Nix-Exprs Nix-Layout
|
imports Nix-Exprs Nix-Layout
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@ exports
|
||||||
"with" Expr ";" Expr -> Expr {cons("With")}
|
"with" Expr ";" Expr -> Expr {cons("With")}
|
||||||
|
|
||||||
"rec" "{" Bind* "}" -> Expr {cons("Rec")}
|
"rec" "{" Bind* "}" -> Expr {cons("Rec")}
|
||||||
|
"let" Bind* "in" Expr -> Expr {cons("Let")}
|
||||||
"let" "{" Bind* "}" -> Expr {cons("LetRec")}
|
"let" "{" Bind* "}" -> Expr {cons("LetRec")}
|
||||||
"{" Bind* "}" -> Expr {cons("Attrs")}
|
"{" Bind* "}" -> Expr {cons("Attrs")}
|
||||||
|
|
||||||
|
@ -105,7 +106,8 @@ exports
|
||||||
|
|
||||||
[0-9]+ -> Int
|
[0-9]+ -> Int
|
||||||
|
|
||||||
"\"" ~[\n\"]* "\"" -> Str
|
"\"" (~[\"\\] | ("\\" ~[]) )* "\"" -> Str
|
||||||
|
"''" (~[\"\\] | ("\\" ~[]) )* "''" -> Str
|
||||||
|
|
||||||
[a-zA-Z0-9\.\_\-\+]* ("/"[a-zA-Z0-9\.\_\-\+]+)+ -> Path
|
[a-zA-Z0-9\.\_\-\+]* ("/"[a-zA-Z0-9\.\_\-\+]+)+ -> Path
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue