1
0
forked from GitHub/gf-core

unix command grammar started

This commit is contained in:
aarne
2006-04-12 21:14:32 +00:00
parent a42a232c57
commit e07d9dea34
3 changed files with 84 additions and 0 deletions

30
examples/unix/UnixEng.gf Normal file
View File

@@ -0,0 +1,30 @@
--# -path=.:prelude
concrete UnixEng of Unix = open Prelude in {
flags unlexer=textlit ; lexer=textlit ;
{-
lincat
Line ;
[Command] {1} ;
Command ;
File ;
-}
lin
Pipe = infixSS "then" ;
Comm c = c ;
WhatTime = ss ["what time is it"] ;
WhatDate = ss ["what date is it"] ;
WhereNow = ss ["where am I now"] ;
Remove = prefixSS "remove" ;
Copy x y = ss ("copy" ++ x.s ++ "to" ++ y.s) ;
Linecount = prefixSS ["how many lines has"] ;
Wordcount = prefixSS ["how many words has"] ;
Name x = x ;
It = ss "it" ;
}