complete resource document

This commit is contained in:
aarne
2006-06-13 10:07:16 +00:00
parent 4230cd9d3f
commit 784a1db90a
38 changed files with 6134 additions and 473 deletions

View File

@@ -6,21 +6,25 @@
</HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1> The GF Prelude</H1>
<FONT SIZE="4">
<I>Last update: 2006-02-25 22:31:06 CET</I><BR>
<I>Author: </I><BR>
Last update: Tue Jun 13 11:42:46 2006
</FONT></CENTER>
<P></P>
<HR NOSHADE SIZE=1>
<P></P>
<UL>
<LI><A HREF="#toc1">The GF Prelude</A>
<UL>
<LI><A HREF="#toc1">Strings, records, and tables</A>
<LI><A HREF="#toc2">Optional elements</A>
<LI><A HREF="#toc3">Infixes. prefixes, and postfixes</A>
<LI><A HREF="#toc4">Booleans</A>
<LI><A HREF="#toc5">High-level acces to Predef operations</A>
<LI><A HREF="#toc6">Lexer-related operations</A>
<LI><A HREF="#toc7">Miscellaneous</A>
<LI><A HREF="#toc2">Strings, records, and tables</A>
<LI><A HREF="#toc3">Optional elements</A>
<LI><A HREF="#toc4">Infixes. prefixes, and postfixes</A>
<LI><A HREF="#toc5">Booleans</A>
<LI><A HREF="#toc6">High-level acces to Predef operations</A>
<LI><A HREF="#toc7">Lexer-related operations</A>
<LI><A HREF="#toc8">Miscellaneous</A>
</UL>
</UL>
<P></P>
<HR NOSHADE SIZE=1>
@@ -30,6 +34,8 @@ Produced by
gfdoc - a rudimentary GF document generator.
(c) Aarne Ranta (<A HREF="mailto:aarne@cs.chalmers.se">aarne@cs.chalmers.se</A>) 2002 under GNU GPL.
</P>
<A NAME="toc1"></A>
<H1>The GF Prelude</H1>
<P>
This file defines some prelude facilities usable in all grammars.
</P>
@@ -39,7 +45,7 @@ This file defines some prelude facilities usable in all grammars.
oper
</PRE>
<P></P>
<A NAME="toc1"></A>
<A NAME="toc2"></A>
<H2>Strings, records, and tables</H2>
<PRE>
SS : Type = {s : Str} ;
@@ -68,7 +74,7 @@ Discontinuous constituents.
sd2 : (_,_ : Str) -&gt; SD2 = \x,y -&gt; {s1 = x ; s2 = y} ;
</PRE>
<P></P>
<A NAME="toc2"></A>
<A NAME="toc3"></A>
<H2>Optional elements</H2>
<P>
Missing form.
@@ -100,7 +106,7 @@ Parametric order between two strings.
if_then_Str pr (x ++ y) (y ++ x) ;
</PRE>
<P></P>
<A NAME="toc3"></A>
<A NAME="toc4"></A>
<H2>Infixes. prefixes, and postfixes</H2>
<P>
Fixes with precedences are defined in <A HREF="Precedence.html">Precedence</A>.
@@ -112,7 +118,7 @@ Fixes with precedences are defined in <A HREF="Precedence.html">Precedence</A>.
embedSS : Str -&gt; Str -&gt; SS -&gt; SS = \f,g,x -&gt; ss (f ++ x.s ++ g) ;
</PRE>
<P></P>
<A NAME="toc4"></A>
<A NAME="toc5"></A>
<H2>Booleans</H2>
<PRE>
param Bool = True | False ;
@@ -148,7 +154,7 @@ Interface to internal booleans
last : Tok -&gt; Tok = Predef.dp 1 ;
</PRE>
<P></P>
<A NAME="toc5"></A>
<A NAME="toc6"></A>
<H2>High-level acces to Predef operations</H2>
<PRE>
isNil : Tok -&gt; Bool = \b -&gt; pbool2bool (Predef.eqStr [] b) ;
@@ -157,7 +163,7 @@ Interface to internal booleans
case Predef.eqStr t u of {Predef.PTrue =&gt; a ; Predef.PFalse =&gt; b} ;
</PRE>
<P></P>
<A NAME="toc6"></A>
<A NAME="toc7"></A>
<H2>Lexer-related operations</H2>
<P>
Bind together two tokens in some lexers, either obligatorily or optionally
@@ -185,7 +191,7 @@ These should be hidden, and never changed since they are hardcoded in (un)lexers
CAPIT : Str = "&amp;|" ;
</PRE>
<P></P>
<A NAME="toc7"></A>
<A NAME="toc8"></A>
<H2>Miscellaneous</H2>
<P>
Identity function