forked from GitHub/gf-rgl
*** empty log message ***
This commit is contained in:
12
resource-0.6/abstract/TestHTML.gf
Normal file
12
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
resource-0.6/russian/TestHTMLrus.gf
Normal file
16
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