extended unix grammars with character-based spelling

This commit is contained in:
aarne
2006-04-13 14:19:27 +00:00
parent 256b593ae5
commit 3d7c4e80d7
10 changed files with 271 additions and 31 deletions

View File

@@ -1,8 +1,8 @@
--# -path=.:prelude
concrete UnixEng of Unix = open Prelude in {
concrete UnixEng of Unix = CharEng ** open Prelude in {
flags unlexer=textlit ; lexer=textlit ;
flags lexer=text ;
{-
lincat
@@ -13,6 +13,9 @@ concrete UnixEng of Unix = open Prelude in {
-}
lin
CommWords w = w ;
Redirect = infixSS (optStr "and" ++ ["write the result to"]) ;
Pipe = infixSS "then" ;
Comm c = c ;
@@ -23,8 +26,18 @@ concrete UnixEng of Unix = open Prelude in {
Copy x y = ss ("copy" ++ x.s ++ "to" ++ y.s) ;
Linecount = prefixSS ["how many lines has"] ;
Wordcount = prefixSS ["how many words has"] ;
Grep x y = ss (["show the lines containing"] ++ x.s ++ "in" ++ y.s) ;
Cat = prefixSS ["show the contents of"] ;
Name x = x ;
It = ss "it" ;
FileChars = prefixSS (optStr ["the file"]) ;
WordChars = prefixSS (optStr ["the word"]) ;
FileSuffix = prefixSS ["all files ending with"] ;
FilePrefix = prefixSS ["all files beginning with"] ;
BaseWord w = w ;
ConsWord = infixSS "space" ;
}