mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-25 02:38:55 -06:00
*** empty log message ***
This commit is contained in:
12
lib/resource-0.6/abstract/TestHTML.gf
Normal file
12
lib/resource-0.6/abstract/TestHTML.gf
Normal file
@@ -0,0 +1,12 @@
|
||||
abstract TestHTML = Structural ** {
|
||||
|
||||
-- a random sample of lexicon to test resource grammar with
|
||||
|
||||
cat HTMLdoc; HTMLtag;
|
||||
|
||||
fun
|
||||
htmlText: HTMLtag -> HTMLtag -> HTMLdoc;
|
||||
head, body: HTMLtag;
|
||||
|
||||
} ;
|
||||
|
||||
16
lib/resource-0.6/russian/TestHTMLrus.gf
Normal file
16
lib/resource-0.6/russian/TestHTMLrus.gf
Normal file
@@ -0,0 +1,16 @@
|
||||
-- use this path to read the grammar from the same directory
|
||||
--# -path=.:../abstract:../../prelude
|
||||
concrete TestHTMLrus of TestHTML = StructuralRus ** open SyntaxRus in {
|
||||
|
||||
flags
|
||||
coding=utf8 ;
|
||||
startcat=HTMLdoc ; lexer=text ; parser=chart ; unlexer=text ;
|
||||
|
||||
-- a random sample from the lexicon
|
||||
|
||||
lin
|
||||
body = {s= "<body> " ++"Это тело" ++ " </body>"};
|
||||
head = {s= "<head> " ++ "Это голова \" ++ " </head>"};
|
||||
htmlText x y = {s= " <html> "++ x.s ++ " " ++ y.s ++ " </html>"};
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user