extended unix grammars with character-based spelling

This commit is contained in:
aarne
2006-04-13 14:19:27 +00:00
parent 47dedcf256
commit 8edb88dcab
7 changed files with 255 additions and 26 deletions

View File

@@ -1,8 +1,8 @@
--# -path=.:prelude
concrete UnixUni of Unix = open Prelude in {
concrete UnixUni of Unix = CharUni ** open Prelude in {
flags unlexer=codelit ; lexer=codelit ;
flags unlexer=bind ;
{-
lincat
@@ -13,6 +13,9 @@ concrete UnixUni of Unix = open Prelude in {
-}
lin
CommWords w = w ;
Redirect = infixSS ">" ;
Pipe = infixSS "|" ;
Comm c = c ;
@@ -23,8 +26,18 @@ concrete UnixUni of Unix = open Prelude in {
Copy x y = ss ("cp" ++ x.s ++ y.s) ;
Linecount = prefixSS ["wc -l"] ;
Wordcount = prefixSS ["wc -w"] ;
Grep x y = ss ("grep" ++ x.s ++ y.s) ;
Cat = prefixSS "cat" ;
Name x = x ;
It = ss [] ;
FileChars c = c ;
WordChars c = c ;
FileSuffix = prefixSS ["* &+"] ;
FilePrefix = postfixSS ["&+ *"] ;
BaseWord w = w ;
ConsWord = cc2 ;
}