1
0
forked from GitHub/gf-core

Make the GF web site more mobile friendly

Most of the pages on the GF web site have an exemplary simple design,
with just one column of text. This make them adapt exceptionally
well to screens of different sizes. In particular, they should be
easy to read even on smartphones.

However, smartphone browsers like Mobile Safari and the default
Android Browser assume that pages do *not* adapt well to small
screens, so by default they emulate a big screen, forcing the user
to zoom in to a part of the page to be able to read it. By adding
the meta tag

  <meta name = "viewport" content = "width = device-width">

the big screen emulation can be turned off, allowing pages to be
formatted to fit the actual screen size and text to be displayed
at a readable size.
This commit is contained in:
hallgren
2012-09-28 20:26:13 +00:00
parent 253ddde6c3
commit 0dbe9a6d50
15 changed files with 128 additions and 24 deletions

View File

@@ -3,6 +3,7 @@
<HEAD> <HEAD>
<TITLE>Grammatical Framework Demos</TITLE> <TITLE>Grammatical Framework Demos</TITLE>
<link rel=stylesheet href="../css/style.css"> <link rel=stylesheet href="../css/style.css">
<meta name = "viewport" content = "width = device-width">
<link rel=top href="../" title="GF"> <link rel=top href="../" title="GF">
</HEAD> </HEAD>

View File

