summaryrefslogtreecommitdiff
path: root/examples/unix/UnixUni.gf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2006-04-13 14:19:27 +0000
committeraarne <aarne@cs.chalmers.se>2006-04-13 14:19:27 +0000
commit8edb88dcabe9d5a23c6efcedcd056cd16194f4a4 (patch)
tree501f8408b8f0b76a5fd5d5f058da7b305dfbe395 /examples/unix/UnixUni.gf
parent47dedcf256976495f405a802920fa3012f683a52 (diff)
extended unix grammars with character-based spelling
Diffstat (limited to 'examples/unix/UnixUni.gf')
-rw-r--r--examples/unix/UnixUni.gf19
1 files changed, 16 insertions, 3 deletions
diff --git a/examples/unix/UnixUni.gf b/examples/unix/UnixUni.gf
index e0898853f..b1b220824 100644
--- a/examples/unix/UnixUni.gf
+++ b/examples/unix/UnixUni.gf
@@ -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 ;
+
}