summaryrefslogtreecommitdiff
path: root/src/GF/Command/GFShell.cf
blob: 1f5a9fa6d38c72b82e77845e094944d0bd215676 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--entrypoints CommandLine, Tree ;

CLine.   CommandLine ::= [Pipe] ;
CEmpty.  CommandLine ::= ;
PComm.   Pipe        ::= [Command] ;
Comm.    Command     ::= Ident [Option] Argument ;
CNoarg.  Command     ::= Ident [Option] ;
OOpt.    Option      ::= "-" Ident ;
OFlag.   Option      ::= "-" Ident "=" Value ;
VId.     Value       ::= Ident ;
VInt.    Value       ::= Integer ;
ATree.   Argument    ::= Tree ;

TApp.    Tree1       ::= Ident [Tree2] ;
TAbs.    Tree        ::= "\\" [Ident] "->" Tree ;
TId.     Tree2       ::= Ident ;
TInt.    Tree2       ::= Integer ; 
TStr.    Tree2       ::= String ; 
TFloat.  Tree2       ::= Double ; 

coercions Tree 2 ;

separator nonempty Pipe ";" ;
separator nonempty Command "|" ;
terminator Option "" ;
terminator nonempty Tree2 "" ;
terminator nonempty Ident "," ;