Nix Language Reference
Grammar
Expressions
Expr
ExprFunction
'{' '}' ':'
|
ExprAssert
'assert' ';'
|
ExprIf
'if' 'then'
'else'
|
ExprOp
'!'
|
'=='
|
'!='
|
'&&'
|
'||'
|
'->'
|
'//'
|
'~'
|
'?'
|
ExprApp
'.'
|
ExprSelect
|
ExprSimple
|
|
|
|
|
'true' | 'false' | 'null'
|
'(' ')'
|
'{' * '}'
|
'let' '{' * '}'
|
'rec' '{' * '}'
|
'[' * ']'
Bind
'=' ';'
|
'inherit' ('(' ')')? * ';'
Formals
','
|
Formal
|
'?'
Terminals
Id
[a-zA-Z\_][a-zA-Z0-9\_\']*
Int
[0-9]+
Str
\"[^\n\"]*\"
Path
[a-zA-Z0-9\.\_\-\+]*(\/[a-zA-Z0-9\.\_\-\+]+)+
Uri
[a-zA-Z][a-zA-Z0-9\+\-\.]*\:[a-zA-Z0-9\%\/\?\:\@\&\=\+\$\,\-\_\.\!\~\*\']+
Whitespace
[ \t\n]+
|
\#[^\n]*
|
\/\*(.|\n)*\*\/