@@ -1,19 +1,20 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML> <HTML>
<HEAD> <HEAD>
<META NAME="generator" CONTENT="http://txt2tags.sf.net"> <META NAME="generator" CONTENT="http://txt2tags.org">
<LINK REL="stylesheet" TYPE="text/css" HREF="../css/style.css"> <LINK REL="stylesheet" TYPE="text/css" HREF="../css/style.css">
<TITLE>Grammatical Framework Bibliography</TITLE> <meta name = "viewport" content = "width = device-width"><TITLE>Grammatical Framework Bibliography</TITLE>
</HEAD><BODY BGCOLOR="white" TEXT="black"> </HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1><a href="../"><IMG src="../doc/Logos/gf0.png"></a>Grammatical Framework Bibliography</H1> <CENTER>
<FONT SIZE="4"> <H1><a href="../"><IMG src="../doc/Logos/gf0.png"></a>Grammatical Framework Bibliography</H1>
<I>Aarne Ranta</I><BR> <FONT SIZE="4"><I>Aarne Ranta</I></FONT><BR>
Wed Dec 14 18:13:03 2011 <FONT SIZE="4">Fri Sep 28 22:11:33 2012</FONT>
</FONT></CENTER> </CENTER>
<P></P> <P></P>
<HR NOSHADE SIZE=1> <HR NOSHADE SIZE=1>
<P></P> <P></P>
<UL> <UL>
<LI><A HREF="#toc1">Publications on GF</A> <LI><A HREF="#toc1">Publications on GF</A>
<LI><A HREF="#toc2">Background for GF</A> <LI><A HREF="#toc2">Background for GF</A>
@@ -22,8 +23,10 @@ Wed Dec 14 18:13:03 2011
<P></P> <P></P>
<HR NOSHADE SIZE=1> <HR NOSHADE SIZE=1>
<P></P> <P></P>
<A NAME="toc1"></A> <A NAME="toc1"></A>
<H2>Publications on GF</H2> <H2>Publications on GF</H2>
<P> <P>
In reverse temporal order: In reverse temporal order:
</P> </P>
@@ -773,8 +776,10 @@ The type theory and type checker of GF.
<br> <br>
<I>Concise theoretical presentation of GF, using the old notation prior to v0.9</I>. <I>Concise theoretical presentation of GF, using the old notation prior to v0.9</I>.
</P> </P>
<A NAME="toc2"></A> <A NAME="toc2"></A>
<H2>Background for GF</H2> <H2>Background for GF</H2>
<P> <P>
In alphabetical order: In alphabetical order:
</P> </P>
@@ -864,6 +869,6 @@ A. Ranta.
<I>Interprets Lambek Calculus in type theory and defines some extensions</I>. <I>Interprets Lambek Calculus in type theory and defines some extensions</I>.
</P> </P>
<!-- html code generated by txt2tags 2.5 (http://txt2tags.sf.net) --> <!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
<!-- cmdline: txt2tags -thtml ./doc/gf-bibliography.t2t --> <!-- cmdline: txt2tags -thtml ./doc/gf-bibliography.t2t -->
</BODY></HTML> </BODY></HTML>

View File

@@ -9,6 +9,7 @@ Aarne Ranta
%!style:../css/style.css %!style:../css/style.css
%!target:html %!target:html
%!options(html): --toc %!options(html): --toc
%!postproc(html): <TITLE> <meta name = "viewport" content = "width = device-width"><TITLE>
%!postproc(html): #BR <br> %!postproc(html): #BR <br>
%!postproc(html): <H1> <H1><a href="../"><IMG src="../doc/Logos/gf0.png"></a> %!postproc(html): <H1> <H1><a href="../"><IMG src="../doc/Logos/gf0.png"></a>

View File

@@ -3,6 +3,7 @@ Editor modes & IDE integration for GF
%!style:../css/style.css %!style:../css/style.css
%!options(html): --toc %!options(html): --toc
%!postproc(html): <TITLE> <meta name = "viewport" content = "width = device-width"><TITLE>
%!postproc(html): <H1> <H1><a href="../"><IMG src="../doc/Logos/gf0.png"></a> %!postproc(html): <H1> <H1><a href="../"><IMG src="../doc/Logos/gf0.png"></a>
We collect GF modes for various editors on this page. Contributions are We collect GF modes for various editors on this page. Contributions are

View File

@@ -4,6 +4,7 @@
<head> <head>
<title>GF People</title> <title>GF People</title>
<link rel=stylesheet href="../css/style.css"> <link rel=stylesheet href="../css/style.css">
<meta name = "viewport" content = "width = device-width">
</head> </head>
<body> <body>

View File

@@ -3,6 +3,7 @@
<head> <head>
<title>GF Quickstart</title> <title>GF Quickstart</title>
<link rel=stylesheet href="../css/style.css"> <link rel=stylesheet href="../css/style.css">
<meta name = "viewport" content = "width = device-width">
</head> </head>

View File

@@ -1,19 +1,20 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML> <HTML>
<HEAD> <HEAD>
<META NAME="generator" CONTENT="http://txt2tags.sf.net"> <META NAME="generator" CONTENT="http://txt2tags.org">
<LINK REL="stylesheet" TYPE="text/css" HREF="../css/style.css"> <LINK REL="stylesheet" TYPE="text/css" HREF="../css/style.css">
<TITLE>GF Quick Reference</TITLE> <meta name = "viewport" content = "width = device-width"><TITLE>GF Quick Reference</TITLE>
</HEAD><BODY BGCOLOR="white" TEXT="black"> </HEAD><BODY BGCOLOR="white" TEXT="black">
<P ALIGN="center"><CENTER><H1>GF Quick Reference</H1> <CENTER>
<FONT SIZE="4"> <H1><a href="../"><IMG src="../doc/Logos/gf0.png"></a>GF Quick Reference</H1>
<I>Aarne Ranta</I><BR> <FONT SIZE="4"><I>Aarne Ranta</I></FONT><BR>
April 4, 2006 <FONT SIZE="4">April 4, 2006</FONT>
</FONT></CENTER> </CENTER>
<P></P> <P></P>
<HR NOSHADE SIZE=1> <HR NOSHADE SIZE=1>
<P></P> <P></P>
<UL> <UL>
<LI><A HREF="#toc1">A complete example</A> <LI><A HREF="#toc1">A complete example</A>
<LI><A HREF="#toc2">Modules and files</A> <LI><A HREF="#toc2">Modules and files</A>
@@ -41,8 +42,10 @@ Help on GF commands is obtained on line by the
help command (<CODE>help</CODE>), and help on invoking help command (<CODE>help</CODE>), and help on invoking
GF with (<CODE>gf -help</CODE>). GF with (<CODE>gf -help</CODE>).
</P> </P>
<A NAME="toc1"></A> <A NAME="toc1"></A>
<H3>A complete example</H3> <H3>A complete example</H3>
<P> <P>
This is a complete example of a GF grammar divided This is a complete example of a GF grammar divided
into three modules in files. The grammar recognizes the into three modules in files. The grammar recognizes the
@@ -51,6 +54,7 @@ phrases <I>one pizza</I> and <I>two pizzas</I>.
<P> <P>
File <CODE>Order.gf</CODE>: File <CODE>Order.gf</CODE>:
</P> </P>
<PRE> <PRE>
abstract Order = { abstract Order = {
cat cat
@@ -61,9 +65,11 @@ File <CODE>Order.gf</CODE>:
Pizza : Item ; Pizza : Item ;
} }
</PRE> </PRE>
<P> <P>
File <CODE>OrderEng.gf</CODE> (the top file): File <CODE>OrderEng.gf</CODE> (the top file):
</P> </P>
<PRE> <PRE>
--# -path=.:prelude --# -path=.:prelude
concrete OrderEng of Order = concrete OrderEng of Order =
@@ -78,9 +84,11 @@ File <CODE>OrderEng.gf</CODE> (the top file):
Pizza = regNoun "pizza" ; Pizza = regNoun "pizza" ;
} }
</PRE> </PRE>
<P> <P>
File <CODE>Res.gf</CODE>: File <CODE>Res.gf</CODE>:
</P> </P>
<PRE> <PRE>
resource Res = open Prelude in { resource Res = open Prelude in {
param Num = Sg | Pl ; param Num = Sg | Pl ;
@@ -92,18 +100,21 @@ File <CODE>Res.gf</CODE>:
} ; } ;
} }
</PRE> </PRE>
<P> <P>
To use this example, do To use this example, do
</P> </P>
<PRE> <PRE>
% gf -- in shell: start GF % gf -- in shell: start GF
&gt; i OrderEng.gf -- in GF: import grammar &gt; i OrderEng.gf -- in GF: import grammar
&gt; p "one pizza" -- parse string &gt; p "one pizza" -- parse string
&gt; l Two Pizza -- linearize tree &gt; l Two Pizza -- linearize tree
</PRE> </PRE>
<P></P>
<A NAME="toc2"></A> <A NAME="toc2"></A>
<H3>Modules and files</H3> <H3>Modules and files</H3>
<P> <P>
One module per file. One module per file.
File named <CODE>Foo.gf</CODE> contains module named File named <CODE>Foo.gf</CODE> contains module named
@@ -112,32 +123,39 @@ File named <CODE>Foo.gf</CODE> contains module named
<P> <P>
Each module has the structure Each module has the structure
</P> </P>
<PRE> <PRE>
moduletypename = moduletypename =
Inherits ** -- optional Inherits ** -- optional
open Opens in -- optional open Opens in -- optional
{ Judgements } { Judgements }
</PRE> </PRE>
<P> <P>
Inherits are names of modules of the same type. Inherits are names of modules of the same type.
Inheritance can be restricted: Inheritance can be restricted:
</P> </P>
<PRE> <PRE>
Mo[f,g], -- inherit only f,g from Mo Mo[f,g], -- inherit only f,g from Mo
Lo-[f,g] -- inheris all but f,g from Lo Lo-[f,g] -- inheris all but f,g from Lo
</PRE> </PRE>
<P> <P>
Opens are possible in <CODE>concrete</CODE> and <CODE>resource</CODE>. Opens are possible in <CODE>concrete</CODE> and <CODE>resource</CODE>.
They are names of modules of these two types, possibly They are names of modules of these two types, possibly
qualified: qualified:
</P> </P>
<PRE> <PRE>
(M = Mo), -- refer to f as M.f or Mo.f (M = Mo), -- refer to f as M.f or Mo.f
(Lo = Lo) -- refer to f as Lo.f (Lo = Lo) -- refer to f as Lo.f
</PRE> </PRE>
<P> <P>
Module types and judgements in them: Module types and judgements in them:
</P> </P>
<PRE> <PRE>
abstract A -- cat, fun, def, data abstract A -- cat, fun, def, data
concrete C of A -- lincat, lin, lindef, printname concrete C of A -- lincat, lin, lindef, printname
@@ -154,6 +172,7 @@ Module types and judgements in them:
CI with instantiates a functor by CI with instantiates a functor by
(I = J) instances of open interfaces (I = J) instances of open interfaces
</PRE> </PRE>
<P> <P>
The forms The forms
<CODE>param</CODE>, <CODE>oper</CODE> <CODE>param</CODE>, <CODE>oper</CODE>
@@ -164,15 +183,18 @@ not inherited to extensions.
All modules can moreover have <CODE>flags</CODE> and comments. All modules can moreover have <CODE>flags</CODE> and comments.
Comments have the forms Comments have the forms
</P> </P>
<PRE> <PRE>
-- till the end of line -- till the end of line
{- any number of lines between -} {- any number of lines between -}
--# used for compiler pragmas --# used for compiler pragmas
</PRE> </PRE>
<P> <P>
A <CODE>concrete</CODE> can be opened like a <CODE>resource</CODE>. A <CODE>concrete</CODE> can be opened like a <CODE>resource</CODE>.
It is translated as follows: It is translated as follows:
</P> </P>
<PRE> <PRE>
cat C ---&gt; oper C : Type = cat C ---&gt; oper C : Type =
lincat C = T T ** {lock_C : {}} lincat C = T T ** {lock_C : {}}
@@ -180,12 +202,15 @@ It is translated as follows:
fun f : G -&gt; C ---&gt; oper f : A* -&gt; C* = \g -&gt; fun f : G -&gt; C ---&gt; oper f : A* -&gt; C* = \g -&gt;
lin f = t t g ** {lock_C = &lt;&gt;} lin f = t t g ** {lock_C = &lt;&gt;}
</PRE> </PRE>
<P> <P>
An <CODE>abstract</CODE> can be opened like an <CODE>interface</CODE>. An <CODE>abstract</CODE> can be opened like an <CODE>interface</CODE>.
Any <CODE>concrete</CODE> of it then works as an <CODE>instance</CODE>. Any <CODE>concrete</CODE> of it then works as an <CODE>instance</CODE>.
</P> </P>
<A NAME="toc3"></A> <A NAME="toc3"></A>
<H3>Judgements</H3> <H3>Judgements</H3>
<PRE> <PRE>
cat C -- declare category C cat C -- declare category C
cat C (x:A)(y:B x) -- dependent category C cat C (x:A)(y:B x) -- dependent category C
@@ -213,26 +238,32 @@ Any <CODE>concrete</CODE> of it then works as an <CODE>instance</CODE>.
flags p=v -- set value of flag p flags p=v -- set value of flag p
</PRE> </PRE>
<P> <P>
Judgements are terminated by semicolons (<CODE>;</CODE>). Judgements are terminated by semicolons (<CODE>;</CODE>).
Subsequent judgments of the same form may share the Subsequent judgments of the same form may share the
keyword: keyword:
</P> </P>
<PRE> <PRE>
cat C ; D ; -- same as cat C ; cat D ; cat C ; D ; -- same as cat C ; cat D ;
</PRE> </PRE>
<P> <P>
Judgements can also share RHS: Judgements can also share RHS:
</P> </P>
<PRE> <PRE>
fun f,g : A -- same as fun f : A ; g : A fun f,g : A -- same as fun f : A ; g : A
</PRE> </PRE>
<P></P>
<A NAME="toc4"></A> <A NAME="toc4"></A>
<H3>Types</H3> <H3>Types</H3>
<P> <P>
Abstract syntax (in <CODE>fun</CODE>): Abstract syntax (in <CODE>fun</CODE>):
</P> </P>
<PRE> <PRE>
C -- basic type, if cat C C -- basic type, if cat C
C a b -- basic type for dep. category C a b -- basic type for dep. category
@@ -244,9 +275,11 @@ Abstract syntax (in <CODE>fun</CODE>):
Float -- predefined float type Float -- predefined float type
String -- predefined string type String -- predefined string type
</PRE> </PRE>
<P> <P>
Concrete syntax (in <CODE>lincat</CODE>): Concrete syntax (in <CODE>lincat</CODE>):
</P> </P>
<PRE> <PRE>
Str -- token lists Str -- token lists
P -- parameter type, if param P P -- parameter type, if param P
@@ -259,9 +292,11 @@ Concrete syntax (in <CODE>lincat</CODE>):
{p1 : A ; p2 : B ; p3 : C} {p1 : A ; p2 : B ; p3 : C}
Ints n -- type of n first integers Ints n -- type of n first integers
</PRE> </PRE>
<P> <P>
Resource (in <CODE>oper</CODE>): all those of concrete, plus Resource (in <CODE>oper</CODE>): all those of concrete, plus
</P> </P>
<PRE> <PRE>
Tok -- tokens (subtype of Str) Tok -- tokens (subtype of Str)
A -&gt; B -- functions from A to B A -&gt; B -- functions from A to B
@@ -270,32 +305,40 @@ Resource (in <CODE>oper</CODE>): all those of concrete, plus
PType -- parameter type PType -- parameter type
Type -- any type Type -- any type
</PRE> </PRE>
<P> <P>
As parameter types, one can use any finite type: As parameter types, one can use any finite type:
<CODE>P</CODE> defined in <CODE>param P</CODE>, <CODE>P</CODE> defined in <CODE>param P</CODE>,
<CODE>Ints n</CODE>, and record types of parameter types. <CODE>Ints n</CODE>, and record types of parameter types.
</P> </P>
<A NAME="toc5"></A> <A NAME="toc5"></A>
<H3>Expressions</H3> <H3>Expressions</H3>
<P> <P>
Syntax trees = full function applications Syntax trees = full function applications
</P> </P>
<PRE> <PRE>
f a b -- : C if fun f : A -&gt; B -&gt; C f a b -- : C if fun f : A -&gt; B -&gt; C
1977 -- : Int 1977 -- : Int
3.14 -- : Float 3.14 -- : Float
"foo" -- : String "foo" -- : String
</PRE> </PRE>
<P> <P>
Higher-Order Abstract syntax (HOAS): functions as arguments: Higher-Order Abstract syntax (HOAS): functions as arguments:
</P> </P>
<PRE> <PRE>
F a (\x -&gt; c) -- : C if a : A, c : C (x : B), F a (\x -&gt; c) -- : C if a : A, c : C (x : B),
fun F : A -&gt; (B -&gt; C) -&gt; C fun F : A -&gt; (B -&gt; C) -&gt; C
</PRE> </PRE>
<P> <P>
Tokens and token lists Tokens and token lists
</P> </P>
<PRE> <PRE>
"hello" -- : Tok, singleton Str "hello" -- : Tok, singleton Str
"hello" ++ "world" -- : Str "hello" ++ "world" -- : Str
@@ -303,17 +346,21 @@ Tokens and token lists
"hello" + "world" -- : Tok, computes to "helloworld" "hello" + "world" -- : Tok, computes to "helloworld"
[] -- : Str, empty list [] -- : Str, empty list
</PRE> </PRE>
<P> <P>
Parameters Parameters
</P> </P>
<PRE> <PRE>
Sg -- atomic constructor Sg -- atomic constructor
VPres Sg P2 -- applied constructor VPres Sg P2 -- applied constructor
{n = Sg ; p = P3} -- record of parameters {n = Sg ; p = P3} -- record of parameters
</PRE> </PRE>
<P> <P>
Tables Tables
</P> </P>
<PRE> <PRE>
table { -- by full branches table { -- by full branches
Sg =&gt; "mouse" ; Sg =&gt; "mouse" ;
@@ -334,9 +381,11 @@ Tables
t ! p -- select p from table t t ! p -- select p from table t
case e of {...} -- same as table {...} ! e case e of {...} -- same as table {...} ! e
</PRE> </PRE>
<P> <P>
Records Records
</P> </P>
<PRE> <PRE>
{s = "Liz"; g = Fem} -- record in full form {s = "Liz"; g = Fem} -- record in full form
{s,t = "et"} -- same as {s = "et";t= "et"} {s,t = "et"} -- same as {s = "et";t= "et"}
@@ -345,17 +394,21 @@ Records
&lt;a,b,c&gt; -- tuple, same as {p1=a;p2=b;p3=c} &lt;a,b,c&gt; -- tuple, same as {p1=a;p2=b;p3=c}
</PRE> </PRE>
<P> <P>
Functions Functions
</P> </P>
<PRE> <PRE>
\x -&gt; t -- lambda abstract \x -&gt; t -- lambda abstract
\x,y -&gt; t -- same as \x -&gt; \y -&gt; t \x,y -&gt; t -- same as \x -&gt; \y -&gt; t
\x,_ -&gt; t -- binding not in t \x,_ -&gt; t -- binding not in t
</PRE> </PRE>
<P> <P>
Local definitions Local definitions
</P> </P>
<PRE> <PRE>
let x : A = d in t -- let definition let x : A = d in t -- let definition
let x = d in t -- let defin, type inferred let x = d in t -- let defin, type inferred
@@ -365,42 +418,52 @@ Local definitions
t where {...} -- same as let ... in t t where {...} -- same as let ... in t
</PRE> </PRE>
<P> <P>
Free variation Free variation
</P> </P>
<PRE> <PRE>
variants {x ; y} -- both x and y possible variants {x ; y} -- both x and y possible
variants {} -- nothing possible variants {} -- nothing possible
</PRE> </PRE>
<P> <P>
Prefix-dependent choices Prefix-dependent choices
</P> </P>
<PRE> <PRE>
pre {"a" ; "an" / v} -- "an" before v, "a" otherw. pre {"a" ; "an" / v} -- "an" before v, "a" otherw.
strs {"a" ; "i" ;"o"}-- list of condition prefixes strs {"a" ; "i" ;"o"}-- list of condition prefixes
</PRE> </PRE>
<P> <P>
Typed expression Typed expression
</P> </P>
<PRE> <PRE>
&lt;t:T&gt; -- same as t, to help type inference &lt;t:T&gt; -- same as t, to help type inference
</PRE> </PRE>
<P> <P>
Accessing bound variables in <CODE>lin</CODE>: use fields <CODE>$1, $2, $3,...</CODE>. Accessing bound variables in <CODE>lin</CODE>: use fields <CODE>$1, $2, $3,...</CODE>.
Example: Example:
</P> </P>
<PRE> <PRE>
fun F : (A : Set) -&gt; (El A -&gt; Prop) -&gt; Prop ; fun F : (A : Set) -&gt; (El A -&gt; Prop) -&gt; Prop ;
lin F A B = {s = ["for all"] ++ A.s ++ B.$1 ++ B.s} lin F A B = {s = ["for all"] ++ A.s ++ B.$1 ++ B.s}
</PRE> </PRE>
<P></P>
<A NAME="toc6"></A> <A NAME="toc6"></A>
<H3>Pattern matching</H3> <H3>Pattern matching</H3>
<P> <P>
These patterns can be used in branches of <CODE>table</CODE> and These patterns can be used in branches of <CODE>table</CODE> and
<CODE>case</CODE> expressions. Patterns are matched in the order in <CODE>case</CODE> expressions. Patterns are matched in the order in
which they appear in the grammar. which they appear in the grammar.
</P> </P>
<PRE> <PRE>
C -- atomic param constructor C -- atomic param constructor
C p q -- param constr. applied to patterns C p q -- param constr. applied to patterns
@@ -416,9 +479,10 @@ which they appear in the grammar.
p + "s" -- sequence of two string patterns p + "s" -- sequence of two string patterns
p* -- repetition of a string pattern p* -- repetition of a string pattern
</PRE> </PRE>
<P></P>
<A NAME="toc7"></A> <A NAME="toc7"></A>
<H3>Sample library functions</H3> <H3>Sample library functions</H3>
<PRE> <PRE>
-- lib/prelude/Predef.gf -- lib/prelude/Predef.gf
drop : Int -&gt; Tok -&gt; Tok -- drop prefix of length drop : Int -&gt; Tok -&gt; Tok -- drop prefix of length
@@ -448,12 +512,14 @@ which they appear in the grammar.
if_then_else : (A : Type) -&gt; Bool -&gt; A -&gt; A -&gt; A if_then_else : (A : Type) -&gt; Bool -&gt; A -&gt; A -&gt; A
if_then_Str : Bool -&gt; Str -&gt; Str -&gt; Str if_then_Str : Bool -&gt; Str -&gt; Str -&gt; Str
</PRE> </PRE>
<P></P>
<A NAME="toc8"></A> <A NAME="toc8"></A>
<H3>Flags</H3> <H3>Flags</H3>
<P> <P>
Flags can appear, with growing priority, Flags can appear, with growing priority,
</P> </P>
<UL> <UL>
<LI>in files, judgement <CODE>flags</CODE> and without dash (<CODE>-</CODE>) <LI>in files, judgement <CODE>flags</CODE> and without dash (<CODE>-</CODE>)
<LI>as flags to <CODE>gf</CODE> when invoked, with dash <LI>as flags to <CODE>gf</CODE> when invoked, with dash
@@ -463,6 +529,7 @@ Flags can appear, with growing priority,
<P> <P>
Some common flags used in grammars: Some common flags used in grammars:
</P> </P>
<PRE> <PRE>
startcat=cat use this category as default startcat=cat use this category as default
@@ -483,19 +550,24 @@ Some common flags used in grammars:
optimize=all usually good for resource optimize=all usually good for resource
optimize=noexpand for resource, if =all too big optimize=noexpand for resource, if =all too big
</PRE> </PRE>
<P> <P>
For the full set of values for <CODE>FLAG</CODE>, For the full set of values for <CODE>FLAG</CODE>,
use on-line <CODE>h -FLAG</CODE>. use on-line <CODE>h -FLAG</CODE>.
</P> </P>
<A NAME="toc9"></A> <A NAME="toc9"></A>
<H3>File paths</H3> <H3>File paths</H3>
<P> <P>
Colon-separated lists of directories searched in the Colon-separated lists of directories searched in the
given order: given order:
</P> </P>
<PRE> <PRE>
--# -path=.:../abstract:../common:prelude --# -path=.:../abstract:../common:prelude
</PRE> </PRE>
<P> <P>
This can be (in order of growing preference), as This can be (in order of growing preference), as
first line in the top file, as flag to <CODE>gf</CODE> first line in the top file, as flag to <CODE>gf</CODE>
@@ -507,8 +579,10 @@ If the environment variabls <CODE>GF_LIB_PATH</CODE> is defined, its
value is automatically prefixed to each directory to value is automatically prefixed to each directory to
extend the original search path. extend the original search path.
</P> </P>
<A NAME="toc10"></A> <A NAME="toc10"></A>
<H3>Alternative grammar formats</H3> <H3>Alternative grammar formats</H3>
<P> <P>
<B>Old GF</B> (before GF 2.0): <B>Old GF</B> (before GF 2.0):
all judgements in any kinds of modules, all judgements in any kinds of modules,
@@ -519,9 +593,11 @@ if it lacks a module header.
<P> <P>
<B>Context-free</B> (file <CODE>foo.cf</CODE>). The form of rules is e.g. <B>Context-free</B> (file <CODE>foo.cf</CODE>). The form of rules is e.g.
</P> </P>
<PRE> <PRE>
Fun. S ::= NP "is" AP ; Fun. S ::= NP "is" AP ;
</PRE> </PRE>
<P> <P>
If <CODE>Fun</CODE> is omitted, it is generated automatically. If <CODE>Fun</CODE> is omitted, it is generated automatically.
Rules must be one per line. The RHS can be empty. Rules must be one per line. The RHS can be empty.
@@ -529,9 +605,11 @@ Rules must be one per line. The RHS can be empty.
<P> <P>
<B>Extended BNF</B> (file <CODE>foo.ebnf</CODE>). The form of rules is e.g. <B>Extended BNF</B> (file <CODE>foo.ebnf</CODE>). The form of rules is e.g.
</P> </P>
<PRE> <PRE>
S ::= (NP+ ("is" | "was") AP | V NP*) ; S ::= (NP+ ("is" | "was") AP | V NP*) ;
</PRE> </PRE>
<P> <P>
where the RHS is a regular expression of categories where the RHS is a regular expression of categories
and quoted tokens: <CODE>"foo", CAT, T U, T|U, T*, T+, T?</CODE>, or empty. and quoted tokens: <CODE>"foo", CAT, T U, T|U, T*, T+, T?</CODE>, or empty.
@@ -541,9 +619,11 @@ Rule labels are generated automatically.
<B>Probabilistic grammars</B> (not a separate format). <B>Probabilistic grammars</B> (not a separate format).
You can set the probability of a function <CODE>f</CODE> (in its value category) by You can set the probability of a function <CODE>f</CODE> (in its value category) by
</P> </P>
<PRE> <PRE>
--# prob f 0.009 --# prob f 0.009
</PRE> </PRE>
<P> <P>
These are put into a file given to GF using the <CODE>probs=File</CODE> flag These are put into a file given to GF using the <CODE>probs=File</CODE> flag
on command line. This file can be the grammar file itself. on command line. This file can be the grammar file itself.
@@ -551,20 +631,26 @@ on command line. This file can be the grammar file itself.
<P> <P>
<B>Example-based grammars</B> (file <CODE>foo.gfe</CODE>). Expressions of the form <B>Example-based grammars</B> (file <CODE>foo.gfe</CODE>). Expressions of the form
</P> </P>
<PRE> <PRE>
in Cat "example string" in Cat "example string"
</PRE> </PRE>
<P> <P>
are preprocessed by using a parser given by the flag are preprocessed by using a parser given by the flag
</P> </P>
<PRE> <PRE>
--# -resource=File --# -resource=File
</PRE> </PRE>
<P> <P>
and the result is written to <CODE>foo.gf</CODE>. and the result is written to <CODE>foo.gf</CODE>.
</P> </P>
<A NAME="toc11"></A> <A NAME="toc11"></A>
<H3>References</H3> <H3>References</H3>
<P> <P>
<A HREF="http://www.grammaticalframework.org/">GF Homepage</A> <A HREF="http://www.grammaticalframework.org/">GF Homepage</A>
</P> </P>
@@ -573,6 +659,6 @@ A. Ranta, Grammatical Framework: A Type-Theoretical Grammar Formalism.
<I>The Journal of Functional Programming</I>, vol. 14:2. 2004, pp. 145-189. <I>The Journal of Functional Programming</I>, vol. 14:2. 2004, pp. 145-189.
</P> </P>
<!-- html code generated by txt2tags 2.5 (http://txt2tags.sf.net) --> <!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
<!-- cmdline: txt2tags -thtml ./doc/gf-reference.t2t --> <!-- cmdline: txt2tags -thtml ./doc/gf-reference.t2t -->
</BODY></HTML> </BODY></HTML>

View File

@@ -9,6 +9,8 @@ April 4, 2006
%!style:../css/style.css %!style:../css/style.css
%!target:html %!target:html
%!options: --toc %!options: --toc
%!postproc(html): <TITLE> <meta name = "viewport" content = "width = device-width"><TITLE>
%!postproc(html): <H1> <H1><a href="../"><IMG src="../doc/Logos/gf0.png"></a>
This is a quick reference on GF grammars. It aims to This is a quick reference on GF grammars. It aims to
cover all forms of expression available when writing cover all forms of expression available when writing

View File

@@ -4,6 +4,7 @@ The GF Software System
%!style:../css/style.css %!style:../css/style.css
%!options(html): --toc %!options(html): --toc
%!options(html): --toc-level=4 %!options(html): --toc-level=4
%!postproc(html): <TITLE> <meta name = "viewport" content = "width = device-width"><TITLE>
%!postproc(html): <H1> <H1><a href="../"><IMG src="../doc/Logos/gf0.png"></a> %!postproc(html): <H1> <H1><a href="../"><IMG src="../doc/Logos/gf0.png"></a>
%!postproc(html): "#VSPACE" "<hr>" %!postproc(html): "#VSPACE" "<hr>"
%!postproc(html): "#NORMAL" "" %!postproc(html): "#NORMAL" ""

View File

@@ -2,6 +2,7 @@ Grammatical Framework Download and Installation
%!style:../css/style.css %!style:../css/style.css
%!postproc(html): <TITLE> <meta name = "viewport" content = "width = device-width"><TITLE>
%!postproc(html): <TD><B> <TH> %!postproc(html): <TD><B> <TH>
%!postproc(html): </B></TD> </TH> %!postproc(html): </B></TD> </TH>
%!postproc(html): <H1> <H1><a href="../"><IMG src="../doc/Logos/gf0.png"></a> %!postproc(html): <H1> <H1><a href="../"><IMG src="../doc/Logos/gf0.png"></a>

View File

@@ -5,6 +5,7 @@ local:
echo "<html>\n<head>\n" > index.html echo "<html>\n<head>\n" > index.html
echo "<title>GF Eclipse Plugin</title>\n" >> index.html echo "<title>GF Eclipse Plugin</title>\n" >> index.html
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.grammaticalframework.org/css/style.css\">\n" >> index.html echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.grammaticalframework.org/css/style.css\">\n" >> index.html
echo '<meta name = "viewport" content = "width = device-width">' >>index.html
echo "</head>\n<body>\n" >> index.html echo "</head>\n<body>\n" >> index.html
php ~/markdown-convert.php ~/repositories/gf-eclipse-plugin/README.md index.html --append php ~/markdown-convert.php ~/repositories/gf-eclipse-plugin/README.md index.html --append
echo "</body>\n</html>" >> index.html echo "</body>\n</html>" >> index.html

View File

@@ -5,6 +5,7 @@
<link rel="stylesheet" type="text/css" href="http://www.grammaticalframework.org/css/style.css"> <link rel="stylesheet" type="text/css" href="http://www.grammaticalframework.org/css/style.css">
<meta name = "viewport" content = "width = device-width">
</head> </head>
<body> <body>

View File

@@ -4,7 +4,7 @@
<META NAME="generator" CONTENT="http://txt2tags.org"> <META NAME="generator" CONTENT="http://txt2tags.org">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf8"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf8">
<LINK REL="stylesheet" TYPE="text/css" HREF="../css/style.css"> <LINK REL="stylesheet" TYPE="text/css" HREF="../css/style.css">
<TITLE>Grammatical Framework: Programming with Multilingual Grammars</TITLE> <meta name = "viewport" content = "width = device-width"><TITLE>Grammatical Framework: Programming with Multilingual Grammars</TITLE>
</HEAD><BODY BGCOLOR="white" TEXT="black"> </HEAD><BODY BGCOLOR="white" TEXT="black">
<CENTER> <CENTER>
<H1>Grammatical Framework: Programming with Multilingual Grammars</H1> <H1>Grammatical Framework: Programming with Multilingual Grammars</H1>
@@ -12,7 +12,7 @@
</CENTER> </CENTER>
<P> <P>
<center><img width=200mm src="gf-book-cover.png"></center> <center><img style="width: 200px" src="gf-book-cover.png"></center>
</P> </P>
<P> <P>
This is the web page of the book This is the web page of the book

View File

@@ -4,7 +4,8 @@ Aarne Ranta
%!style:../css/style.css %!style:../css/style.css
%!Encoding:utf8 %!Encoding:utf8
%!postproc(html): "#BOOKCOVER" '<center><img width=200mm src="gf-book-cover.png"></center>' %!postproc(html): <TITLE> <meta name = "viewport" content = "width = device-width"><TITLE>
%!postproc(html): "#BOOKCOVER" '<center><img style="width: 200px" src="gf-book-cover.png"></center>'
#BOOKCOVER #BOOKCOVER

View File

@@ -3,6 +3,7 @@
<HEAD> <HEAD>
<TITLE>GF - Grammatical Framework</TITLE> <TITLE>GF - Grammatical Framework</TITLE>
<link rel=stylesheet href="css/style.css"> <link rel=stylesheet href="css/style.css">
<meta name = "viewport" content = "width = device-width">
<script type="text/javascript"> <script type="text/javascript">
function sitesearch() { function sitesearch() {
var q=document.forms[0].q.value; var q=document.forms[0].q.value;