mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-17 16:59:34 -06:00
extended unix grammars with character-based spelling
This commit is contained in:
@@ -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" ;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user