diff --git a/doc/gf-bibliography.md b/doc/gf-bibliography.md
new file mode 100644
index 0000000000..9438041e1f
--- /dev/null
+++ b/doc/gf-bibliography.md
@@ -0,0 +1,758 @@
+
+## Publications on GF
+
+In reverse temporal order:
+
+H. Burden and R. Heldal.
+Natural Language Generation from Class Diagrams.
+*Proceedings of the 8th International Workshop on Model-Driven Engineering, Verification and Validation (MoDeVVa 2011)*,
+Wellington, New Zealand,
+ACM,
+2011.
+[Draft PDF](http://www.grammaticalframework.org/doc/archive/a9-burden.pdf)
+#BR
+*Using GF to verbalize platform-independent requirement specifications as a part of a software engineering tool chain.*
+
+C. España-Bonet, R. Enache, A. Slaski, A. Ranta, L. Màrquez, and M. Gonzàlez.
+Patent translation within the MOLTO project.
+Proceedings of the 4th Workshop on Patent Translation,
+MT Summit XIII, Xiamen, China, September 23, 2011.
+[PDF](http://www.lsi.upc.edu/~cristinae/CV/docs/MTS11PatEspanaetal.pdf)
+#BR
+*First steps to a hybrid GF-SMT system.*
+
+Seyed M. Montazeri, Nivir Roy, and Gerardo Schneider.
+From Contracts in Structured English to CL Specifications.
+*5th International Workshop on Formal Languages and Analysis of Contract-Oriented Software (FLACOS'11)*,
+volume 68 of EPTCS, pages 55-69,
+Málaga, Spain, 22-23 September 2011.
+[PDF/DOI](http://dx.doi.org/10.4204/EPTCS.68.6)
+#BR
+*Formal analysis of contracts written in controlled English.*
+
+S. Virk, M. Humayoun, and A. Ranta.
+An Open-Source Punjabi Resource Grammar.
+Proceedings of RANLP-2011, Recent Advances in Natural Language Processing,
+Hissar, Bulgaria, 12-14 September, 2011.
+pp. 70-76.
+[PDF](http://lml.bas.bg/~iva/ranlp2011/RANLR2011_Proceedings.PDF)
+#BR
+*Punjabi syntax, building on Humayoun and Ranta 2010.*
+
+D. Dannélls, M. Damova, R.Enache, M. Chechev.
+A Framework for Improved Access to Museum Databases in the Semantic Web.
+Proceedings of the Workshop on Language Technologies for Digital Humanities and Cultural Heritage,
+RANLP-2011, Recent Advances in Natural Language Processing,
+Hissar, Bulgaria, 12-14 September, 2011,
+pp 8-15
+[PDF](http://publications.lib.chalmers.se/cpl/record/index.xsql?pubid=145395)
+#BR
+*Representing and verbalizing in GF of an Cultural Heritage ontology.*
+
+A. Ranta.
+Translating between Language and Logic: What Is Easy and What is Difficult?
+In N. Bjørner and V. Sofronie-Stokkermans (eds.),
+*CADE-23. Automated Deduction*,
+LNCS/LNAI 6803,
+pp. 5-25,
+2011.
+[PDF at Springer](http://www.springerlink.com/content/42n685777k846810/)
+[Draft PDF](http://www.cse.chalmers.se/~aarne/articles/cade2011.pdf)
+#BR
+*Invited talk at the CADE conference, showing how GF can help writing natural language interfaces*
+*to proof systems, and also exploring how to make the language richer, e.g. how to get from*
+*"for all numbers x, x is even or x is odd" to "every number is even or odd".*
+
+A. Ranta.
+*Grammatical Framework: Programming with Multilingual Grammars*,
+ CSLI Publications, Stanford, 2011.
+ [Book web page](http://www.grammaticalframework.org/gf-book/)
+#BR
+*Meant as the standard reference and textbook on GF.*
+
+O. Caprotti, K. Angelov, R. Enache, T. Hallgren, A. Ranta.
+The MOLTO Phrasebook.
+Swedish Language Technology Conference SLTC 2010.
+[PDF](http://publications.lib.chalmers.se/cpl/record/index.xsql?pubid=131251)
+#BR
+*Tourist Phrasebook grammar, available in 14 European languages.*
+
+G. Détrez and R. Enache.
+A Framework for Multilingual Applications on the Android Platform
+Swedish Language Technology Conference SLTC 2010.
+[PDF](http://www.grammaticalframework.org/doc/archive/sltc10_submission_24.pdf)
+#BR
+*A description of the Java implementation of the GF runtime system, which makes it possible*
+to create grammar-based applications running on an Android phone.//
+
+Normunds Gruzitis and Guntis Barzdins.
+Towards a More Natural Multilingual Controlled Language Interface to OWL,
+*9th International Conference on Computational Semantics (IWCS)*,
+pp. 335-339,
+2011.
+[PDF](http://www.aclweb.org/anthology/W/W11/W11-0138.pdf)
+#BR
+*Access to ontologies in English and Latvian.*
+
+M. Humayoun and A. Ranta.
+Developing Punjabi Morphology, Corpus and Lexicon.
+*The 24th Pacific Asia conference on Language, Information and Computation (PACLIC24)*,
+2010.
+#BR
+*Yet another South-East Asian language, spoken by 88 million people.*
+
+J. Camilleri, Gordon J. Pace, and Mike Rosner.
+Playing Nomic using a Controlled Natural Language.
+*CNL 2010, Controlled Natural Language*,
+Marettimo,
+2010.
+#BR
+*Using GF for defining the rules of a game.*
+
+R. Enache and K. Angelov
+Typeful Ontologies with Direct Multilingual Verbalization.
+*CNL 2010, Controlled Natural Language*,
+Marettimo,
+2010.
+#BR
+*Investigating the benefits of using GF as a language for representing ontologies.*
+[PDF](http://www.grammaticalframework.org/doc/archive/cnl2010_submission_2.pdf)
+
+S. Virk, M. Humayoun, and A. Ranta.
+An Open Source Urdu Resource Grammar.
+*Proceedings of the 8th Workshop on Asian Language Resources (Coling 2010 workshop)*,
+2010.
+#BR
+*The national language of Pakistan, spoken by 60 million people; almost the same as Hindi.*
+
+A. Ranta, K. Angelov, and T. Hallgren.
+Tools for multilingual grammar-based translation on the web.
+*Proceedings of the ACL 2010 System Demonstrations*,
+ACM Digital Library,
+2010.
+[PDF](http://www.aclweb.org/anthology-new/P/P10/P10-4012.pdf)
+#BR
+*An overview of GF for developers and users of translation systems.*
+
+D. Dannélls and J. Camilleri.
+Verb Morphology of Hebrew and Maltese - Towards an Open Source Type Theoretical Resource Grammar in GF.
+*Proceedings of the Language Resources (LRs) and Human Language Technologies (HLT) for Semitic Languages Status, Updates, and Prospects, LREC-2010 Workshop*,
+Malta, pp. 57-61.
+2010.
+[PDF](http://spraakdata.gu.se/svedd/pub/lrec10.pdf)
+#BR
+*A study of Semitic non-concatenative morphology from the GF point of view.*
+
+M. Humayoun and C. Raffalli.
+MathNat - Mathematical Text in a Controlled Natural Language.
+*Special issue: Natural Language Processing and its Applications. Journal on Research in Computing Science*, Volume 46.
+2010.
+#BR
+*Natural language interface to a proof system, implemented in GF.*
+
+D. Dannélls.
+Discourse Generation from Formal Specifications Using the Grammatical Framework, GF.
+*Special issue: Natural Language Processing and its Applications. Journal on Research in Computing Science (RCS)*,
+volume 46. pp. 167-178,
+2010.
+#BR
+*Interfacing GF with ontology, with a natural language generation perspective.*
+
+R. Enache, A. Ranta, and K. Angelov.
+An Open-Source Computational Grammar of Romanian.
+A. Gelbukh (ed.), *CiCLING-2010*,
+LNCS 6008,
+2010.
+#BR
+*A Romance language different enough not to follow the Romance functor.*
+
+K. Angelov and A. Ranta.
+Implementing Controlled Languages in GF.
+N. Fuchs (ed.), *CNL-2009 Controlled Natural Languages*,
+LNCS/LNAI 5972,
+2010.
+
+K. Angelov, B. Bringert and A. Ranta.
+PGF: A Portable Run-time Format for Type-theoretical Grammars,
+*Journal of Logic, Language and Information*,
+19(2),
+pp. 201-228,
+2009.
+[SpringerLink](http://www.springerlink.com/content/y32q021028747k70/)
+
+A. Ranta.
+The GF Resource Grammar Library.
+*Linguistic Issues in Language Technology*,
+2 (2),
+2009.
+[PDF](http://elanguage.net/journals/index.php/lilt/article/viewFile/214/158)
+#BR
+*A systematic presentation of the library from the linguistic point of view.*
+
+A. Ranta.
+Grammatical Framework: A Multilingual Grammar Formalism,
+*Language and Linguistics Compass*,
+Vol. 3, [on-line](http://www.blackwell-compass.com/subject/linguistics/article_view?parent=section&last_results=section%3Dlnco-computational&sortby=date§ion=lnco-computational&browse_id=lnco_articles_bpl155&article_id=lnco_articles_bpl155)
+2009.
+#BR
+*An overview of GF for readers with a general academic brackground.*
+
+A. Ranta and K. Angelov.
+Implementing Controlled Languages in GF.
+*CNL-2009*,
+*CEUR Workshop Proceedings*,
+vol. 448,
+[on-line](http://sunsite.informatik.rwth-aachen.de/Publications/CEUR-WS/Vol-448/),
+2009.
+#BR
+*Makes a case for using GF in controlled language implementation, illustrated by Attempto Controlled English ported to French, German, and Swedish; longer version in 2010.*
+
+A. Ranta. Grammars as Software Libraries.
+In Y. Bertot, G. Huet, J-J. Lévy, and G. Plotkin (eds.),
+*From Semantics to Computer Science*,
+Cambridge University Press, Cambridge,
+pp. 281-308,
+2009.
+[pdf (preliminary version)](http://www.cse.chalmers.se/~aarne/articles/libraries-kahn.pdf)
+#BR
+*Grammar-libraries from the software engineering point of view, with an example application to mathematical language.*
+
+K. Angelov.
+Incremental Parsing in Parallel Multiple Context-Free Grammars.
+EACL 2009.
+#BR
+*Describes the algorithm used in parsing with GF.*
+
+A. Ranta, B. Bringert, and K. Angelov.
+The GF Grammar Development Environment.
+System demo. Proceedings of *EACL-2009*,
+2009.
+[PDF](http://www.aclweb.org/anthology-new/E/E09/E09-2015.pdf)
+#BR
+*An overview of GF from the grammarian's point of view.*
+
+B. Bringert, K. Angelov, and A. Ranta.
+Grammatical Framework Web Service,
+System demo. Proceedings of *EACL-2009*,
+2009.
+[PDF](http://www.aclweb.org/anthology-new/E/E09/E09-2003.pdf)
+#BR
+*An overview of how to build web services on top of PGF using the Google Web Toolkit.*
+
+A. Ranta and K. Angelov.
+Implementing Controlled Languages in GF,
+To appear in the proceedings of *CNL-2009*, LNCS, Springer,
+2009.
+#BR
+*On the use of GF for controlled languages, exemplified by an implementation of Attempto Controlled English then ported to three other language.*
+
+R. Cooper and A. Ranta.
+Natural Languages as Collections of Resources.
+In *Language in Flux: Dialogue Coordination, Language Variation, Change*,
+ed. by R. Cooper and R. Kempson, pp. 109-120. London: College Publications,
+2008.
+#BR
+*The resource grammar idea applied to language learning and evolution.*
+
+Moisés Salvador Meza Moreno and B. Bringert.
+Interactive Multilingual Web Applications with Grammatical Framework.
+In B. Nordström and A. Ranta (eds),
+*Advances in Natural Language Processing (GoTAL 2008)*,
+LNCS/LNAI 5221, Springer,
+2008.
+#BR
+*Shows how GF compiled to JavaScript is used in dynamic multilingual web pages.*
+
+Peter Ljunglöf and Staffan Larsson.
+A grammar formalism for specifying ISU-based dialogue systems.
+In B. Nordström and A. Ranta (eds),
+*Advances in Natural Language Processing (GoTAL 2008)*,
+LNCS/LNAI 5221, Springer,
+2008.
+[pdf](http://www.ling.gu.se/~peb/pubs/LjunglofLarsson-2008a.pdf)
+#BR
+*Explains how GoDiS dialogue systems are specified by GF grammars.*
+
+K. Angelov.
+Type-Theoretical Bulgarian Grammar.
+In B. Nordström and A. Ranta (eds),
+*Advances in Natural Language Processing (GoTAL 2008)*,
+LNCS/LNAI 5221, Springer,
+2008.
+#BR
+*Explains the implementation of a Bulgarian resource grammar in GF.*
+
+B. Bringert.
+High-precision Domain-specific Interlingua-based Speech Translation
+with Grammatical Framework.
+*Coling 2008 Workshop on Speech Translation for Medical and Other Safety-Critical Applications*,
+Manchester, UK, August 23,
+2008.
+#BR
+*Shows how to build spoken language translators based on GF grammars and their compilation to Nuance.*
+
+A. Ranta.
+How predictable is Finnish morphology? An experiment on lexicon construction.
+In J. Nivre, M. Dahllöf and B. Megyesi (eds),
+*Resourceful Language Technology: Festschrift in Honor of Anna Sågvall Hein*,
+University of Uppsala,
+2008.
+Available from [series homepage](http://publications.uu.se/abstract.xsql?dbid=8933)
+#BR
+*Presents an experiment on smart paradigms in Finnish.*
+
+A. Ranta.
+Example-based grammar writing.
+To appear in L. Borin and S. Larsson (eds),
+Festschrift for Robin Cooper,
+2007.
+#BR
+*Presents and discusses the ideas of grammar composition and example-based grammar writing.*
+
+B. Bringert.
+Rapid Development of Dialogue Systems by Grammar Compilation.
+*8th SIGdial Workshop on Discourse and Dialogue*,
+Antwerp, Belgium, September 1-2,
+2007.
+[pdf](http://www.cse.chalmers.se/~bringert/publ/gf-voicexml/gf-voicexml.pdf)
+#BR
+*Shows how to build a web-based spoken dialogue system by generating VoiceXML and JavaScript.*
+
+A. El Dada and A. Ranta.
+Implementing an Open Source Arabic Resource Grammar in GF.
+In M. Mughazy (ed),
+*Perspectives on Arabic Linguistics XX. Papers from the Twentieth Annual Symposium on Arabic Linguistics, Kalamazoo, March 26*
+John Benjamins Publishing Company.
+2007.
+#BR
+*An outline of the Arabic resource grammar project, focusing on linguistic aspects.*
+
+A. El Dada.
+Implementation of the Arabic Numerals and their Syntax in GF.
+Computational Approaches to Semitic Languages: Common Issues and Resources,
+ ACL-2007 Workshop,
+June 28, 2007, Prague.
+2007.
+#BR
+*A case study with the resource grammar, focusing on the morphosyntax*
+*and agreement of constructions with numerals.*
+
+A. Ranta.
+Modular Grammar Engineering in GF.
+*Research on Language and Computation*,
+5:133-158, 2007.
+Draft available as [pdf](http://www.cse.chalmers.se/~aarne/articles/multieng3.pdf).
+#BR
+*Adapts library-based software engineering methods to grammar writing*
+*and introduces the module system of GF.*
+
+A. Ranta.
+The GF Grammar Compiler.
+*Workshop on New Directions in Type-theoretic Grammars*,
+Dublin, August 2007 (ESSLLI workshop).
+2007.
+[pdf](http://www.cse.chalmers.se/~aarne/articles/ar-compiler.pdf)
+#BR
+*Describes the compilation of GF source code to lower-level run-time formats.*
+
+M. Humayoun, H. Hammarström, and A. Ranta.
+Urdu Morphology, Orthography and Lexicon Extraction.
+*CAASL-2: The Second Workshop on Computational Approaches to Arabic Script-based Languages*,
+July 21-22, 2007, LSA 2007 Linguistic Institute, Stanford University.
+2007.
+#BR
+*Fairly complete open-source Urdu morphology and elemenraty syntax in GF.*
+
+N. Perera and A. Ranta.
+Dialogue System Localization with the GF Resource Grammar Library.
+*SPEECHGRAM 2007: ACL Workshop on Grammar-Based Approaches to Spoken Language Processing*,
+June 29, 2007, Prague.
+2007.
+[pdf](http://www.cse.chalmers.se/~aarne/articles/perera-ranta.pdf)
+#BR
+*An experiment in porting an in-car dialogue system from two to six languages.*
+
+B. Bringert.
+Speech Recognition Grammar Compilation in Grammatical Framework
+*SPEECHGRAM 2007: ACL Workshop on Grammar-Based Approaches to Spoken Language Processing*,
+June 29, 2007, Prague.
+2007.
+#BR
+*Generation of speech recognition language models from GF in several formats:*
+*GSL (Nuance), SRGS, JSGF, and HTK SLF, with embedded semantic interpretation.*
+
+A. Ranta.
+Features in Abstract and Concrete Syntax.
+*The 2nd International Workshop on Typed Feature Structure Grammars*,
+Tartu, 24 May 2007 (NODALIDA workshop).
+2007.
+[pdf](http://www.cse.chalmers.se/~aarne/articles/ranta-tfsg2007.pdf)
+#BR
+*Explores the design choices of incorporating features in a GF-like grammar,*
+*with comparisons to feature-based unification grammars.*
+
+O. Caprotti and M. Seppälä.
+Multilingual Delivery of Online Tests in mathematics.
+Proceedings of Online Educa Berlin 2006. 29 November - 1 December 2006.
+ Berlin, Germany.
+2006.
+[pdf](http://webalt.math.helsinki.fi/content/e16/e301/e785/MultilingualDeliveryofOnlineTestsinMathematics_eng.pdf)
+#BR
+*This papers shows screenshots of multilingual generation in the*
+*WebALT project, using GF and the resource grammar library.*
+
+J. Khegai.
+Language engineering in Grammatical Framework (GF).
+Phd thesis, Computer Science, Chalmers University of Technology,
+2006.
+[pdf](http://www.cse.chalmers.se/~janna/Janna_Khegai_phd.pdf)
+#BR
+*Collection of articles and technical reports on multilingual authoring*
+*and the Russian resource grammar.*
+
+B. Bringert and A. Ranta.
+A Pattern for Almost Compositional Functions.
+*ICFP 2006, The 11th ACM SIGPLAN International Conference on Functional Programming, Portland, Oregon, September 18-20, 2006*,
+2006.
+[pdf](http://www.cse.chalmers.se/~bringert/publ/composOp/composOp.pdf).
+#BR
+*A method of generic programming useful for compiler construction*
+*and transfer-based translation.*
+
+M. Forsberg, H. Hammarstrom, and A. Ranta.
+Morphological Lexicon Extraction from Raw Text Data.
+*FinTAL 2006*,
+Turku, August 23-25, 2006.
+Springer LNCS/LNAI 4139,
+pp. 488-499,
+2006.
+#BR
+*A method for automatical production of morphological lexica based*
+*on inflection engines such as those of GF resource grammar library.*
+
+A. Ranta.
+Type Theory and Universal Grammar.
+*Philosophia Scientiae, Constructivism: Mathematics, Logic, Philosophy and Linguistics*,
+cahier spécial 6,
+pp. 115-131,
+2006.
+#BR
+*A philosophical study of the medieval thesis that*
+*grammar is the same in all languages and the difference is only in words.*
+
+J. Khegai.
+GF parallel resource grammars and Russian.
+In proceedings of ACL2006
+ (The joint conference of the International Committee on Computational
+ Linguistics and the Association for Computational Linguistics) (pp. 475-482),
+ Sydney, Australia, July 2006.
+#BR
+*Gives an outline of the Russian resource grammar project.*
+
+J. Khegai.
+Grammatical Framework (GF) for MT in sublanguage domains.
+Proceedings of 11th Annual conference of the European Association for
+ Machine Translation, , Oslo.
+pp. 95-104,
+2005.
+#BR
+*Shows how GF is used in controlled language translation.*
+
+W. Ng'ang'a.
+Multilingual content development for eLearning in Africa.
+eLearning Africa: 1st Pan-African Conference on ICT for Development,
+ Education and Training. 24-26 May 2006, Addis Ababa, Ethiopia.
+2006.
+[pdf](http://webalt.math.helsinki.fi/content/e16/e301/e583/MultilingualContentDevelopmentforeLearninginAfrica-final1_eng.pdf)
+#BR
+*Presents a programme for producing educational material in African languages*
+*via multilingual generation in GF.*
+
+R. Jonson.
+Generating statistical language models from interpretation grammars in dialogue system.
+In Proceedings of EACL'06, Trento, Italy.
+2006.
+#BR
+*Uses GF grammars to generate statistical language models for speech recognition.*
+
+A. El Dada and A. Ranta.
+Arabic Resource Grammar.
+*Arabic Language Processing (JETALA)*,
+5-6 June 2006, IERA, Rabat, Morocco,
+2006.
+#BR
+*An outline of the Arabic resource grammar project, focusing on software aspects.*
+
+D. A. Burke and K. Johannisson.
+Translating Formal Software Specifications to Natural Language. A Grammar-Based Approach.
+In P. Blache, E. Stabler, J. Busquets and R. Moot (eds),
+Logical Aspects of Computational Linguistics (LACL 2005),
+Springer LNAI 3402,
+pp. 51-66,
+2005.
+#BR
+*A paper explaining how a multilingual GF grammar is completed with*
+*Natural Language Generation techniques to improve text quality.*
+
+B. Bringert, R. Cooper, P. Ljunglöf, A. Ranta,
+Multimodal Dialogue System Grammars.
+*Proceedings of DIALOR'05, Ninth Workshop on the Semantics and Pragmatics of Dialogue, Nancy, France, June 9-11, 2005*,
+2005.
+[pdf](http://www.cse.chalmers.se/~bringert/publ/mm-grammars-dialor/mm-grammars-dialor.pdf).
+#BR
+*Shows how mouse clicks can be integrated in GF grammars*
+*alongside with speech input.*
+
+K. Johannisson,
+Formal and Informal Software Specifications.
+PhD thesis,
+Computer Science, Göteborg University,
+2005.
+[http://www.cse.chalmers.se/~krijo/thesis/thesisA4.pdf]
+#BR
+*Collection of articles in the GF-KeY project, with an introduction.*
+
+P. Ljunglöf.
+Expressivity and Complexity of the Grammatical Framework.
+PhD thesis, Computer Science,
+Göteborg University,
+2004.
+[pdf](http://www.cse.chalmers.se/~peb/pubs/Ljunglof-2004a.pdf)
+#BR
+*Language-theoretical study of GF and its parsing problem.*
+
+A. Ranta.
+Grammatical Framework: A Type-Theoretical Grammar Formalism.
+*Journal of Functional Programming*, 14(2),
+pp. 145-189,
+2004.
+Draft available as [ps.gz](http://www.cse.chalmers.se/~aarne/articles/gf-jfp.ps.gz).
+#BR
+*Theoretical paper explaining the GF formalism and its implementation.*
+*The standard reference on GF, but doesn't cover the module system.*
+
+A. Ranta.
+Computational semantics in type theory.
+*Mathematics and Social Sciences*, 165,
+pp. 31-57,
+2004.
+Draft available as [pdf](http://www.cse.chalmers.se/~aarne/articles/3formsem.pdf).
+#BR
+// Shows how Montague-style grammars are implemented in GF and extends//
+*this to type-theoretical grammars for anaphoric expressions.*
+
+H. Hammarström and A. Ranta.
+Cardinal Numerals Revisited in GF.
+*Workshop on Numerals in the World's Languages*.
+Dept. of Linguistics Max Planck Institute for Evolutionary Anthropology, Leipzig,
+2004.
+#BR
+*An overview of the numeral grammar project, covering 88 languages.*
+
+A. Ranta.
+Grammatical Framework Tutorial.
+In A. Beckmann and N. Preining, editors,
+*ESSLLI 2003 Course Material I*,
+*Collegium Logicum*,
+volume V,
+pp. 1-86.
+Kurt Gödel Society,
+Vienna,
+2004.
+#BR
+*A revised version of the on-line GF tutorial, v1.0.*
+
+J. Khegai and A. Ranta.
+Building and Using a Russian Resource Grammar in GF.
+In A. Gelbukh (ed),
+*Intelligent Text Processing and Computational Linguistics (CICLing-2004)*,
+Seoul, Korea, February 2003,
+Springer LNCS 945,
+pp. 38-41,
+2004.
+[ps.gz](http://www.cse.chalmers.se/~aarne/articles/mexico.ps.gz).
+#BR
+*An introduction to the GF resource grammar project, with Russian as prime example.*
+
+A. Ranta and R. Cooper.
+Dialogue Systems as Proof Editors.
+ *Journal of Logic, Language and Information*, 13,
+pp. 225-240,
+2004.
+Conference version (IJCAR/ICoS-3, Siena, June 2001) available as
+ [ps.gz](http://www.cse.chalmers.se/~aarne/articles/dialogue3.ps.gz).
+*Shows a close analogy between task-oriented dialogue systems*
+*and metavariable-based proof editors.*
+
+J. Khegai and A. Ranta.
+Building and Using a Russian Resource Grammar in GF.
+In A. Gelbukh (ed),
+*Intelligent Text Processing and Computational Linguistics (CICLing-2004)*,
+Seoul, Korea, February 2003,
+Springer LNCS 945,
+pp. 38-41,
+2004.
+[ps.gz](http://www.cse.chalmers.se/~aarne/articles/mexico.ps.gz).
+#BR
+*Explains how the GF GUI is used in syntax editing and discusses*
+*how new grammars are created.*
+
+R. Hähnle, K. Johannisson, and A. Ranta.
+An Authoring Tool for Informal and Formal Requirements Specifications.
+In R. D. Kutsche and H. Weber (eds),
+*ETAPS/FASE-2002: Fundamental Approaches to Software Engineering*,
+Springer LNCS,
+vol. 2306,
+pp. 233--248,
+2002.
+[pdf](http://www.cse.chalmers.se/~krijo/GF/FASE.pdf)
+#BR
+*Describes a GF-based authoring tool for object-oriented*
+*specifications in OCL and English. Carries out in full*
+*the work proposed in the position paper (Hähnle & Ranta 2001).*
+
+K. Johannisson and A.Ranta,
+Formal Verification of Multilingual Instructions.
+*Proceedings of the Joint Winter Meeting 2001*.
+Departments of Computer Science and Computer Engineering,
+Chalmers University of Technology and Göteborg University.
+2001.
+[ps.gz](http://www.cse.chalmers.se/~aarne/articles/aarne+krijo.ps.gz).
+#BR
+*Instructions for an alarm system in four languages, verified in the proof editor Alfa.*
+
+R. Hähnle and A. Ranta,
+Connecting OCL with the Rest of the World.
+*ETAPS 2001 Workshop on Transformations in UML (WTUML)*,
+Genova,
+2001.
+[ps.gz](http://www.cse.chalmers.se/~reiner/papers/wtuml.ps.gz).
+#BR
+*A position paper explaining how GF can be used to help in object-oriented*
+*modelling, with some examples on natural-language interaction with*
+*OCL (Object Constraint Language)*.
+
+T. Hallgren, "The Correctness of Insertion Sort",
+Manuscript, Chalmers University, Göteborg, 2001.
+Available in
+[ps](http://www.cse.chalmers.se/~hallgren/Papers/insertion_sort.ps)
+#BR
+*A seven-page text generated by GF-Alfa*.
+
+A. Ranta. "Bescherelle bricolé",
+[ps.gz](../../GF2.0/doc/BeschBric.ps.gz),
+2001.
+#BR
+*A machine-generated book on French conjugation implemented in GF.*
+
+T. Hallgren and A. Ranta,
+An Extensible Proof Text Editor.
+In M. Parigot and A. Voronkov (eds),
+*Logic for Programming and Automated Reasoning (LPAR'2000)*,
+LNCS/LNAI 1955,
+pp. 70-84,
+Springer Verlag, Heidelberg,
+2000.
+[ps.gz](http://www.cse.chalmers.se/~aarne/articles/lpar2000.ps.gz).
+#BR
+*Describes an interface to the proof editor Alfa written in GF*.
+
+M. Dymetman, V. Lux, and A. Ranta,
+XML and multilingual document authoring: converging trends.
+*Proceedings of the The 18th International Conference on Computational Linguistics (COLING 2000)*,
+pp. 243-249,
+Saarbruecken,
+2000.
+[ps.gz](http://www.cse.chalmers.se/~aarne/articles/coling2000.ps.gz).
+#BR
+*Relates GF not only with XML but also with definite clause grammars*.
+
+P. Mäenpää and A. Ranta.
+The type theory and type checker of GF.
+*Colloquium on Principles, Logics, and Implementations of High-Level Programming Languages, Workshop on Logical Frameworks and Meta-languages, Paris, 28 September 1999*.
+1999.
+[ps.gz](href=http://www.cse.chalmers.se/~aarne/papers/lfm1999.ps.gz).
+#BR
+*Concise theoretical presentation of GF, using the old notation prior to v0.9*.
+
+## Background for GF
+
+In alphabetical order:
+
+L. Magnusson.
+*The Implementation of ALF - a Proof Editor based on Martin-Löf's*
+*Monomorphic Type Theory with Explicit Substitutions*.
+PhD Thesis, Department of Computing Science,
+Chalmers University of Technology and Göteborg University,
+1994.
+#BR
+*Back in 1992 the most wonderful program in the world, ALF is*
+*a model that GF directly follows: GF is Yet ALF.*
+
+P. Martin-Löf.
+*Intuitionistic Type Theory*.
+Bibliopolis, Naples, 1984.
+#BR
+*A very accessible book (if you have access to it!) on type theory directly from the source.*
+
+B. Nordström, K. Petersson, and J. Smith.
+*Programming in Martin-Löf's Type Theory: an Introduction*.
+Oxford University Press, 1990.
+ The book is out of print, but a free version can be picked up from
+[www.cse.chalmers.se/Cs/Research/Logic/book/](http://www.cse.chalmers.se/Cs/Research/Logic/book/)
+#BR
+*Standard reference on the subject*.
+
+A. Ranta.
+*Type Theoretical Grammar*.
+Oxford University Press, Oxford,
+1994.
+#BR
+*Monograph on type theory in linguistics. Includes an introduction*
+*to type theory. Focused on semantics, in particular anaphora. A first,*
+*very rudimentary implementation of linearization in the proof system ALF.*
+
+A. Ranta.
+Syntactic categories in the language of mathematics.
+In P. Dybjer, B. Nordström, and J. Smith, eds.,
+*Types for Proofs and Programs*,
+pp. 162-182,
+Lecture Notes in Computer Science
+996,
+Springer-Verlag,
+Heidelberg,
+1995.
+[ps.gz](http://www.cse.chalmers.se/~aarne/articles/baastad.ps.gz)
+#BR
+*Predecessor of GF: grammar defined in type theory and implemented in ALF*.
+
+A. Ranta.
+Context-relative syntactic categories and the formalization of mathematical text.
+In S. Berardi and M. Coppo, eds.,
+*Types for Proofs and Programs*,
+pp. 231-248,
+Lecture Notes in Computer Science
+1158,
+Springer-Verlag,
+Heidelberg,
+1996.
+[ps.gz](http://www.cse.chalmers.se/~aarne/articles/torino.ps.gz).
+#BR
+*Extending the theory of the previous paper. The implementation in ALF*
+*eventually became so heavy that the need arose for GF.*
+
+A. Ranta.
+Structures grammaticales dans le français mathématique.
+*Mathématiques, informatique et Sciences Humaines.*,
+vol. 138 pp. 5-56 and 139 pp. 5-36,
+1997.
+#BR
+*A rather comprehensive French grammar presented in a type-theoretical style.*
+
+A. Ranta.
+ Syntactic calculus with dependent types.
+ *Journal of Logic, Language and Information*, vol. 4,
+ pp. 413-431, 1998.
+#BR
+*Interprets Lambek Calculus in type theory and defines some extensions*.
+
diff --git a/doc/gf-bibliography.t2t b/doc/gf-bibliography.t2t
deleted file mode 100644
index 5bfafec05f..0000000000
--- a/doc/gf-bibliography.t2t
+++ /dev/null
@@ -1,816 +0,0 @@
-Grammatical Framework Bibliography
-Aarne Ranta
-%%date(%c)
-
-% NOTE: this is a txt2tags file.
-% Create an html file from this file using:
-% txt2tags gf-bibliography.t2t
-
-%!style:../css/style.css
-%!target:html
-%!options(html): --toc
-%!postproc(html):
-%!postproc(html): #BR
-%!encoding:utf-8
-%!postproc(html):
-
-==Publications on GF==
-
-In reverse temporal order:
-
-H. Burden and R. Heldal.
-Natural Language Generation from Class Diagrams.
-//Proceedings of the 8th International Workshop on Model-Driven Engineering, Verification and Validation (MoDeVVa 2011)//,
-Wellington, New Zealand,
-ACM,
-2011.
-[Draft PDF http://www.grammaticalframework.org/doc/archive/a9-burden.pdf]
-#BR
-//Using GF to verbalize platform-independent requirement specifications as a part of a software engineering tool chain.//
-
-C. España-Bonet, R. Enache, A. Slaski, A. Ranta, L. Màrquez, and M. Gonzàlez.
-Patent translation within the MOLTO project.
-Proceedings of the 4th Workshop on Patent Translation,
-MT Summit XIII, Xiamen, China, September 23, 2011.
-[PDF http://www.lsi.upc.edu/~cristinae/CV/docs/MTS11PatEspanaetal.pdf]
-#BR
-//First steps to a hybrid GF-SMT system.//
-
-Seyed M. Montazeri, Nivir Roy, and Gerardo Schneider.
-From Contracts in Structured English to CL Specifications.
-//5th International Workshop on Formal Languages and Analysis of Contract-Oriented Software (FLACOS'11)//,
-volume 68 of EPTCS, pages 55-69,
-Málaga, Spain, 22-23 September 2011.
-[PDF/DOI http://dx.doi.org/10.4204/EPTCS.68.6]
-#BR
-//Formal analysis of contracts written in controlled English.//
-
-S. Virk, M. Humayoun, and A. Ranta.
-An Open-Source Punjabi Resource Grammar.
-Proceedings of RANLP-2011, Recent Advances in Natural Language Processing,
-Hissar, Bulgaria, 12-14 September, 2011.
-pp. 70-76.
-[PDF http://lml.bas.bg/~iva/ranlp2011/RANLR2011_Proceedings.PDF]
-#BR
-//Punjabi syntax, building on Humayoun and Ranta 2010.//
-
-D. Dannélls, M. Damova, R.Enache, M. Chechev.
-A Framework for Improved Access to Museum Databases in the Semantic Web.
-Proceedings of the Workshop on Language Technologies for Digital Humanities and Cultural Heritage,
-RANLP-2011, Recent Advances in Natural Language Processing,
-Hissar, Bulgaria, 12-14 September, 2011,
-pp 8-15
-[PDF http://publications.lib.chalmers.se/cpl/record/index.xsql?pubid=145395]
-#BR
-//Representing and verbalizing in GF of an Cultural Heritage ontology.//
-
-A. Ranta.
-Translating between Language and Logic: What Is Easy and What is Difficult?
-In N. Bjørner and V. Sofronie-Stokkermans (eds.),
-//CADE-23. Automated Deduction//,
-LNCS/LNAI 6803,
-pp. 5-25,
-2011.
-[PDF at Springer http://www.springerlink.com/content/42n685777k846810/]
-[Draft PDF http://www.cse.chalmers.se/~aarne/articles/cade2011.pdf]
-#BR
-//Invited talk at the CADE conference, showing how GF can help writing natural language interfaces//
-//to proof systems, and also exploring how to make the language richer, e.g. how to get from//
-//"for all numbers x, x is even or x is odd" to "every number is even or odd".//
-
-A. Ranta.
-//Grammatical Framework: Programming with Multilingual Grammars//,
- CSLI Publications, Stanford, 2011.
- [Book web page http://www.grammaticalframework.org/gf-book/]
-#BR
-//Meant as the standard reference and textbook on GF.//
-
-O. Caprotti, K. Angelov, R. Enache, T. Hallgren, A. Ranta.
-The MOLTO Phrasebook.
-Swedish Language Technology Conference SLTC 2010.
-[PDF http://publications.lib.chalmers.se/cpl/record/index.xsql?pubid=131251]
-#BR
-//Tourist Phrasebook grammar, available in 14 European languages.//
-
-
-G. Détrez and R. Enache.
-A Framework for Multilingual Applications on the Android Platform
-Swedish Language Technology Conference SLTC 2010.
-[PDF http://www.grammaticalframework.org/doc/archive/sltc10_submission_24.pdf]
-#BR
-//A description of the Java implementation of the GF runtime system, which makes it possible//
-to create grammar-based applications running on an Android phone.//
-
-Normunds Gruzitis and Guntis Barzdins.
-Towards a More Natural Multilingual Controlled Language Interface to OWL,
-//9th International Conference on Computational Semantics (IWCS)//,
-pp. 335-339,
-2011.
-[PDF http://www.aclweb.org/anthology/W/W11/W11-0138.pdf]
-#BR
-//Access to ontologies in English and Latvian.//
-
-M. Humayoun and A. Ranta.
-Developing Punjabi Morphology, Corpus and Lexicon.
-//The 24th Pacific Asia conference on Language, Information and Computation (PACLIC24)//,
-2010.
-#BR
-//Yet another South-East Asian language, spoken by 88 million people.//
-
-J. Camilleri, Gordon J. Pace, and Mike Rosner.
-Playing Nomic using a Controlled Natural Language.
-//CNL 2010, Controlled Natural Language//,
-Marettimo,
-2010.
-#BR
-//Using GF for defining the rules of a game.//
-
-R. Enache and K. Angelov
-Typeful Ontologies with Direct Multilingual Verbalization.
-//CNL 2010, Controlled Natural Language//,
-Marettimo,
-2010.
-#BR
-//Investigating the benefits of using GF as a language for representing ontologies.//
-[PDF http://www.grammaticalframework.org/doc/archive/cnl2010_submission_2.pdf]
-
-S. Virk, M. Humayoun, and A. Ranta.
-An Open Source Urdu Resource Grammar.
-//Proceedings of the 8th Workshop on Asian Language Resources (Coling 2010 workshop)//,
-2010.
-#BR
-//The national language of Pakistan, spoken by 60 million people; almost the same as Hindi.//
-
-A. Ranta, K. Angelov, and T. Hallgren.
-Tools for multilingual grammar-based translation on the web.
-//Proceedings of the ACL 2010 System Demonstrations//,
-ACM Digital Library,
-2010.
-[PDF http://www.aclweb.org/anthology-new/P/P10/P10-4012.pdf]
-#BR
-//An overview of GF for developers and users of translation systems.//
-
-D. Dannélls and J. Camilleri.
-Verb Morphology of Hebrew and Maltese - Towards an Open Source Type Theoretical Resource Grammar in GF.
-//Proceedings of the Language Resources (LRs) and Human Language Technologies (HLT) for Semitic Languages Status, Updates, and Prospects, LREC-2010 Workshop//,
-Malta, pp. 57-61.
-2010.
-[PDF http://spraakdata.gu.se/svedd/pub/lrec10.pdf]
-#BR
-//A study of Semitic non-concatenative morphology from the GF point of view.//
-
-M. Humayoun and C. Raffalli.
-MathNat - Mathematical Text in a Controlled Natural Language.
-//Special issue: Natural Language Processing and its Applications. Journal on Research in Computing Science//, Volume 46.
-2010.
-#BR
-//Natural language interface to a proof system, implemented in GF.//
-
-D. Dannélls.
-Discourse Generation from Formal Specifications Using the Grammatical Framework, GF.
-//Special issue: Natural Language Processing and its Applications. Journal on Research in Computing Science (RCS)//,
-volume 46. pp. 167-178,
-2010.
-#BR
-//Interfacing GF with ontology, with a natural language generation perspective.//
-
-R. Enache, A. Ranta, and K. Angelov.
-An Open-Source Computational Grammar of Romanian.
-A. Gelbukh (ed.), //CiCLING-2010//,
-LNCS 6008,
-2010.
-#BR
-//A Romance language different enough not to follow the Romance functor.//
-
-K. Angelov and A. Ranta.
-Implementing Controlled Languages in GF.
-N. Fuchs (ed.), //CNL-2009 Controlled Natural Languages//,
-LNCS/LNAI 5972,
-2010.
-
-K. Angelov, B. Bringert and A. Ranta.
-PGF: A Portable Run-time Format for Type-theoretical Grammars,
-//Journal of Logic, Language and Information//,
-19(2),
-pp. 201-228,
-2009.
-[SpringerLink http://www.springerlink.com/content/y32q021028747k70/]
-
-A. Ranta.
-The GF Resource Grammar Library.
-//Linguistic Issues in Language Technology//,
-2 (2),
-2009.
-[PDF http://elanguage.net/journals/index.php/lilt/article/viewFile/214/158]
-#BR
-//A systematic presentation of the library from the linguistic point of view.//
-
-A. Ranta.
-Grammatical Framework: A Multilingual Grammar Formalism,
-//Language and Linguistics Compass//,
-Vol. 3, [on-line http://www.blackwell-compass.com/subject/linguistics/article_view?parent=section&last_results=section%3Dlnco-computational&sortby=date§ion=lnco-computational&browse_id=lnco_articles_bpl155&article_id=lnco_articles_bpl155]
-2009.
-#BR
-//An overview of GF for readers with a general academic brackground.//
-
-A. Ranta and K. Angelov.
-Implementing Controlled Languages in GF.
-//CNL-2009//,
-//CEUR Workshop Proceedings//,
-vol. 448,
-[on-line http://sunsite.informatik.rwth-aachen.de/Publications/CEUR-WS/Vol-448/],
-2009.
-#BR
-//Makes a case for using GF in controlled language implementation, illustrated by Attempto Controlled English ported to French, German, and Swedish; longer version in 2010.//
-
-A. Ranta. Grammars as Software Libraries.
-In Y. Bertot, G. Huet, J-J. Lévy, and G. Plotkin (eds.),
-//From Semantics to Computer Science//,
-Cambridge University Press, Cambridge,
-pp. 281-308,
-2009.
-[pdf (preliminary version) http://www.cse.chalmers.se/~aarne/articles/libraries-kahn.pdf]
-#BR
-//Grammar-libraries from the software engineering point of view, with an example application to mathematical language.//
-
-K. Angelov.
-Incremental Parsing in Parallel Multiple Context-Free Grammars.
-EACL 2009.
-#BR
-//Describes the algorithm used in parsing with GF.//
-
-A. Ranta, B. Bringert, and K. Angelov.
-The GF Grammar Development Environment.
-System demo. Proceedings of //EACL-2009//,
-2009.
-[PDF http://www.aclweb.org/anthology-new/E/E09/E09-2015.pdf]
-#BR
-//An overview of GF from the grammarian's point of view.//
-
-B. Bringert, K. Angelov, and A. Ranta.
-Grammatical Framework Web Service,
-System demo. Proceedings of //EACL-2009//,
-2009.
-[PDF http://www.aclweb.org/anthology-new/E/E09/E09-2003.pdf]
-#BR
-//An overview of how to build web services on top of PGF using the Google Web Toolkit.//
-
-
-A. Ranta and K. Angelov.
-Implementing Controlled Languages in GF,
-To appear in the proceedings of //CNL-2009//, LNCS, Springer,
-2009.
-#BR
-//On the use of GF for controlled languages, exemplified by an implementation of Attempto Controlled English then ported to three other language.//
-
-R. Cooper and A. Ranta.
-Natural Languages as Collections of Resources.
-In //Language in Flux: Dialogue Coordination, Language Variation, Change//,
-ed. by R. Cooper and R. Kempson, pp. 109-120. London: College Publications,
-2008.
-#BR
-//The resource grammar idea applied to language learning and evolution.//
-
-Moisés Salvador Meza Moreno and B. Bringert.
-Interactive Multilingual Web Applications with Grammatical Framework.
-In B. Nordström and A. Ranta (eds),
-//Advances in Natural Language Processing (GoTAL 2008)//,
-LNCS/LNAI 5221, Springer,
-2008.
-#BR
-//Shows how GF compiled to JavaScript is used in dynamic multilingual web pages.//
-
-Peter Ljunglöf and Staffan Larsson.
-A grammar formalism for specifying ISU-based dialogue systems.
-In B. Nordström and A. Ranta (eds),
-//Advances in Natural Language Processing (GoTAL 2008)//,
-LNCS/LNAI 5221, Springer,
-2008.
-[pdf http://www.ling.gu.se/~peb/pubs/LjunglofLarsson-2008a.pdf]
-#BR
-//Explains how GoDiS dialogue systems are specified by GF grammars.//
-
-K. Angelov.
-Type-Theoretical Bulgarian Grammar.
-In B. Nordström and A. Ranta (eds),
-//Advances in Natural Language Processing (GoTAL 2008)//,
-LNCS/LNAI 5221, Springer,
-2008.
-#BR
-//Explains the implementation of a Bulgarian resource grammar in GF.//
-
-B. Bringert.
-High-precision Domain-specific Interlingua-based Speech Translation
-with Grammatical Framework.
-//Coling 2008 Workshop on Speech Translation for Medical and Other Safety-Critical Applications//,
-Manchester, UK, August 23,
-2008.
-#BR
-//Shows how to build spoken language translators based on GF grammars and their compilation to Nuance.//
-
-A. Ranta.
-How predictable is Finnish morphology? An experiment on lexicon construction.
-In J. Nivre, M. Dahllöf and B. Megyesi (eds),
-//Resourceful Language Technology: Festschrift in Honor of Anna Sågvall Hein//,
-University of Uppsala,
-2008.
-Available from [series homepage http://publications.uu.se/abstract.xsql?dbid=8933]
-#BR
-//Presents an experiment on smart paradigms in Finnish.//
-
-A. Ranta.
-Example-based grammar writing.
-To appear in L. Borin and S. Larsson (eds),
-Festschrift for Robin Cooper,
-2007.
-#BR
-//Presents and discusses the ideas of grammar composition and example-based grammar writing.//
-
-B. Bringert.
-Rapid Development of Dialogue Systems by Grammar Compilation.
-//8th SIGdial Workshop on Discourse and Dialogue//,
-Antwerp, Belgium, September 1-2,
-2007.
-[pdf http://www.cse.chalmers.se/~bringert/publ/gf-voicexml/gf-voicexml.pdf]
-#BR
-//Shows how to build a web-based spoken dialogue system by generating VoiceXML and JavaScript.//
-
-A. El Dada and A. Ranta.
-Implementing an Open Source Arabic Resource Grammar in GF.
-In M. Mughazy (ed),
-//Perspectives on Arabic Linguistics XX. Papers from the Twentieth Annual Symposium on Arabic Linguistics, Kalamazoo, March 26//
-John Benjamins Publishing Company.
-2007.
-#BR
-//An outline of the Arabic resource grammar project, focusing on linguistic aspects.//
-
-A. El Dada.
-Implementation of the Arabic Numerals and their Syntax in GF.
-Computational Approaches to Semitic Languages: Common Issues and Resources,
- ACL-2007 Workshop,
-June 28, 2007, Prague.
-2007.
-#BR
-//A case study with the resource grammar, focusing on the morphosyntax//
-//and agreement of constructions with numerals.//
-
-A. Ranta.
-Modular Grammar Engineering in GF.
-//Research on Language and Computation//,
-5:133-158, 2007.
-Draft available as [pdf http://www.cse.chalmers.se/~aarne/articles/multieng3.pdf].
-#BR
-//Adapts library-based software engineering methods to grammar writing//
-//and introduces the module system of GF.//
-
-A. Ranta.
-The GF Grammar Compiler.
-//Workshop on New Directions in Type-theoretic Grammars//,
-Dublin, August 2007 (ESSLLI workshop).
-2007.
-[pdf http://www.cse.chalmers.se/~aarne/articles/ar-compiler.pdf]
-#BR
-//Describes the compilation of GF source code to lower-level run-time formats.//
-
-M. Humayoun, H. Hammarström, and A. Ranta.
-Urdu Morphology, Orthography and Lexicon Extraction.
-//CAASL-2: The Second Workshop on Computational Approaches to Arabic Script-based Languages//,
-July 21-22, 2007, LSA 2007 Linguistic Institute, Stanford University.
-2007.
-#BR
-//Fairly complete open-source Urdu morphology and elemenraty syntax in GF.//
-
-N. Perera and A. Ranta.
-Dialogue System Localization with the GF Resource Grammar Library.
-//SPEECHGRAM 2007: ACL Workshop on Grammar-Based Approaches to Spoken Language Processing//,
-June 29, 2007, Prague.
-2007.
-[pdf http://www.cse.chalmers.se/~aarne/articles/perera-ranta.pdf]
-#BR
-//An experiment in porting an in-car dialogue system from two to six languages.//
-
-
-B. Bringert.
-Speech Recognition Grammar Compilation in Grammatical Framework
-//SPEECHGRAM 2007: ACL Workshop on Grammar-Based Approaches to Spoken Language Processing//,
-June 29, 2007, Prague.
-2007.
-#BR
-//Generation of speech recognition language models from GF in several formats://
-//GSL (Nuance), SRGS, JSGF, and HTK SLF, with embedded semantic interpretation.//
-
-A. Ranta.
-Features in Abstract and Concrete Syntax.
-//The 2nd International Workshop on Typed Feature Structure Grammars//,
-Tartu, 24 May 2007 (NODALIDA workshop).
-2007.
-[pdf http://www.cse.chalmers.se/~aarne/articles/ranta-tfsg2007.pdf]
-#BR
-//Explores the design choices of incorporating features in a GF-like grammar,//
-//with comparisons to feature-based unification grammars.//
-
-
-O. Caprotti and M. Seppälä.
-Multilingual Delivery of Online Tests in mathematics.
-Proceedings of Online Educa Berlin 2006. 29 November - 1 December 2006.
- Berlin, Germany.
-2006.
-[pdf http://webalt.math.helsinki.fi/content/e16/e301/e785/MultilingualDeliveryofOnlineTestsinMathematics_eng.pdf]
-#BR
-//This papers shows screenshots of multilingual generation in the//
-//WebALT project, using GF and the resource grammar library.//
-
-J. Khegai.
-Language engineering in Grammatical Framework (GF).
-Phd thesis, Computer Science, Chalmers University of Technology,
-2006.
-[pdf http://www.cse.chalmers.se/~janna/Janna_Khegai_phd.pdf]
-#BR
-//Collection of articles and technical reports on multilingual authoring//
-//and the Russian resource grammar.//
-
-B. Bringert and A. Ranta.
-A Pattern for Almost Compositional Functions.
-//ICFP 2006, The 11th ACM SIGPLAN International Conference on Functional Programming, Portland, Oregon, September 18-20, 2006//,
-2006.
-[pdf http://www.cse.chalmers.se/~bringert/publ/composOp/composOp.pdf].
-#BR
-//A method of generic programming useful for compiler construction//
-//and transfer-based translation.//
-
-M. Forsberg, H. Hammarstrom, and A. Ranta.
-Morphological Lexicon Extraction from Raw Text Data.
-//FinTAL 2006//,
-Turku, August 23-25, 2006.
-Springer LNCS/LNAI 4139,
-pp. 488-499,
-2006.
-#BR
-//A method for automatical production of morphological lexica based//
-//on inflection engines such as those of GF resource grammar library.//
-
-A. Ranta.
-Type Theory and Universal Grammar.
-//Philosophia Scientiae, Constructivism: Mathematics, Logic, Philosophy and Linguistics//,
-cahier spécial 6,
-pp. 115-131,
-2006.
-#BR
-//A philosophical study of the medieval thesis that//
-//grammar is the same in all languages and the difference is only in words.//
-
-J. Khegai.
-GF parallel resource grammars and Russian.
-In proceedings of ACL2006
- (The joint conference of the International Committee on Computational
- Linguistics and the Association for Computational Linguistics) (pp. 475-482),
- Sydney, Australia, July 2006.
-#BR
-//Gives an outline of the Russian resource grammar project.//
-
-J. Khegai.
-Grammatical Framework (GF) for MT in sublanguage domains.
-Proceedings of 11th Annual conference of the European Association for
- Machine Translation, , Oslo.
-pp. 95-104,
-2005.
-#BR
-//Shows how GF is used in controlled language translation.//
-
-
-
-W. Ng'ang'a.
-Multilingual content development for eLearning in Africa.
-eLearning Africa: 1st Pan-African Conference on ICT for Development,
- Education and Training. 24-26 May 2006, Addis Ababa, Ethiopia.
-2006.
-[pdf http://webalt.math.helsinki.fi/content/e16/e301/e583/MultilingualContentDevelopmentforeLearninginAfrica-final1_eng.pdf]
-#BR
-//Presents a programme for producing educational material in African languages//
-//via multilingual generation in GF.//
-
-R. Jonson.
-Generating statistical language models from interpretation grammars in dialogue system.
-In Proceedings of EACL'06, Trento, Italy.
-2006.
-#BR
-//Uses GF grammars to generate statistical language models for speech recognition.//
-
-A. El Dada and A. Ranta.
-Arabic Resource Grammar.
-//Arabic Language Processing (JETALA)//,
-5-6 June 2006, IERA, Rabat, Morocco,
-2006.
-#BR
-//An outline of the Arabic resource grammar project, focusing on software aspects.//
-
-D. A. Burke and K. Johannisson.
-Translating Formal Software Specifications to Natural Language. A Grammar-Based Approach.
-In P. Blache, E. Stabler, J. Busquets and R. Moot (eds),
-Logical Aspects of Computational Linguistics (LACL 2005),
-Springer LNAI 3402,
-pp. 51-66,
-2005.
-#BR
-//A paper explaining how a multilingual GF grammar is completed with//
-//Natural Language Generation techniques to improve text quality.//
-
-
-B. Bringert, R. Cooper, P. Ljunglöf, A. Ranta,
-Multimodal Dialogue System Grammars.
-//Proceedings of DIALOR'05, Ninth Workshop on the Semantics and Pragmatics of Dialogue, Nancy, France, June 9-11, 2005//,
-2005.
-[pdf http://www.cse.chalmers.se/~bringert/publ/mm-grammars-dialor/mm-grammars-dialor.pdf].
-#BR
-//Shows how mouse clicks can be integrated in GF grammars//
-//alongside with speech input.//
-
-
-
-K. Johannisson,
-Formal and Informal Software Specifications.
-PhD thesis,
-Computer Science, Göteborg University,
-2005.
-[http://www.cse.chalmers.se/~krijo/thesis/thesisA4.pdf]
-#BR
-//Collection of articles in the GF-KeY project, with an introduction.//
-
-P. Ljunglöf.
-Expressivity and Complexity of the Grammatical Framework.
-PhD thesis, Computer Science,
-Göteborg University,
-2004.
-[pdf http://www.cse.chalmers.se/~peb/pubs/Ljunglof-2004a.pdf]
-#BR
-//Language-theoretical study of GF and its parsing problem.//
-
-A. Ranta.
-Grammatical Framework: A Type-Theoretical Grammar Formalism.
-//Journal of Functional Programming//, 14(2),
-pp. 145-189,
-2004.
-Draft available as [ps.gz http://www.cse.chalmers.se/~aarne/articles/gf-jfp.ps.gz].
-#BR
-//Theoretical paper explaining the GF formalism and its implementation.//
-//The standard reference on GF, but doesn't cover the module system.//
-
-
-A. Ranta.
-Computational semantics in type theory.
-//Mathematics and Social Sciences//, 165,
-pp. 31-57,
-2004.
-Draft available as [pdf http://www.cse.chalmers.se/~aarne/articles/3formsem.pdf].
-#BR
-// Shows how Montague-style grammars are implemented in GF and extends//
-//this to type-theoretical grammars for anaphoric expressions.//
-
-H. Hammarström and A. Ranta.
-Cardinal Numerals Revisited in GF.
-//Workshop on Numerals in the World's Languages//.
-Dept. of Linguistics Max Planck Institute for Evolutionary Anthropology, Leipzig,
-2004.
-#BR
-//An overview of the numeral grammar project, covering 88 languages.//
-
-
-A. Ranta.
-Grammatical Framework Tutorial.
-In A. Beckmann and N. Preining, editors,
-//ESSLLI 2003 Course Material I//,
-//Collegium Logicum//,
-volume V,
-pp. 1-86.
-Kurt Gödel Society,
-Vienna,
-2004.
-#BR
-//A revised version of the on-line GF tutorial, v1.0.//
-
-
-J. Khegai and A. Ranta.
-Building and Using a Russian Resource Grammar in GF.
-In A. Gelbukh (ed),
-//Intelligent Text Processing and Computational Linguistics (CICLing-2004)//,
-Seoul, Korea, February 2003,
-Springer LNCS 945,
-pp. 38-41,
-2004.
-[ps.gz http://www.cse.chalmers.se/~aarne/articles/mexico.ps.gz].
-#BR
-//An introduction to the GF resource grammar project, with Russian as prime example.//
-
-
-A. Ranta and R. Cooper.
-Dialogue Systems as Proof Editors.
- //Journal of Logic, Language and Information//, 13,
-pp. 225-240,
-2004.
-Conference version (IJCAR/ICoS-3, Siena, June 2001) available as
- [ps.gz http://www.cse.chalmers.se/~aarne/articles/dialogue3.ps.gz].
-//Shows a close analogy between task-oriented dialogue systems//
-//and metavariable-based proof editors.//
-
-
-J. Khegai and A. Ranta.
-Building and Using a Russian Resource Grammar in GF.
-In A. Gelbukh (ed),
-//Intelligent Text Processing and Computational Linguistics (CICLing-2004)//,
-Seoul, Korea, February 2003,
-Springer LNCS 945,
-pp. 38-41,
-2004.
-[ps.gz http://www.cse.chalmers.se/~aarne/articles/mexico.ps.gz].
-#BR
-//Explains how the GF GUI is used in syntax editing and discusses//
-//how new grammars are created.//
-
-
-R. Hähnle, K. Johannisson, and A. Ranta.
-An Authoring Tool for Informal and Formal Requirements Specifications.
-In R. D. Kutsche and H. Weber (eds),
-//ETAPS/FASE-2002: Fundamental Approaches to Software Engineering//,
-Springer LNCS,
-vol. 2306,
-pp. 233--248,
-2002.
-[pdf http://www.cse.chalmers.se/~krijo/GF/FASE.pdf]
-#BR
-//Describes a GF-based authoring tool for object-oriented//
-//specifications in OCL and English. Carries out in full//
-//the work proposed in the position paper (Hähnle & Ranta 2001).//
-
-
-
-K. Johannisson and A.Ranta,
-Formal Verification of Multilingual Instructions.
-//Proceedings of the Joint Winter Meeting 2001//.
-Departments of Computer Science and Computer Engineering,
-Chalmers University of Technology and Göteborg University.
-2001.
-[ps.gz http://www.cse.chalmers.se/~aarne/articles/aarne+krijo.ps.gz].
-#BR
-//Instructions for an alarm system in four languages, verified in the proof editor Alfa.//
-
-
-R. Hähnle and A. Ranta,
-Connecting OCL with the Rest of the World.
-//ETAPS 2001 Workshop on Transformations in UML (WTUML)//,
-Genova,
-2001.
-[ps.gz http://www.cse.chalmers.se/~reiner/papers/wtuml.ps.gz].
-#BR
-//A position paper explaining how GF can be used to help in object-oriented//
-//modelling, with some examples on natural-language interaction with//
-//OCL (Object Constraint Language)//.
-
-
-
-T. Hallgren, "The Correctness of Insertion Sort",
-Manuscript, Chalmers University, Göteborg, 2001.
-Available in
-[ps http://www.cse.chalmers.se/~hallgren/Papers/insertion_sort.ps]
-#BR
-//A seven-page text generated by GF-Alfa//.
-
-
-A. Ranta. "Bescherelle bricolé",
-[ps.gz ../../GF2.0/doc/BeschBric.ps.gz],
-2001.
-#BR
-//A machine-generated book on French conjugation implemented in GF.//
-
-
-T. Hallgren and A. Ranta,
-An Extensible Proof Text Editor.
-In M. Parigot and A. Voronkov (eds),
-//Logic for Programming and Automated Reasoning (LPAR'2000)//,
-LNCS/LNAI 1955,
-pp. 70-84,
-Springer Verlag, Heidelberg,
-2000.
-[ps.gz http://www.cse.chalmers.se/~aarne/articles/lpar2000.ps.gz].
-#BR
-//Describes an interface to the proof editor Alfa written in GF//.
-
-
-M. Dymetman, V. Lux, and A. Ranta,
-XML and multilingual document authoring: converging trends.
-//Proceedings of the The 18th International Conference on Computational Linguistics (COLING 2000)//,
-pp. 243-249,
-Saarbruecken,
-2000.
-[ps.gz http://www.cse.chalmers.se/~aarne/articles/coling2000.ps.gz].
-#BR
-//Relates GF not only with XML but also with definite clause grammars//.
-
-
-
-P. Mäenpää and A. Ranta.
-The type theory and type checker of GF.
-//Colloquium on Principles, Logics, and Implementations of High-Level Programming Languages, Workshop on Logical Frameworks and Meta-languages, Paris, 28 September 1999//.
-1999.
-[ps.gz href=http://www.cse.chalmers.se/~aarne/papers/lfm1999.ps.gz].
-#BR
-//Concise theoretical presentation of GF, using the old notation prior to v0.9//.
-
-
-
-
-
-
-
-
-==Background for GF==
-
-In alphabetical order:
-
-
-
-L. Magnusson.
-//The Implementation of ALF - a Proof Editor based on Martin-Löf's//
-//Monomorphic Type Theory with Explicit Substitutions//.
-PhD Thesis, Department of Computing Science,
-Chalmers University of Technology and Göteborg University,
-1994.
-#BR
-//Back in 1992 the most wonderful program in the world, ALF is//
-//a model that GF directly follows: GF is Yet ALF.//
-
-
-
-P. Martin-Löf.
-//Intuitionistic Type Theory//.
-Bibliopolis, Naples, 1984.
-#BR
-//A very accessible book (if you have access to it!) on type theory directly from the source.//
-
-
-
-B. Nordström, K. Petersson, and J. Smith.
-//Programming in Martin-Löf's Type Theory: an Introduction//.
-Oxford University Press, 1990.
- The book is out of print, but a free version can be picked up from
-[www.cse.chalmers.se/Cs/Research/Logic/book/ http://www.cse.chalmers.se/Cs/Research/Logic/book/]
-#BR
-//Standard reference on the subject//.
-
-
-A. Ranta.
-//Type Theoretical Grammar//.
-Oxford University Press, Oxford,
-1994.
-#BR
-//Monograph on type theory in linguistics. Includes an introduction//
-//to type theory. Focused on semantics, in particular anaphora. A first,//
-//very rudimentary implementation of linearization in the proof system ALF.//
-
-
-A. Ranta.
-Syntactic categories in the language of mathematics.
-In P. Dybjer, B. Nordström, and J. Smith, eds.,
-//Types for Proofs and Programs//,
-pp. 162-182,
-Lecture Notes in Computer Science
-996,
-Springer-Verlag,
-Heidelberg,
-1995.
-[ps.gz http://www.cse.chalmers.se/~aarne/articles/baastad.ps.gz]
-#BR
-//Predecessor of GF: grammar defined in type theory and implemented in ALF//.
-
-A. Ranta.
-Context-relative syntactic categories and the formalization of mathematical text.
-In S. Berardi and M. Coppo, eds.,
-//Types for Proofs and Programs//,
-pp. 231-248,
-Lecture Notes in Computer Science
-1158,
-Springer-Verlag,
-Heidelberg,
-1996.
-[ps.gz http://www.cse.chalmers.se/~aarne/articles/torino.ps.gz].
-#BR
-//Extending the theory of the previous paper. The implementation in ALF//
-//eventually became so heavy that the need arose for GF.//
-
-
-A. Ranta.
-Structures grammaticales dans le français mathématique.
-//Mathématiques, informatique et Sciences Humaines.//,
-vol. 138 pp. 5-56 and 139 pp. 5-36,
-1997.
-#BR
-//A rather comprehensive French grammar presented in a type-theoretical style.//
-
-
-A. Ranta.
- Syntactic calculus with dependent types.
- //Journal of Logic, Language and Information//, vol. 4,
- pp. 413-431, 1998.
-#BR
-//Interprets Lambek Calculus in type theory and defines some extensions//.
-
-
diff --git a/doc/gf-developers-old-cabal.t2t b/doc/gf-developers-old-cabal.md
similarity index 53%
rename from doc/gf-developers-old-cabal.t2t
rename to doc/gf-developers-old-cabal.md
index 0f583bec8e..bd237970b4 100644
--- a/doc/gf-developers-old-cabal.t2t
+++ b/doc/gf-developers-old-cabal.md
@@ -1,201 +1,145 @@
-GF Developer's Guide: Old installation instructions with Cabal
-
-This page contains the old installation instructions from the [Developer's Guide ../doc/gf-developers.html].
+This page contains the old installation instructions from the [Developer's Guide](../doc/gf-developers.html).
We recommend Stack as a primary installation method, because it's easier for a Haskell beginner, and we want to keep the main instructions short.
-But if you are an experienced Haskeller and want to keep using Cabal, here are the old instructions using ``cabal install``.
+But if you are an experienced Haskeller and want to keep using Cabal, here are the old instructions using `cabal install`.
Note that some of these instructions may be outdated. Other parts may still be useful.
-== Compilation from source with Cabal ==
+## Compilation from source with Cabal
-The build system of GF is based on //Cabal//, which is part of the
+The build system of GF is based on *Cabal*, which is part of the
Haskell Platform, so no extra steps are needed to install it. In the simplest
case, all you need to do to compile and install GF, after downloading the
source code as described above, is
-```
-$ cabal install
-```
+ $ cabal install
This will automatically download any additional Haskell libraries needed to
build GF. If this is the first time you use Cabal, you might need to run
-``cabal update`` first, to update the list of available libraries.
+`cabal update` first, to update the list of available libraries.
If you want more control, the process can also be split up into the usual
-//configure//, //build// and //install// steps.
+*configure*, *build* and *install* steps.
-=== Configure ===
+### Configure
During the configuration phase Cabal will check that you have all
necessary tools and libraries needed for GF. The configuration is
started by the command:
-```
-$ cabal configure
-```
+ $ cabal configure
If you don't see any error message from the above command then you
have everything that is needed for GF. You can also add the option
-``-v`` to see more details about the configuration.
+`-v` to see more details about the configuration.
-You can use ``cabal configure --help`` to get a list of configuration options.
+You can use `cabal configure --help` to get a list of configuration options.
-=== Build ===
+### Build
The build phase does two things. First it builds the GF compiler from
the Haskell source code and after that it builds the GF Resource Grammar
Library using the already build compiler. The simplest command is:
-```
-$ cabal build
-```
+ $ cabal build
-Again you can add the option ``-v`` if you want to see more details.
+Again you can add the option `-v` if you want to see more details.
-==== Parallel builds ====
+#### Parallel builds
If you have Cabal>=1.20 you can enable parallel compilation by using
-```
-$ cabal build -j
-```
+ $ cabal build -j
or by putting a line
-```
-jobs: $ncpus
-```
-in your ``.cabal/config`` file. Cabal
+
+ jobs: $ncpus
+
+in your `.cabal/config` file. Cabal
will pass this option to GHC when building the GF compiler, if you
have GHC>=7.8.
-Cabal also passes ``-j`` to GF to enable parallel compilation of the
+Cabal also passes `-j` to GF to enable parallel compilation of the
Resource Grammar Library. This is done unconditionally to avoid
causing problems for developers with Cabal<1.20. You can disable this
-by editing the last few lines in ``WebSetup.hs``.
+by editing the last few lines in `WebSetup.hs`.
-=== Install ===
+### Install
After you have compiled GF you need to install the executable and libraries
to make the system usable.
-```
-$ cabal copy
-$ cabal register
-```
+ $ cabal copy
+ $ cabal register
This command installs the GF compiler for a single user, in the standard
place used by Cabal.
-On Linux and Mac this could be ``$HOME/.cabal/bin``.
-On Mac it could also be ``$HOME/Library/Haskell/bin``.
-On Windows this is ``C:\Program Files\Haskell\bin``.
+On Linux and Mac this could be `$HOME/.cabal/bin`.
+On Mac it could also be `$HOME/Library/Haskell/bin`.
+On Windows this is `C:\Program Files\Haskell\bin`.
The compiled GF Resource Grammar Library will be installed
under the same prefix, e.g. in
-``$HOME/.cabal/share/gf-3.3.3/lib`` on Linux and
-in ``C:\Program Files\Haskell\gf-3.3.3\lib`` on Windows.
+`$HOME/.cabal/share/gf-3.3.3/lib` on Linux and
+in `C:\Program Files\Haskell\gf-3.3.3\lib` on Windows.
-If you want to install in some other place then use the ``--prefix``
+If you want to install in some other place then use the `--prefix`
option during the configuration phase.
-=== Clean ===
+### Clean
Sometimes you want to clean up the compilation and start again from clean
sources. Use the clean command for this purpose:
-```
-$ cabal clean
-```
-
-
-%=== SDist ===
-%
-%You can use the command:
-%
-%% This does *NOT* include everything that is needed // TH 2012-08-06
-%```
-%$ cabal sdist
-%```
-%
-%to prepare archive with all source codes needed to compile GF.
+ $ cabal clean
-=== Known problems with Cabal ===
+### Known problems with Cabal
Some versions of Cabal (at least version 1.16) seem to have a bug that can
cause the following error:
-```
-Configuring gf-3.x...
-setup: Distribution/Simple/PackageIndex.hs:124:8-13: Assertion failed
-```
+ Configuring gf-3.x...
+ setup: Distribution/Simple/PackageIndex.hs:124:8-13: Assertion failed
The exact cause of this problem is unclear, but it seems to happen
during the configure phase if the same version of GF is already installed,
so a workaround is to remove the existing installation with
-```
-ghc-pkg unregister gf
-```
+ ghc-pkg unregister gf
-You can check with ``ghc-pkg list gf`` that it is gone.
+You can check with `ghc-pkg list gf` that it is gone.
-== Compilation with make ==
+## Compilation with make
If you feel more comfortable with Makefiles then there is a thin Makefile
wrapper arround Cabal for you. If you just type:
-```
-$ make
-```
+
+ $ make
+
the configuration phase will be run automatically if needed and after that
the sources will be compiled.
-%% cabal build rgl-none does not work with recent versions of Cabal
-%If you don't want to compile the resource library
-%every time then you can use:
-%```
-%$ make gf
-%```
-
For installation use:
-```
-$ make install
-```
-For cleaning:
-```
-$ make clean
-```
-%and to build source distribution archive run:
-%```
-%$ make sdist
-%```
+ $ make install
-== Partial builds of RGL ==
+For cleaning:
-**NOTE**: The following doesn't work with recent versions of ``cabal``. //(This comment was left in 2015, so make your own conclusions.)//
-%% // TH 2015-06-22
+ $ make clean
-%Sometimes you just want to work on the GF compiler and don't want to
-%recompile the resource library after each change. In this case use
-%this extended command:
+## Partial builds of RGL
-%```
-%$ cabal build rgl-none
-%```
+**NOTE**: The following doesn't work with recent versions of `cabal`. *(This comment was left in 2015, so make your own conclusions.)*
The resource grammar library can be compiled in two modes: with present
tense only and with all tenses. By default it is compiled with all
tenses. If you want to use the library with only present tense you can
compile it in this special mode with the command:
-```
-$ cabal build present
-```
+ $ cabal build present
You could also control which languages you want to be recompiled by
-adding the option ``langs=list``. For example the following command
+adding the option `langs=list`. For example the following command
will compile only the English and the Swedish language:
-```
-$ cabal build langs=Eng,Swe
-```
+ $ cabal build langs=Eng,Swe
diff --git a/doc/gf-developers.md b/doc/gf-developers.md
new file mode 100644
index 0000000000..7550927c85
--- /dev/null
+++ b/doc/gf-developers.md
@@ -0,0 +1,317 @@
+
+## Before you start
+
+This guide is intended for people who want to contribute to
+the development of the GF compiler or the Resource Grammar Library. If
+you are a GF user who just wants to download and install GF
+(e.g to develop your own grammars), the simpler guide on
+[the GF download page](../download/index.html) should be sufficient.
+
+## Setting up your system for building GF
+
+To build GF from source you need to install some tools on your
+system: the Haskell build tool *Stack*, the version control software *Git* and the *Haskeline* library.
+
+### Stack
+
+The primary installation method is via *Stack*.
+(You can also use Cabal, but we recommend Stack to those who are new to Haskell.)
+
+To install Stack:
+
+ * **On Linux and Mac OS**, do either
+
+`$ curl -sSL https://get.haskellstack.org/ | sh`
+
+or
+
+`$ wget -qO- https://get.haskellstack.org/ | sh`
+
+ * **On other operating systems**, see the [installation guide](https://docs.haskellstack.org/en/stable/install_and_upgrade).
+
+### Git
+
+To get the GF source code, you also need *Git*, a distributed version control system.
+
+ * **On Linux**, the best option is to install the tools via the standard
+software distribution channels:
+
+ * On Ubuntu: `sudo apt-get install git-all`
+ * On Fedora: `sudo dnf install git-all`
+
+ * **On other operating systems**, see
+https://git-scm.com/book/en/v2/Getting-Started-Installing-Git for installation.
+
+### Haskeline
+
+GF uses *haskeline* to enable command line editing in the GF shell.
+
+ * **On Mac OS and Windows**, this should work automatically.
+
+ * **On Linux**, an extra step is needed to make sure the C libraries (terminfo)
+required by *haskeline* are installed:
+
+ * On Ubuntu: `sudo apt-get install libghc-haskeline-dev`
+ * On Fedora: `sudo dnf install ghc-haskeline-devel`
+
+## Getting the source
+
+Once you have all tools in place you can get the GF source code from
+[GitHub](https://github.com/GrammaticalFramework/):
+
+ * https://github.com/GrammaticalFramework/gf-core for the GF compiler
+ * https://github.com/GrammaticalFramework/gf-rgl for the Resource Grammar Library
+
+### Read-only access: clone the main repository
+
+If you only want to compile and use GF, you can just clone the repositories as follows:
+
+ $ git clone https://github.com/GrammaticalFramework/gf-core.git
+ $ git clone https://github.com/GrammaticalFramework/gf-rgl.git
+
+To get new updates, run the following anywhere in your local copy of the repository:
+
+ $ git pull
+
+### Contribute your changes: fork the main repository
+
+If you want the possibility to contribute your changes,
+you should create your own fork, do your changes there,
+and then send a pull request to the main repository.
+
+1. **Creating and cloning a fork —**
+See GitHub documentation for instructions how to [create your own fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo)
+of the repository. Once you've done it, clone the fork to your local computer.
+
+ $ git clone https://github.com//gf-core.git
+
+1. **Updating your copy —**
+Once you have cloned your fork, you need to set up the main repository as a remote:
+
+ $ git remote add upstream https://github.com/GrammaticalFramework/gf-core.git
+
+Then you can get the latest updates by running the following:
+
+ $ git pull upstream master
+
+1. **Recording local changes —**
+See Git tutorial on how to [record and push your changes](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository) to your fork.
+
+1. **Pull request —**
+When you want to contribute your changes to the main gf-core repository,
+[create a pull request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request)
+from your fork.
+
+If you want to contribute to the RGL as well, do the same process for the RGL repository.
+
+## Compilation from source
+
+By now you should have installed Stack and Haskeline, and cloned the Git repository on your own computer, in a directory called `gf-core`.
+
+### Primary recommendation: use Stack
+
+Open a terminal, go to the top directory (`gf-core`), and type the following command.
+
+ $ stack install
+
+It will install GF and all necessary tools and libraries to do that.
+
+### Alternative: use Cabal
+
+You can also install GF using Cabal, if you prefer Cabal to Stack. In that case, you may need to install some prerequisites yourself.
+
+The actual installation process is similar to Stack: open a terminal, go to the top directory (`gf-core`), and type the following command.
+
+ $ cabal install
+
+*The old (potentially outdated) instructions for Cabal are moved to a [separate page](../doc/gf-developers-old-cabal.html). If you run into trouble with `cabal install`, you may want to take a look.*
+
+## Compiling GF with C runtime system support
+
+The C runtime system is a separate implementation of the PGF runtime services.
+It makes it possible to work with very large, ambiguous grammars, using
+probabilistic models to obtain probable parses. The C runtime system might
+also be easier to use than the Haskell runtime system on certain platforms,
+e.g. Android and iOS.
+
+To install the C runtime system, go to the `src/runtime/c` directory.
+
+ * **On Linux and Mac OS —**
+You should have autoconf, automake, libtool and make.
+If you are missing some of them, follow the
+instructions in the [INSTALL](https://github.com/GrammaticalFramework/gf-core/blob/master/src/runtime/c/INSTALL) file.
+
+Once you have the required libraries, the easiest way to install the C runtime is to use the `install.sh` script. Just type
+
+`$ bash install.sh`
+
+This will install the C header files and libraries need to write C programs
+that use PGF grammars.
+
+ * **On other operating systems —** Follow the instructions in the
+[INSTALL](https://github.com/GrammaticalFramework/gf-core/blob/master/src/runtime/c/INSTALL) file under your operating system.
+
+Depending on what you want to do with the C runtime, you can follow one or more of the following steps.
+
+### Use the C runtime from another programming language
+
+ * **What —**
+This is the most common use case for the C runtime: compile
+your GF grammars into PGF with the standard GF executable,
+and manipulate the PGFs from another programming language,
+using the bindings to the C runtime.
+
+ * **How —**
+The Python, Java and Haskell bindings are found in the
+`src/runtime/{python,java,haskell-bind}` directories,
+respecively. Compile them by following the instructions
+in the `INSTALL` or `README` files in those directories.
+
+The Python library can also be installed from PyPI using `pip install pgf`.
+
+*If you are on Mac and get an error about `clang` version, you can try some of [these solutions](https://stackoverflow.com/questions/63972113/big-sur-clang-invalid-version-error-due-to-macosx-deployment-target)—but be careful before removing any existing installations.*
+
+### Use GF shell with C runtime support
+
+ * **What —**
+If you want to use the GF shell with C runtime functionalities, then you need to (re)compile GF with special flags.
+
+The GF shell can be started with `gf -cshell` or `gf -crun` to use
+the C run-time system instead of the Haskell run-time system.
+Only limited functionality is available when running the shell in these
+modes (use the `help` command in the shell for details).
+
+(Re)compiling your GF with these flags will also give you
+Haskell bindings to the C runtime, as a library called `PGF2`,
+but if you want Python or Java bindings, you need to do [the previous step](#bindings).
+
+ * **How —**
+If you use cabal, run the following command:
+
+ cabal install -fc-runtime
+
+from the top directory (`gf-core`).
+
+If you use stack, uncomment the following lines in the `stack.yaml` file:
+
+ flags:
+ gf:
+ c-runtime: true
+ extra-lib-dirs:
+ - /usr/local/lib
+and then run `stack install` from the top directory (`gf-core`).
+
+*If you get an "`error while loading shared libraries`" when trying to run GF with C runtime, remember to declare your `LD_LIBRARY_PATH`.*
+*Add `export LD_LIBRARY_PATH="/usr/local/lib"` to either your `.bashrc` or `.profile`. You should now be able to start GF with C runtime.*
+
+### Use GF server mode with C runtime
+
+ * **What —**
+With this feature, `gf -server` mode is extended with new requests to call the C run-time
+system, e.g. `c-parse`, `c-linearize` and `c-translate`.
+
+ * **How —**
+If you use cabal, run the following command:
+
+ cabal install -fc-runtime -fserver
+from the top directory.
+
+If you use stack, add the following lines in the `stack.yaml` file:
+
+ flags:
+ gf:
+ c-runtime: true
+ server: true
+ extra-lib-dirs:
+ - /usr/local/lib
+
+and then run `stack install`, also from the top directory.
+
+## Compilation of RGL
+
+As of 2018-07-26, the RGL is distributed separately from the GF compiler and runtimes.
+
+To get the source, follow the previous instructions on [how to clone a repository with Git](#getting-source).
+
+After cloning the RGL, you should have a directory named `gf-rgl` on your computer.
+
+### Simple
+
+To install the RGL, you can use the following commands from within the `gf-rgl` repository:
+
+ $ make install
+
+There is also `make build`, `make copy` and `make clean` which do what you might expect.
+
+### Advanced
+
+For advanced build options, call the Haskell build script directly:
+
+ $ runghc Setup.hs ...
+
+For more details see the [README](https://github.com/GrammaticalFramework/gf-rgl/blob/master/README.md).
+
+### Haskell-free
+
+If you do not have Haskell installed, you can use the simple build script `Setup.sh`
+(or `Setup.bat` for Windows).
+
+## Creating binary distribution packages
+
+The binaries are generated with Github Actions. More details can be viewed here:
+
+https://github.com/GrammaticalFramework/gf-core/actions/workflows/build-binary-packages.yml
+
+## Running the test suite
+
+The GF test suite is run with one of the following commands from the top directory:
+
+ $ cabal test
+
+or
+
+ $ stack test
+
+The testsuite architecture for GF is very simple but still very flexible.
+GF by itself is an interpreter and could execute commands in batch mode.
+This is everything that we need to organize a testsuite. The root of the
+testsuite is the `testsuite/` directory. It contains subdirectories
+which themselves contain GF batch files (with extension `.gfs`).
+The above command searches the subdirectories of the `testsuite/` directory
+for files with extension `.gfs` and when it finds one, it is executed with
+the GF interpreter. The output of the script is stored in file with extension `.out`
+and is compared with the content of the corresponding file with extension `.gold`, if there is one.
+
+Every time when you make some changes to GF that have to be tested,
+instead of writing the commands by hand in the GF shell, add them to one `.gfs`
+file in the testsuite subdirectory where its `.gf` file resides and run the test.
+In this way you can use the same test later and we will be sure that we will not
+accidentally break your code later.
+
+**Test Outcome - Passed:** If the contents of the files with the `.out` extension
+are identical to their correspondingly-named files with the extension `.gold`,
+the command will report that the tests passed successfully, e.g.
+
+ Running 1 test suites...
+ Test suite gf-tests: RUNNING...
+ Test suite gf-tests: PASS
+ 1 of 1 test suites (1 of 1 test cases) passed.
+
+**Test Outcome - Failed:** If there is a contents mismatch between the files
+with the `.out` extension and their corresponding files with the extension `.gold`,
+the test diagnostics will show a fail and the areas that failed. e.g.
+
+ testsuite/compiler/compute/Records.gfs: OK
+ testsuite/compiler/compute/Variants.gfs: FAIL
+ testsuite/compiler/params/params.gfs: OK
+ Test suite gf-tests: FAIL
+ 0 of 1 test suites (0 of 1 test cases) passed.
+
+The fail results overview is available in gf-tests.html which shows 4 columns:
+
+1. Results - only areas that fail will appear. (Note: There are 3 failures in the gf-tests.html which are labelled as (expected). These failures should be ignored.)
+1. Input - which is the test written in the .gfs file
+1. Gold - the expected output from running the test set out in the .gfs file. This column refers to the contents from the .gold extension files.
+1. Output - This column refers to the contents from the .out extension files which are generated as test output.
+After fixing the areas which fail, rerun the test command. Repeat the entire process of fix-and-test until the test suite passes before submitting a pull request to include your changes.
+
diff --git a/doc/gf-developers.t2t b/doc/gf-developers.t2t
deleted file mode 100644
index c20afda528..0000000000
--- a/doc/gf-developers.t2t
+++ /dev/null
@@ -1,384 +0,0 @@
-GF Developers Guide
-
-2021-07-15
-
-%!options(html): --toc
-
-== Before you start ==
-
-This guide is intended for people who want to contribute to
-the development of the GF compiler or the Resource Grammar Library. If
-you are a GF user who just wants to download and install GF
-(e.g to develop your own grammars), the simpler guide on
-[the GF download page ../download/index.html] should be sufficient.
-
-== Setting up your system for building GF ==
-
-To build GF from source you need to install some tools on your
-system: the Haskell build tool //Stack//, the version control software //Git// and the //Haskeline// library.
-
-%**On Linux** the best option is to install the tools via the standard
-%software distribution channels, i.e. by using the //Software Center//
-%in Ubuntu or the corresponding tool in other popular Linux distributions.
-
-%**On Mac OS and Windows**, the tools can be downloaded from their respective
-%web sites, as described below.
-
-=== Stack ===
-The primary installation method is via //Stack//.
-(You can also use Cabal, but we recommend Stack to those who are new to Haskell.)
-
-To install Stack:
-
-- **On Linux and Mac OS**, do either
-
- ``$ curl -sSL https://get.haskellstack.org/ | sh``
-
- or
-
- ``$ wget -qO- https://get.haskellstack.org/ | sh``
-
-
-- **On other operating systems**, see the [installation guide https://docs.haskellstack.org/en/stable/install_and_upgrade].
-
-
-%If you already have Stack installed, upgrade it to the latest version by running: ``stack upgrade``
-
-
-=== Git ===
-
-To get the GF source code, you also need //Git//, a distributed version control system.
-
-- **On Linux**, the best option is to install the tools via the standard
-software distribution channels:
-
- - On Ubuntu: ``sudo apt-get install git-all``
- - On Fedora: ``sudo dnf install git-all``
-
-
-- **On other operating systems**, see
-https://git-scm.com/book/en/v2/Getting-Started-Installing-Git for installation.
-
-
-
-=== Haskeline ===
-
-GF uses //haskeline// to enable command line editing in the GF shell.
-
-- **On Mac OS and Windows**, this should work automatically.
-
-- **On Linux**, an extra step is needed to make sure the C libraries (terminfo)
-required by //haskeline// are installed:
-
- - On Ubuntu: ``sudo apt-get install libghc-haskeline-dev``
- - On Fedora: ``sudo dnf install ghc-haskeline-devel``
-
-
-== Getting the source ==[getting-source]
-
-Once you have all tools in place you can get the GF source code from
-[GitHub https://github.com/GrammaticalFramework/]:
-
-- https://github.com/GrammaticalFramework/gf-core for the GF compiler
-- https://github.com/GrammaticalFramework/gf-rgl for the Resource Grammar Library
-
-
-=== Read-only access: clone the main repository ===
-
-If you only want to compile and use GF, you can just clone the repositories as follows:
-
-```
- $ git clone https://github.com/GrammaticalFramework/gf-core.git
- $ git clone https://github.com/GrammaticalFramework/gf-rgl.git
-```
-
-To get new updates, run the following anywhere in your local copy of the repository:
-
-```
- $ git pull
-```
-
-=== Contribute your changes: fork the main repository ===
-
-If you want the possibility to contribute your changes,
-you should create your own fork, do your changes there,
-and then send a pull request to the main repository.
-
-+ **Creating and cloning a fork —**
-See GitHub documentation for instructions how to [create your own fork https://docs.github.com/en/get-started/quickstart/fork-a-repo]
-of the repository. Once you've done it, clone the fork to your local computer.
-
-```
- $ git clone https://github.com//gf-core.git
-```
-
-+ **Updating your copy —**
-Once you have cloned your fork, you need to set up the main repository as a remote:
-
-```
- $ git remote add upstream https://github.com/GrammaticalFramework/gf-core.git
-```
-
-Then you can get the latest updates by running the following:
-
-```
- $ git pull upstream master
-```
-
-+ **Recording local changes —**
-See Git tutorial on how to [record and push your changes https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository] to your fork.
-
-+ **Pull request —**
-When you want to contribute your changes to the main gf-core repository,
-[create a pull request https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request]
-from your fork.
-
-
-
-If you want to contribute to the RGL as well, do the same process for the RGL repository.
-
-
-== Compilation from source ==
-
-By now you should have installed Stack and Haskeline, and cloned the Git repository on your own computer, in a directory called ``gf-core``.
-
-=== Primary recommendation: use Stack ===
-
-Open a terminal, go to the top directory (``gf-core``), and type the following command.
-
-```
-$ stack install
-```
-
-It will install GF and all necessary tools and libraries to do that.
-
-
-=== Alternative: use Cabal ===
-You can also install GF using Cabal, if you prefer Cabal to Stack. In that case, you may need to install some prerequisites yourself.
-
-The actual installation process is similar to Stack: open a terminal, go to the top directory (``gf-core``), and type the following command.
-
-```
-$ cabal install
-```
-
-//The old (potentially outdated) instructions for Cabal are moved to a [separate page ../doc/gf-developers-old-cabal.html]. If you run into trouble with ``cabal install``, you may want to take a look.//
-
-== Compiling GF with C runtime system support ==
-
-The C runtime system is a separate implementation of the PGF runtime services.
-It makes it possible to work with very large, ambiguous grammars, using
-probabilistic models to obtain probable parses. The C runtime system might
-also be easier to use than the Haskell runtime system on certain platforms,
-e.g. Android and iOS.
-
-To install the C runtime system, go to the ``src/runtime/c`` directory.
-
-- **On Linux and Mac OS —**
- You should have autoconf, automake, libtool and make.
- If you are missing some of them, follow the
- instructions in the [INSTALL https://github.com/GrammaticalFramework/gf-core/blob/master/src/runtime/c/INSTALL] file.
-
- Once you have the required libraries, the easiest way to install the C runtime is to use the ``install.sh`` script. Just type
-
- ``$ bash install.sh``
-
- This will install the C header files and libraries need to write C programs
- that use PGF grammars.
-
-% If this doesn't work for you, follow the manual instructions in the [INSTALL https://github.com/GrammaticalFramework/gf-core/blob/master/src/runtime/c/INSTALL] file under your operating system.
-
-- **On other operating systems —** Follow the instructions in the
-[INSTALL https://github.com/GrammaticalFramework/gf-core/blob/master/src/runtime/c/INSTALL] file under your operating system.
-
-
-
-Depending on what you want to do with the C runtime, you can follow one or more of the following steps.
-
-=== Use the C runtime from another programming language ===[bindings]
-
-% **If you just want to use the C runtime from Python, Java, or Haskell, you don't need to change your GF installation.**
-
-- **What —**
-This is the most common use case for the C runtime: compile
-your GF grammars into PGF with the standard GF executable,
-and manipulate the PGFs from another programming language,
-using the bindings to the C runtime.
-
-
-- **How —**
-The Python, Java and Haskell bindings are found in the
-``src/runtime/{python,java,haskell-bind}`` directories,
-respecively. Compile them by following the instructions
-in the ``INSTALL`` or ``README`` files in those directories.
-
-The Python library can also be installed from PyPI using ``pip install pgf``.
-
-
-//If you are on Mac and get an error about ``clang`` version, you can try some of [these solutions https://stackoverflow.com/questions/63972113/big-sur-clang-invalid-version-error-due-to-macosx-deployment-target]—but be careful before removing any existing installations.//
-
-
-=== Use GF shell with C runtime support ===
-
-- **What —**
-If you want to use the GF shell with C runtime functionalities, then you need to (re)compile GF with special flags.
-
-The GF shell can be started with ``gf -cshell`` or ``gf -crun`` to use
-the C run-time system instead of the Haskell run-time system.
-Only limited functionality is available when running the shell in these
-modes (use the ``help`` command in the shell for details).
-
-(Re)compiling your GF with these flags will also give you
-Haskell bindings to the C runtime, as a library called ``PGF2``,
-but if you want Python or Java bindings, you need to do [the previous step #bindings].
-
-% ``PGF2``: a module to import in Haskell programs, providing a binding to the C run-time system.
-
-- **How —**
-If you use cabal, run the following command:
-
-```
-cabal install -fc-runtime
-```
-
-from the top directory (``gf-core``).
-
-If you use stack, uncomment the following lines in the ``stack.yaml`` file:
-
-```
-flags:
- gf:
- c-runtime: true
-extra-lib-dirs:
- - /usr/local/lib
-```
-and then run ``stack install`` from the top directory (``gf-core``).
-
-
-//If you get an "``error while loading shared libraries``" when trying to run GF with C runtime, remember to declare your ``LD_LIBRARY_PATH``.//
-//Add ``export LD_LIBRARY_PATH="/usr/local/lib"`` to either your ``.bashrc`` or ``.profile``. You should now be able to start GF with C runtime.//
-
-
-=== Use GF server mode with C runtime ===
-
-- **What —**
-With this feature, ``gf -server`` mode is extended with new requests to call the C run-time
-system, e.g. ``c-parse``, ``c-linearize`` and ``c-translate``.
-
-- **How —**
-If you use cabal, run the following command:
-
-```
-cabal install -fc-runtime -fserver
-```
-from the top directory.
-
-If you use stack, add the following lines in the ``stack.yaml`` file:
-
-```
-flags:
- gf:
- c-runtime: true
- server: true
-extra-lib-dirs:
- - /usr/local/lib
-```
-
-and then run ``stack install``, also from the top directory.
-
-
-
-== Compilation of RGL ==
-
-As of 2018-07-26, the RGL is distributed separately from the GF compiler and runtimes.
-
-To get the source, follow the previous instructions on [how to clone a repository with Git #getting-source].
-
-After cloning the RGL, you should have a directory named ``gf-rgl`` on your computer.
-
-=== Simple ===
-To install the RGL, you can use the following commands from within the ``gf-rgl`` repository:
-```
-$ make install
-```
-There is also ``make build``, ``make copy`` and ``make clean`` which do what you might expect.
-
-=== Advanced ===
-For advanced build options, call the Haskell build script directly:
-```
-$ runghc Setup.hs ...
-```
-For more details see the [README https://github.com/GrammaticalFramework/gf-rgl/blob/master/README.md].
-
-=== Haskell-free ===
-If you do not have Haskell installed, you can use the simple build script ``Setup.sh``
-(or ``Setup.bat`` for Windows).
-
-
-== Creating binary distribution packages ==
-
-The binaries are generated with Github Actions. More details can be viewed here:
-
-https://github.com/GrammaticalFramework/gf-core/actions/workflows/build-binary-packages.yml
-
-
-== Running the test suite ==
-
-The GF test suite is run with one of the following commands from the top directory:
-
-```
- $ cabal test
-```
-
-or
-
-```
- $ stack test
-```
-
-The testsuite architecture for GF is very simple but still very flexible.
-GF by itself is an interpreter and could execute commands in batch mode.
-This is everything that we need to organize a testsuite. The root of the
-testsuite is the ``testsuite/`` directory. It contains subdirectories
-which themselves contain GF batch files (with extension ``.gfs``).
-The above command searches the subdirectories of the ``testsuite/`` directory
-for files with extension ``.gfs`` and when it finds one, it is executed with
-the GF interpreter. The output of the script is stored in file with extension ``.out``
-and is compared with the content of the corresponding file with extension ``.gold``, if there is one.
-
-Every time when you make some changes to GF that have to be tested,
-instead of writing the commands by hand in the GF shell, add them to one ``.gfs``
-file in the testsuite subdirectory where its ``.gf`` file resides and run the test.
-In this way you can use the same test later and we will be sure that we will not
-accidentally break your code later.
-
-**Test Outcome - Passed:** If the contents of the files with the ``.out`` extension
-are identical to their correspondingly-named files with the extension ``.gold``,
-the command will report that the tests passed successfully, e.g.
-
-```
- Running 1 test suites...
- Test suite gf-tests: RUNNING...
- Test suite gf-tests: PASS
- 1 of 1 test suites (1 of 1 test cases) passed.
-```
-
-**Test Outcome - Failed:** If there is a contents mismatch between the files
-with the ``.out`` extension and their corresponding files with the extension ``.gold``,
-the test diagnostics will show a fail and the areas that failed. e.g.
-
-```
- testsuite/compiler/compute/Records.gfs: OK
- testsuite/compiler/compute/Variants.gfs: FAIL
- testsuite/compiler/params/params.gfs: OK
- Test suite gf-tests: FAIL
- 0 of 1 test suites (0 of 1 test cases) passed.
-```
-
-The fail results overview is available in gf-tests.html which shows 4 columns:
-
-+ __Results__ - only areas that fail will appear. (Note: There are 3 failures in the gf-tests.html which are labelled as (expected). These failures should be ignored.)
-+ __Input__ - which is the test written in the .gfs file
-+ __Gold__ - the expected output from running the test set out in the .gfs file. This column refers to the contents from the .gold extension files.
-+ __Output__ - This column refers to the contents from the .out extension files which are generated as test output.
-After fixing the areas which fail, rerun the test command. Repeat the entire process of fix-and-test until the test suite passes before submitting a pull request to include your changes.
diff --git a/doc/gf-editor-modes.md b/doc/gf-editor-modes.md
new file mode 100644
index 0000000000..a55effd85e
--- /dev/null
+++ b/doc/gf-editor-modes.md
@@ -0,0 +1,72 @@
+
+We collect GF modes for various editors on this page. Contributions are
+welcome!
+
+## Emacs
+
+[gf.el](https://github.com/GrammaticalFramework/gf-emacs-mode) by Johan
+Bockgård provides syntax highlighting and automatic indentation and
+lets you run the GF Shell in an emacs buffer. See installation
+instructions inside.
+
+## Atom
+
+[language-gf](https://atom.io/packages/language-gf), by John J. Camilleri
+
+## Visual Studio Code
+
+ * [Grammatical Framework Language Server](https://marketplace.visualstudio.com/items?itemName=anka-213.gf-vscode) by Andreas Källberg.
+This provides syntax highlighting and a client for the Grammatical Framework language server. Follow the installation instructions in the link.
+ * [Grammatical Framework](https://marketplace.visualstudio.com/items?itemName=GrammaticalFramework.gf-vscode) is a simpler extension
+without any external dependencies which provides only syntax highlighting.
+
+==Eclipse==
+
+[GF Eclipse Plugin](https://github.com/GrammaticalFramework/gf-eclipse-plugin/), by John J. Camilleri
+
+==Gedit==
+
+By John J. Camilleri
+
+Copy the file below to
+`~/.local/share/gtksourceview-3.0/language-specs/gf.lang` (under Ubuntu).
+
+ * [gf.lang](../src/tools/gf.lang)
+
+Some helpful notes/links:
+
+ * The code is based heavily on the `haskell.lang` file which I found in
+`/usr/share/gtksourceview-2.0/language-specs/haskell.lang`.
+ * Ruslan Osmanov recommends
+[registering your file extension as its own MIME type](http://osmanov-dev-notes.blogspot.com/2011/04/how-to-add-new-highlight-mode-in-gedit.html)
+(see also [here](https://help.ubuntu.com/community/AddingMimeTypes)),
+however on my system the `.gf` extension was already registered
+as a generic font (`application/x-tex-gf`) and I didn't want to risk
+messing any of that up.
+ * This is a quick 5-minute job and might require some tweaking.
+[The GtkSourceView language definition tutorial](http://developer.gnome.org/gtksourceview/stable/lang-tutorial.html)
+is the place to start looking.
+ * Contributions are welcome!
+
+## Geany
+
+By John J. Camilleri
+
+[Custom filetype](http://www.geany.org/manual/dev/index.html#custom-filetypes)
+config files for syntax highlighting in [Geany](http://www.geany.org/).
+
+Copy one of the files below to `/usr/share/geany/filetypes.GF.conf`
+(under Ubuntu). You will need to manually create the file.
+
+ * [light-filetypes.GF.conf](../src/tools/light-filetypes.GF.conf)
+ * [dark-filetypes.GF.conf](../src/tools/dark-filetypes.GF.conf)
+
+You will also need to edit the `filetype_extensions.conf` file and add the
+following line somewhere:
+
+ GF=*.gf
+
+## Vim
+
+[vim-gf](https://github.com/gdetrez/vim-gf)
+
diff --git a/doc/gf-editor-modes.t2t b/doc/gf-editor-modes.t2t
deleted file mode 100644
index 2e92f31c3e..0000000000
--- a/doc/gf-editor-modes.t2t
+++ /dev/null
@@ -1,79 +0,0 @@
-Editor modes & IDE integration for GF
-
-
-We collect GF modes for various editors on this page. Contributions are
-welcome!
-
-
-==Emacs==
-
-[gf.el https://github.com/GrammaticalFramework/gf-emacs-mode] by Johan
-Bockgård provides syntax highlighting and automatic indentation and
-lets you run the GF Shell in an emacs buffer. See installation
-instructions inside.
-
-==Atom==
-[language-gf https://atom.io/packages/language-gf], by John J. Camilleri
-
-==Visual Studio Code==
-
-- [Grammatical Framework Language Server https://marketplace.visualstudio.com/items?itemName=anka-213.gf-vscode] by Andreas Källberg.
- This provides syntax highlighting and a client for the Grammatical Framework language server. Follow the installation instructions in the link.
-- [Grammatical Framework https://marketplace.visualstudio.com/items?itemName=GrammaticalFramework.gf-vscode] is a simpler extension
- without any external dependencies which provides only syntax highlighting.
-
-==Eclipse==
-
-[GF Eclipse Plugin https://github.com/GrammaticalFramework/gf-eclipse-plugin/], by John J. Camilleri
-
-==Gedit==
-
-By John J. Camilleri
-
-Copy the file below to
-``~/.local/share/gtksourceview-3.0/language-specs/gf.lang`` (under Ubuntu).
-
-- [gf.lang ../src/tools/gf.lang]
-
-
-Some helpful notes/links:
-
-- The code is based heavily on the ``haskell.lang`` file which I found in
- ``/usr/share/gtksourceview-2.0/language-specs/haskell.lang``.
-- Ruslan Osmanov recommends
- [registering your file extension as its own MIME type http://osmanov-dev-notes.blogspot.com/2011/04/how-to-add-new-highlight-mode-in-gedit.html]
- (see also [here https://help.ubuntu.com/community/AddingMimeTypes]),
- however on my system the ``.gf`` extension was already registered
- as a generic font (``application/x-tex-gf``) and I didn't want to risk
- messing any of that up.
-- This is a quick 5-minute job and might require some tweaking.
- [The GtkSourceView language definition tutorial http://developer.gnome.org/gtksourceview/stable/lang-tutorial.html]
- is the place to start looking.
-- Contributions are welcome!
-
-
-==Geany==
-
-By John J. Camilleri
-
-[Custom filetype http://www.geany.org/manual/dev/index.html#custom-filetypes]
-config files for syntax highlighting in [Geany http://www.geany.org/].
-
-Copy one of the files below to ``/usr/share/geany/filetypes.GF.conf``
-(under Ubuntu). You will need to manually create the file.
-
-- [light-filetypes.GF.conf ../src/tools/light-filetypes.GF.conf]
-- [dark-filetypes.GF.conf ../src/tools/dark-filetypes.GF.conf]
-
-
-You will also need to edit the ``filetype_extensions.conf`` file and add the
-following line somewhere:
-
-```
-GF=*.gf
-```
-
-
-==Vim==
-
-[vim-gf https://github.com/gdetrez/vim-gf]
diff --git a/doc/gf-shell-reference.md b/doc/gf-shell-reference.md
new file mode 100644
index 0000000000..96c240b84d
--- /dev/null
+++ b/doc/gf-shell-reference.md
@@ -0,0 +1,1429 @@
+
+The GF software system implements the GF programming language. Its
+components are
+
+ * the *compiler*,
+translating `.gf` source files to `.gfo` object files, to
+`.pgf` run-time grammars, and to various other formats
+ * the *run-time system*,
+performing parsing, generation, translation and other functions with
+`.pgf` grammars
+ * the *command interpreter*, also known as the *GF shell*,
+executing user commands by calling the compiler and the run-time system
+
+This page describes the commands of the GF shell,
+as well as the use of the compiler in batch mode.
+
+## The GF shell
+
+The GF shell is invoked by the command `gf`, which takes arguments and
+options according to the following syntax:
+
+ gf (OPTION | FLAG)* FILE*
+
+The shell maintains a *state*, to which belong
+
+ * a multilingual PGF grammar
+ * optionally, a set of compiled GF modules (retaining `oper` definitions)
+ * a history of previous commands
+ * a set of string, tree, and command macros
+
+Unless file arguments are provided to the `gf` command, the shell starts in an
+empty state, with no grammars and no history.
+
+In the shell, a set of commands
+is available. Some of these commands may change the grammars in the state. The general
+syntax of commands is given by the following BNF grammar:
+
+ COMMAND_LINE ::= COMMAND_PIPE
+ COMMAND_LINE ::= COMMAND_PIPE ";" COMMAND_LINE
+ COMMAND_PIPE ::= COMMAND
+ COMMAND_PIPE ::= COMMAND "|" COMMAND_PIPE
+ COMMAND ::= COMMAND_ID (OPTION | FLAG)* ARGUMENT?
+ OPTION ::= "-"OPTION_ID
+ FLAG ::= "-"OPTION_ID "=" VALUE
+ ARGUMENT ::= QUOTED_STRING | TREE
+ VALUE ::= IDENT | QUOTED_STRING
+
+A command pipe is a sequence of commands interpreted in such a way
+that the output of each command
+is send as input to the next. The option `-tr` causes GF to show a trace,
+i.e. the intermediate result of the command to which it is attached.
+
+A command line is a sequence of pipes separated by `;`. These pipes are
+executed one by one, in the order of appearance.
+
+### GF shell commands
+
+The full set of GF shell commands is listed below with explanations.
+This list can also be obtained in the GF shell by the command `help -full`.
+
+#VSPACE
+
+#### !
+
+#NOINDENT
+`!`: *system command: escape to system shell.*
+
+#TINY
+
+ * Syntax: `! SYSTEMCOMMAND`
+
+ * Examples:
+
+
+|`! ls *.gf` |list all GF files in the working directory|
+
+#NORMAL
+
+#VSPACE
+
+#### ?
+
+#NOINDENT
+`?`: *system pipe: send value from previous command to a system command.*
+
+#TINY
+
+ * Syntax: `? SYSTEMCOMMAND`
+
+ * Examples:
+
+
+|`gt | l | ? wc` |generate, linearize, word-count|
+
+#NORMAL
+
+#VSPACE
+
+#### ai = abstract_info
+
+#NOINDENT
+`ai` = `abstract_info`: *Provides an information about a function, an expression or a category from the abstract syntax.*
+
+#TINY
+
+The command has one argument which is either function, expression or
+a category defined in the abstract syntax of the current grammar.
+If the argument is a function then ?its type is printed out.
+If it is a category then the category definition is printed.
+If a whole expression is given it prints the expression with refined
+metavariables and the type of the expression.
+
+ * Syntax: `ai IDENTIFIER or ai EXPR`
+
+#NORMAL
+
+#VSPACE
+
+#### aw = align_words
+
+#NOINDENT
+`aw` = `align_words`: *show word alignments between languages graphically.*
+
+#TINY
+
+Prints a set of strings in the .dot format (the graphviz format).
+The graph can be saved in a file by the wf command as usual.
+If the -view flag is defined, the graph is saved in a temporary file
+which is processed by 'dot' (graphviz) and displayed by the program indicated
+by the view flag. The target format is png, unless overridden by the
+flag -format. Results from multiple trees are combined to pdf with convert (ImageMagick).
+
+ * Options:
+
+
+|`-giza` |show alignments in the Giza format; the first two languages|
+
+ * Flags:
+
+
+|`-format` |format of the visualization file (default "png")|
+|`-lang` |alignments for this list of languages (default: all)|
+|`-view` |program to open the resulting file|
+
+ * Examples:
+
+
+|`gr | aw` |generate a tree and show word alignment as graph script|
+|`gr | aw -view="open"` |generate a tree and display alignment on Mac|
+|`gr | aw -view="eog"` |generate a tree and display alignment on Ubuntu|
+|`gt | aw -giza | wf -file=aligns` |generate trees, send giza alignments to file|
+
+#NORMAL
+
+#VSPACE
+
+#### ca = clitic_analyse
+
+#NOINDENT
+`ca` = `clitic_analyse`: *print the analyses of all words into stems and clitics.*
+
+#TINY
+
+Analyses all words into all possible combinations of stem + clitics.
+The analysis is returned in the format stem &+ clitic1 &+ clitic2 ...
+which is hence the inverse of 'pt -bind'. The list of clitics is give
+by the flag '-clitics'. The list of stems is given as the list of words
+of the language given by the '-lang' flag.
+
+ * Options:
+
+
+|`-raw` |analyse each word separately (not suitable input for parser)|
+
+ * Flags:
+
+
+|`-clitics` |the list of possible clitics (comma-separated, no spaces)|
+|`-lang` |the language of analysis|
+
+ * Examples:
+
+
+|`ca -lang=Fin -clitics=ko,ni "nukkuuko minun vaimoni" | p` |to parse Finnish|
+
+#NORMAL
+
+#VSPACE
+
+#### cc = compute_concrete
+
+#NOINDENT
+`cc` = `compute_concrete`: *computes concrete syntax term using a source grammar.*
+
+#TINY
+
+Compute TERM by concrete syntax definitions. Uses the topmost
+module (the last one imported) to resolve constant names.
+N.B.1 You need the flag -retain when importing the grammar, if you want
+the definitions to be retained after compilation.
+N.B.2 The resulting term is not a tree in the sense of abstract syntax
+and hence not a valid input to a Tree-expecting command.
+This command must be a line of its own, and thus cannot be a part
+of a pipe.
+
+ * Syntax: `cc (-all | -table | -unqual)? TERM`
+ * Options:
+
+
+|`-all` |pick all strings (forms and variants) from records and tables|
+|`-list` |all strings, comma-separated on one line|
+|`-one` |pick the first strings, if there is any, from records and tables|
+|`-table` |show all strings labelled by parameters|
+|`-unqual` |hide qualifying module names|
+|`-trace` |trace computations|
+
+#NORMAL
+
+#VSPACE
+
+#### dc = define_command
+
+#NOINDENT
+`dc` = `define_command`: *define a command macro.*
+
+#TINY
+
+Defines IDENT as macro for COMMANDLINE, until IDENT gets redefined.
+A call of the command has the form %IDENT. The command may take an
+argument, which in COMMANDLINE is marked as ?0. Both strings and
+trees can be arguments. Currently at most one argument is possible.
+This command must be a line of its own, and thus cannot be a part
+of a pipe.
+
+ * Syntax: `dc IDENT COMMANDLINE`
+
+#NORMAL
+
+#VSPACE
+
+#### dg = dependency_graph
+
+#NOINDENT
+`dg` = `dependency_graph`: *print module dependency graph.*
+
+#TINY
+
+Prints the dependency graph of source modules.
+Requires that import has been done with the -retain flag.
+The graph is written in the file _gfdepgraph.dot
+which can be further processed by Graphviz (the system command 'dot').
+By default, all modules are shown, but the -only flag restricts them
+by a comma-separated list of patterns, where 'name*' matches modules
+whose name has prefix 'name', and other patterns match modules with
+exactly the same name. The graphical conventions are:
+ solid box = abstract, solid ellipse = concrete, dashed ellipse = other
+ solid arrow empty head = of, solid arrow = **, dashed arrow = open
+ dotted arrow = other dependency
+
+ * Syntax: `dg (-only=MODULES)?`
+
+ * Flags:
+
+
+|`-only` |list of modules included (default: all), literally or by prefix*|
+
+ * Examples:
+
+
+|`dg -only=SyntaxEng,Food*` |shows only SyntaxEng, and those with prefix Food|
+
+#NORMAL
+
+#VSPACE
+
+#### dt = define_tree
+
+#NOINDENT
+`dt` = `define_tree`: *define a tree or string macro.*
+
+#TINY
+
+Defines IDENT as macro for TREE or STRING, until IDENT gets redefined.
+The defining value can also come from a command, preceded by "<".
+If the command gives many values, the first one is selected.
+A use of the macro has the form %IDENT. Currently this use cannot be
+a subtree of another tree. This command must be a line of its own
+and thus cannot be a part of a pipe.
+
+ * Syntax: `dt IDENT (TREE | STRING | "<" COMMANDLINE)`
+
+ * Examples:
+
+
+|`dt ex "hello world"` |define ex as string|
+|`dt ex UseN man_N` |define ex as string|
+|`dt ex < p -cat=NP "the man in the car"` |define ex as parse result|
+|`l -lang=LangSwe %ex | ps -to_utf8` |linearize the tree ex|
+
+#NORMAL
+
+#VSPACE
+
+#### e = empty
+
+#NOINDENT
+`e` = `empty`: *empty the environment (except the command history).*
+
+#TINY
+
+#NORMAL
+
+#VSPACE
+
+#### eb = example_based
+
+#NOINDENT
+`eb` = `example_based`: *converts .gfe files to .gf files by parsing examples to trees.*
+
+#TINY
+
+Reads FILE.gfe and writes FILE.gf. Each expression of form
+'%ex CAT QUOTEDSTRING' in FILE.gfe is replaced by a syntax tree.
+This tree is the first one returned by the parser; a biased ranking
+can be used to regulate the order. If there are more than one parses
+the rest are shown in comments, with probabilities if the order is biased.
+The probabilities flag and configuration file is similar to the commands
+gr and rt. Notice that the command doesn't change the environment,
+but the resulting .gf file must be imported separately.
+
+ * Syntax: `eb (-probs=FILE | -lang=LANG)* -file=FILE.gfe`
+ * Options:
+
+
+|`-api` |convert trees to overloaded API expressions (using Syntax not Lang)|
+
+ * Flags:
+
+
+|`-file` |the file to be converted (suffix .gfe must be given)|
+|`-lang` |the language in which to parse|
+|`-probs` |file with probabilities to rank the parses|
+
+#NORMAL
+
+#VSPACE
+
+#### eh = execute_history
+
+#NOINDENT
+`eh` = `execute_history`: *read commands from a file and execute them.*
+
+#TINY
+
+ * Syntax: `eh FILE`
+
+#NORMAL
+
+#VSPACE
+
+#### gr = generate_random
+
+#NOINDENT
+`gr` = `generate_random`: *generate random trees in the current abstract syntax.*
+
+#TINY
+
+Generates a list of random trees, by default one tree.
+If a tree argument is given, the command completes the Tree with values to
+all metavariables in the tree. The generation can be biased by probabilities,
+given in a file in the -probs flag.
+
+ * Syntax: `gr [-cat=CAT] [-number=INT]`
+
+ * Flags:
+
+
+|`-cat` |generation category|
+|`-lang` |uses only functions that have linearizations in all these languages|
+|`-number` |number of trees generated|
+|`-depth` |the maximum generation depth|
+|`-probs` |file with biased probabilities (format 'f 0.4' one by line)|
+
+ * Examples:
+
+
+|`gr` |one tree in the startcat of the current grammar|
+|`gr -cat=NP -number=16` |16 trees in the category NP|
+|`gr -lang=LangHin,LangTha -cat=Cl` |Cl, both in LangHin and LangTha|
+|`gr -probs=FILE` |generate with bias|
+|`gr (AdjCN ? (UseN ?))` |generate trees of form (AdjCN ? (UseN ?))|
+
+#NORMAL
+
+#VSPACE
+
+#### gt = generate_trees
+
+#NOINDENT
+`gt` = `generate_trees`: *generates a list of trees, by default exhaustive.*
+
+#TINY
+
+Generates all trees of a given category. By default,
+the depth is limited to 4, but this can be changed by a flag.
+If a Tree argument is given, the command completes the Tree with values
+to all metavariables in the tree.
+
+ * Flags:
+
+
+|`-cat` |the generation category|
+|`-depth` |the maximum generation depth|
+|`-lang` |excludes functions that have no linearization in this language|
+|`-number` |the number of trees generated|
+
+ * Examples:
+
+
+|`gt` |all trees in the startcat, to depth 4|
+|`gt -cat=NP -number=16` |16 trees in the category NP|
+|`gt -cat=NP -depth=2` |trees in the category NP to depth 2|
+|`gt (AdjCN ? (UseN ?))` |trees of form (AdjCN ? (UseN ?))|
+
+#NORMAL
+
+#VSPACE
+
+#### h = help
+
+#NOINDENT
+`h` = `help`: *get description of a command, or a the full list of commands.*
+
+#TINY
+
+Displays information concerning the COMMAND.
+Without argument, shows the synopsis of all commands.
+
+ * Syntax: `h (-full)? COMMAND?`
+ * Options:
+
+
+|`-changes` |give a summary of changes from GF 2.9|
+|`-coding` |give advice on character encoding|
+|`-full` |give full information of the commands|
+|`-license` |show copyright and license information|
+|`-t2t` |output help in txt2tags format|
+
+#NORMAL
+
+#VSPACE
+
+#### i = import
+
+#NOINDENT
+`i` = `import`: *import a grammar from source code or compiled .pgf file.*
+
+#TINY
+
+Reads a grammar from File and compiles it into a GF runtime grammar.
+If its abstract is different from current state, old modules are discarded.
+If its abstract is the same and a concrete with the same name is already in the state
+it is overwritten - but only if compilation succeeds.
+The grammar parser depends on the file name suffix:
+ .cf context-free (labelled BNF) source
+ .ebnf extended BNF source
+ .gfm multi-module GF source
+ .gf normal GF source
+ .gfo compiled GF source
+ .pgf precompiled grammar in Portable Grammar Format
+
+ * Options:
+
+
+|`-retain` |retain operations (used for cc command)|
+|`-src` |force compilation from source|
+|`-v` |be verbose - show intermediate status information|
+
+ * Flags:
+
+
+|`-probs` |file with biased probabilities for generation|
+
+#NORMAL
+
+#VSPACE
+
+#### l = linearize
+
+#NOINDENT
+`l` = `linearize`: *convert an abstract syntax expression to string.*
+
+#TINY
+
+Shows the linearization of a Tree by the grammars in scope.
+The -lang flag can be used to restrict this to fewer languages.
+A sequence of string operations (see command ps) can be given
+as options, and works then like a pipe to the ps command, except
+that it only affect the strings, not e.g. the table labels.
+These can be given separately to each language with the unlexer flag
+whose results are prepended to the other lexer flags. The value of the
+unlexer flag is a space-separated list of comma-separated string operation
+sequences; see example.
+
+ * Options:
+
+
+|`-all` |show all forms and variants, one by line (cf. l -list)|
+|`-bracket` |show tree structure with brackets and paths to nodes|
+|`-groups` |all languages, grouped by lang, remove duplicate strings|
+|`-list` |show all forms and variants, comma-separated on one line (cf. l -all)|
+|`-multi` |linearize to all languages (default)|
+|`-table` |show all forms labelled by parameters|
+|`-tabtreebank` |show the tree and its linearizations on a tab-separated line|
+|`-treebank` |show the tree and tag linearizations with language names|
+|`-bind` |bind tokens separated by Prelude.BIND, i.e. &+|
+|`-chars` |lexer that makes every non-space character a token|
+|`-from_amharic` |from unicode to GF Amharic transliteration|
+|`-from_ancientgreek` |from unicode to GF ancient Greek transliteration|
+|`-from_arabic` |from unicode to GF Arabic transliteration|
+|`-from_arabic_unvocalized` |from unicode to GF unvocalized Arabic transliteration|
+|`-from_cp1251` |decode from cp1251 (Cyrillic used in Bulgarian resource)|
+|`-from_devanagari` |from unicode to GF Devanagari transliteration|
+|`-from_greek` |from unicode to GF modern Greek transliteration|
+|`-from_hebrew` |from unicode to GF unvocalized Hebrew transliteration|
+|`-from_nepali` |from unicode to GF Nepali transliteration|
+|`-from_persian` |from unicode to GF Persian/Farsi transliteration|
+|`-from_sanskrit` |from unicode to GF Sanskrit transliteration|
+|`-from_sindhi` |from unicode to GF Sindhi transliteration|
+|`-from_telugu` |from unicode to GF Telugu transliteration|
+|`-from_thai` |from unicode to GF Thai transliteration|
+|`-from_urdu` |from unicode to GF Urdu transliteration|
+|`-from_utf8` |decode from utf8 (default)|
+|`-lexcode` |code-like lexer|
+|`-lexgreek` |lexer normalizing ancient Greek accentuation|
+|`-lexgreek2` |lexer normalizing ancient Greek accentuation for text with vowel length annotations|
+|`-lexmixed` |mixture of text and code, as in LaTeX (code between $...$, \(...)\, \[...\])|
+|`-lextext` |text-like lexer|
+|`-to_amharic` |from GF Amharic transliteration to unicode|
+|`-to_ancientgreek` |from GF ancient Greek transliteration to unicode|
+|`-to_arabic` |from GF Arabic transliteration to unicode|
+|`-to_arabic_unvocalized` |from GF unvocalized Arabic transliteration to unicode|
+|`-to_cp1251` |encode to cp1251 (Cyrillic used in Bulgarian resource)|
+|`-to_devanagari` |from GF Devanagari transliteration to unicode|
+|`-to_greek` |from GF modern Greek transliteration to unicode|
+|`-to_hebrew` |from GF unvocalized Hebrew transliteration to unicode|
+|`-to_html` |wrap in a html file with linebreaks|
+|`-to_nepali` |from GF Nepali transliteration to unicode|
+|`-to_persian` |from GF Persian/Farsi transliteration to unicode|
+|`-to_sanskrit` |from GF Sanskrit transliteration to unicode|
+|`-to_sindhi` |from GF Sindhi transliteration to unicode|
+|`-to_telugu` |from GF Telugu transliteration to unicode|
+|`-to_thai` |from GF Thai transliteration to unicode|
+|`-to_urdu` |from GF Urdu transliteration to unicode|
+|`-to_utf8` |encode to utf8 (default)|
+|`-unchars` |unlexer that puts no spaces between tokens|
+|`-unlexcode` |code-like unlexer|
+|`-unlexgreek` |unlexer de-normalizing ancient Greek accentuation|
+|`-unlexmixed` |mixture of text and code (code between $...$, \(...)\, \[...\])|
+|`-unlextext` |text-like unlexer|
+|`-unwords` |unlexer that puts a single space between tokens (default)|
+|`-words` |lexer that assumes tokens separated by spaces (default)|
+
+ * Flags:
+
+
+|`-lang` |the languages of linearization (comma-separated, no spaces)|
+|`-unlexer` |set unlexers separately to each language (space-separated)|
+
+ * Examples:
+
+
+|`l -lang=LangSwe,LangNor no_Utt` |linearize tree to LangSwe and LangNor|
+|`gr -lang=LangHin -cat=Cl | l -table -to_devanagari` |hindi table|
+|`l -unlexer="LangAra=to_arabic LangHin=to_devanagari"` |different unlexers|
+
+#NORMAL
+
+#VSPACE
+
+#### lc = linearize_chunks
+
+#NOINDENT
+`lc` = `linearize_chunks`: *linearize a tree that has metavariables in maximal chunks without them.*
+
+#TINY
+
+A hopefully temporary command, intended to work around the type checker that fails
+trees where a function node is a metavariable.
+
+ * Options:
+
+
+|`-treebank` |show the tree and tag linearizations with language names|
+|`-bind` |bind tokens separated by Prelude.BIND, i.e. &+|
+|`-chars` |lexer that makes every non-space character a token|
+|`-from_amharic` |from unicode to GF Amharic transliteration|
+|`-from_ancientgreek` |from unicode to GF ancient Greek transliteration|
+|`-from_arabic` |from unicode to GF Arabic transliteration|
+|`-from_arabic_unvocalized` |from unicode to GF unvocalized Arabic transliteration|
+|`-from_cp1251` |decode from cp1251 (Cyrillic used in Bulgarian resource)|
+|`-from_devanagari` |from unicode to GF Devanagari transliteration|
+|`-from_greek` |from unicode to GF modern Greek transliteration|
+|`-from_hebrew` |from unicode to GF unvocalized Hebrew transliteration|
+|`-from_nepali` |from unicode to GF Nepali transliteration|
+|`-from_persian` |from unicode to GF Persian/Farsi transliteration|
+|`-from_sanskrit` |from unicode to GF Sanskrit transliteration|
+|`-from_sindhi` |from unicode to GF Sindhi transliteration|
+|`-from_telugu` |from unicode to GF Telugu transliteration|
+|`-from_thai` |from unicode to GF Thai transliteration|
+|`-from_urdu` |from unicode to GF Urdu transliteration|
+|`-from_utf8` |decode from utf8 (default)|
+|`-lexcode` |code-like lexer|
+|`-lexgreek` |lexer normalizing ancient Greek accentuation|
+|`-lexgreek2` |lexer normalizing ancient Greek accentuation for text with vowel length annotations|
+|`-lexmixed` |mixture of text and code, as in LaTeX (code between $...$, \(...)\, \[...\])|
+|`-lextext` |text-like lexer|
+|`-to_amharic` |from GF Amharic transliteration to unicode|
+|`-to_ancientgreek` |from GF ancient Greek transliteration to unicode|
+|`-to_arabic` |from GF Arabic transliteration to unicode|
+|`-to_arabic_unvocalized` |from GF unvocalized Arabic transliteration to unicode|
+|`-to_cp1251` |encode to cp1251 (Cyrillic used in Bulgarian resource)|
+|`-to_devanagari` |from GF Devanagari transliteration to unicode|
+|`-to_greek` |from GF modern Greek transliteration to unicode|
+|`-to_hebrew` |from GF unvocalized Hebrew transliteration to unicode|
+|`-to_html` |wrap in a html file with linebreaks|
+|`-to_nepali` |from GF Nepali transliteration to unicode|
+|`-to_persian` |from GF Persian/Farsi transliteration to unicode|
+|`-to_sanskrit` |from GF Sanskrit transliteration to unicode|
+|`-to_sindhi` |from GF Sindhi transliteration to unicode|
+|`-to_telugu` |from GF Telugu transliteration to unicode|
+|`-to_thai` |from GF Thai transliteration to unicode|
+|`-to_urdu` |from GF Urdu transliteration to unicode|
+|`-to_utf8` |encode to utf8 (default)|
+|`-unchars` |unlexer that puts no spaces between tokens|
+|`-unlexcode` |code-like unlexer|
+|`-unlexgreek` |unlexer de-normalizing ancient Greek accentuation|
+|`-unlexmixed` |mixture of text and code (code between $...$, \(...)\, \[...\])|
+|`-unlextext` |text-like unlexer|
+|`-unwords` |unlexer that puts a single space between tokens (default)|
+|`-words` |lexer that assumes tokens separated by spaces (default)|
+
+ * Flags:
+
+
+|`-lang` |the languages of linearization (comma-separated, no spaces)|
+
+ * Examples:
+
+
+|`l -lang=LangSwe,LangNor -chunks ? a b (? c d)`|
+
+#NORMAL
+
+#VSPACE
+
+#### ma = morpho_analyse
+
+#NOINDENT
+`ma` = `morpho_analyse`: *print the morphological analyses of all words in the string.*
+
+#TINY
+
+Prints all the analyses of space-separated words in the input string,
+using the morphological analyser of the actual grammar (see command pg)
+
+ * Options:
+
+
+|`-known` |return only the known words, in order of appearance|
+|`-missing` |show the list of unknown words, in order of appearance|
+
+ * Flags:
+
+
+|`-lang` |the languages of analysis (comma-separated, no spaces)|
+
+#NORMAL
+
+#VSPACE
+
+#### mq = morpho_quiz
+
+#NOINDENT
+`mq` = `morpho_quiz`: *start a morphology quiz.*
+
+#TINY
+
+ * Syntax: `mq (-cat=CAT)? (-probs=FILE)? TREE?`
+
+ * Flags:
+
+
+|`-lang` |language of the quiz|
+|`-cat` |category of the quiz|
+|`-number` |maximum number of questions|
+|`-probs` |file with biased probabilities for generation|
+
+#NORMAL
+
+#VSPACE
+
+#### p = parse
+
+#NOINDENT
+`p` = `parse`: *parse a string to abstract syntax expression.*
+
+#TINY
+
+Shows all trees returned by parsing a string in the grammars in scope.
+The -lang flag can be used to restrict this to fewer languages.
+The default start category can be overridden by the -cat flag.
+See also the ps command for lexing and character encoding.
+
+The -openclass flag is experimental and allows some robustness in
+the parser. For example if -openclass="A,N,V" is given, the parser
+will accept unknown adjectives, nouns and verbs with the resource grammar.
+
+ * Options:
+
+
+|`-bracket` |prints the bracketed string from the parser|
+
+ * Flags:
+
+
+|`-cat` |target category of parsing|
+|`-lang` |the languages of parsing (comma-separated, no spaces)|
+|`-openclass` |list of open-class categories for robust parsing|
+|`-depth` |maximal depth for proof search if the abstract syntax tree has meta variables|
+
+#NORMAL
+
+#VSPACE
+
+#### pg = print_grammar
+
+#NOINDENT
+`pg` = `print_grammar`: *print the actual grammar with the given printer.*
+
+#TINY
+
+Prints the actual grammar, with all involved languages.
+In some printers, this can be restricted to a subset of languages
+with the -lang=X,Y flag (comma-separated, no spaces).
+The -printer=P flag sets the format in which the grammar is printed.
+N.B.1 Since grammars are compiled when imported, this command
+generally shows a grammar that looks rather different from the source.
+N.B.2 Another way to produce different formats is to use 'gf -make',
+the batch compiler. The following values are available both for
+the batch compiler (flag -output-format) and the print_grammar
+command (flag -printer):
+
+ bnf BNF (context-free grammar)
+ ebnf Extended BNF
+ fa finite automaton in graphviz format
+ gsl Nuance speech recognition format
+ haskell Haskell (abstract syntax)
+ java Java (abstract syntax)
+ js JavaScript (whole grammar)
+ jsgf JSGF speech recognition format
+ pgf_pretty human-readable pgf
+ prolog Prolog (whole grammar)
+ python Python (whole grammar)
+ regexp regular expression
+ slf SLF speech recognition format
+ srgs_abnf SRGS speech recognition format in ABNF
+ srgs_abnf_nonrec SRGS ABNF, recursion eliminated
+ srgs_xml SRGS speech recognition format in XML
+ srgs_xml_nonrec SRGS XML, recursion eliminated
+ vxml Voice XML based on abstract syntax
+
+ * Options:
+
+
+|`-cats` |show just the names of abstract syntax categories|
+|`-fullform` |print the fullform lexicon|
+|`-funs` |show just the names and types of abstract syntax functions|
+|`-langs` |show just the names of top concrete syntax modules|
+|`-lexc` |print the lexicon in Xerox LEXC format|
+|`-missing` |show just the names of functions that have no linearization|
+|`-opt` |optimize the generated pgf|
+|`-pgf` |write current pgf image in file|
+|`-words` |print the list of words|
+
+ * Flags:
+
+
+|`-file` |set the file name when printing with -pgf option|
+|`-lang` |select languages for the some options (default all languages)|
+|`-printer` |select the printing format (see flag values above)|
+
+ * Examples:
+
+
+|`pg -funs | ? grep " S ;"` |show functions with value cat S|
+
+#NORMAL
+
+#VSPACE
+
+#### ph = print_history
+
+#NOINDENT
+`ph` = `print_history`: *print command history.*
+
+#TINY
+
+Prints the commands issued during the GF session.
+The result is readable by the eh command.
+The result can be used as a script when starting GF.
+
+ * Examples:
+
+
+|`ph | wf -file=foo.gfs` |save the history into a file|
+
+#NORMAL
+
+#VSPACE
+
+#### ps = put_string
+
+#NOINDENT
+`ps` = `put_string`: *return a string, possibly processed with a function.*
+
+#TINY
+
+Returns a string obtained from its argument string by applying
+string processing functions in the order given in the command line
+option list. Thus 'ps -f -g s' returns g (f s). Typical string processors
+are lexers and unlexers, but also character encoding conversions are possible.
+The unlexers preserve the division of their input to lines.
+To see transliteration tables, use command ut.
+
+ * Syntax: `ps OPT? STRING`
+ * Options:
+
+
+|`-lines` |apply the operation separately to each input line, returning a list of lines|
+|`-bind` |bind tokens separated by Prelude.BIND, i.e. &+|
+|`-chars` |lexer that makes every non-space character a token|
+|`-from_amharic` |from unicode to GF Amharic transliteration|
+|`-from_ancientgreek` |from unicode to GF ancient Greek transliteration|
+|`-from_arabic` |from unicode to GF Arabic transliteration|
+|`-from_arabic_unvocalized` |from unicode to GF unvocalized Arabic transliteration|
+|`-from_cp1251` |decode from cp1251 (Cyrillic used in Bulgarian resource)|
+|`-from_devanagari` |from unicode to GF Devanagari transliteration|
+|`-from_greek` |from unicode to GF modern Greek transliteration|
+|`-from_hebrew` |from unicode to GF unvocalized Hebrew transliteration|
+|`-from_nepali` |from unicode to GF Nepali transliteration|
+|`-from_persian` |from unicode to GF Persian/Farsi transliteration|
+|`-from_sanskrit` |from unicode to GF Sanskrit transliteration|
+|`-from_sindhi` |from unicode to GF Sindhi transliteration|
+|`-from_telugu` |from unicode to GF Telugu transliteration|
+|`-from_thai` |from unicode to GF Thai transliteration|
+|`-from_urdu` |from unicode to GF Urdu transliteration|
+|`-from_utf8` |decode from utf8 (default)|
+|`-lexcode` |code-like lexer|
+|`-lexgreek` |lexer normalizing ancient Greek accentuation|
+|`-lexgreek2` |lexer normalizing ancient Greek accentuation for text with vowel length annotations|
+|`-lexmixed` |mixture of text and code, as in LaTeX (code between $...$, \(...)\, \[...\])|
+|`-lextext` |text-like lexer|
+|`-to_amharic` |from GF Amharic transliteration to unicode|
+|`-to_ancientgreek` |from GF ancient Greek transliteration to unicode|
+|`-to_arabic` |from GF Arabic transliteration to unicode|
+|`-to_arabic_unvocalized` |from GF unvocalized Arabic transliteration to unicode|
+|`-to_cp1251` |encode to cp1251 (Cyrillic used in Bulgarian resource)|
+|`-to_devanagari` |from GF Devanagari transliteration to unicode|
+|`-to_greek` |from GF modern Greek transliteration to unicode|
+|`-to_hebrew` |from GF unvocalized Hebrew transliteration to unicode|
+|`-to_html` |wrap in a html file with linebreaks|
+|`-to_nepali` |from GF Nepali transliteration to unicode|
+|`-to_persian` |from GF Persian/Farsi transliteration to unicode|
+|`-to_sanskrit` |from GF Sanskrit transliteration to unicode|
+|`-to_sindhi` |from GF Sindhi transliteration to unicode|
+|`-to_telugu` |from GF Telugu transliteration to unicode|
+|`-to_thai` |from GF Thai transliteration to unicode|
+|`-to_urdu` |from GF Urdu transliteration to unicode|
+|`-to_utf8` |encode to utf8 (default)|
+|`-unchars` |unlexer that puts no spaces between tokens|
+|`-unlexcode` |code-like unlexer|
+|`-unlexgreek` |unlexer de-normalizing ancient Greek accentuation|
+|`-unlexmixed` |mixture of text and code (code between $...$, \(...)\, \[...\])|
+|`-unlextext` |text-like unlexer|
+|`-unwords` |unlexer that puts a single space between tokens (default)|
+|`-words` |lexer that assumes tokens separated by spaces (default)|
+
+ * Flags:
+
+
+|`-env` |apply in this environment only|
+|`-from` |backward-apply transliteration defined in this file (format 'unicode translit' per line)|
+|`-to` |forward-apply transliteration defined in this file|
+
+ * Examples:
+
+
+|`l (EAdd 3 4) | ps -unlexcode` |linearize code-like output|
+|`ps -lexcode | p -cat=Exp` |parse code-like input|
+|`gr -cat=QCl | l | ps -bind` |linearization output from LangFin|
+|`ps -to_devanagari "A-p"` |show Devanagari in UTF8 terminal|
+|`rf -file=Hin.gf | ps -env=quotes -to_devanagari` |convert translit to UTF8|
+|`rf -file=Ara.gf | ps -from_utf8 -env=quotes -from_arabic` |convert UTF8 to transliteration|
+|`ps -to=chinese.trans "abc"` |apply transliteration defined in file chinese.trans|
+|`ps -lexgreek "a)gavoi` a)'nvrwpoi' tines*"` |normalize ancient greek accentuation|
+
+#NORMAL
+
+#VSPACE
+
+#### pt = put_tree
+
+#NOINDENT
+`pt` = `put_tree`: *return a tree, possibly processed with a function.*
+
+#TINY
+
+Returns a tree obtained from its argument tree by applying
+tree processing functions in the order given in the command line
+option list. Thus 'pt -f -g s' returns g (f s). Typical tree processors
+are type checking and semantic computation.
+
+ * Syntax: `pt OPT? TREE`
+ * Options:
+
+
+|`-compute` |compute by using semantic definitions (def)|
+|`-largest` |sort trees from largest to smallest, in number of nodes|
+|`-nub` |remove duplicate trees|
+|`-smallest` |sort trees from smallest to largest, in number of nodes|
+|`-subtrees` |return all fully applied subtrees (stopping at abstractions), by default sorted from the largest|
+|`-funs` |return all fun functions appearing in the tree, with duplications|
+
+ * Flags:
+
+
+|`-number` |take at most this many trees|
+
+ * Examples:
+
+
+|`pt -compute (plus one two)` |compute value|
+
+#NORMAL
+
+#VSPACE
+
+#### q = quit
+
+#NOINDENT
+`q` = `quit`: *exit GF interpreter.*
+
+#TINY
+
+#NORMAL
+
+#VSPACE
+
+#### r = reload
+
+#NOINDENT
+`r` = `reload`: *repeat the latest import command.*
+
+#TINY
+
+#NORMAL
+
+#VSPACE
+
+#### rf = read_file
+
+#NOINDENT
+`rf` = `read_file`: *read string or tree input from a file.*
+
+#TINY
+
+Reads input from file. The filename must be in double quotes.
+The input is interpreted as a string by default, and can hence be
+piped e.g. to the parse command. The option -tree interprets the
+input as a tree, which can be given e.g. to the linearize command.
+The option -lines will result in a list of strings or trees, one by line.
+
+ * Options:
+
+
+|`-lines` |return the list of lines, instead of the singleton of all contents|
+|`-tree` |convert strings into trees|
+
+ * Flags:
+
+
+|`-file` |the input file name|
+
+#NORMAL
+
+#VSPACE
+
+#### rt = rank_trees
+
+#NOINDENT
+`rt` = `rank_trees`: *show trees in an order of decreasing probability.*
+
+#TINY
+
+Order trees from the most to the least probable, using either
+even distribution in each category (default) or biased as specified
+by the file given by flag -probs=FILE, where each line has the form
+'function probability', e.g. 'youPol_Pron 0.01'.
+
+ * Options:
+
+
+|`-v` |show all trees with their probability scores|
+
+ * Flags:
+
+
+|`-probs` |probabilities from this file (format 'f 0.6' per line)|
+
+ * Examples:
+
+
+|`p "you are here" | rt -probs=probs | pt -number=1` |most probable result|
+
+#NORMAL
+
+#VSPACE
+
+#### sd = show_dependencies
+
+#NOINDENT
+`sd` = `show_dependencies`: *show all constants that the given constants depend on.*
+
+#TINY
+
+Show recursively all qualified constant names, by tracing back the types and definitions
+of each constant encountered, but just listing every name once.
+This command requires a source grammar to be in scope, imported with 'import -retain'.
+Notice that the accuracy is better if the modules are compiled with the flag -optimize=noexpand.
+This command must be a line of its own, and thus cannot be a part of a pipe.
+
+ * Syntax: `sd QUALIFIED_CONSTANT+`
+ * Options:
+
+
+|`-size` |show the size of the source code for each constants (number of constructors)|
+
+ * Examples:
+
+
+|`sd ParadigmsEng.mkV ParadigmsEng.mkN` |show all constants on which mkV and mkN depend|
+|`sd -size ParadigmsEng.mkV` |show all constants on which mkV depends, together with size|
+
+#NORMAL
+
+#VSPACE
+
+#### se = set_encoding
+
+#NOINDENT
+`se` = `set_encoding`: *set the encoding used in current terminal.*
+
+#TINY
+
+ * Syntax: `se ID`
+
+ * Examples:
+
+
+|`se cp1251` |set encoding to cp1521|
+|`se utf8` |set encoding to utf8 (default)|
+
+#NORMAL
+
+#VSPACE
+
+#### so = show_operations
+
+#NOINDENT
+`so` = `show_operations`: *show all operations in scope, possibly restricted to a value type.*
+
+#TINY
+
+Show the names and type signatures of all operations available in the current resource.
+This command requires a source grammar to be in scope, imported with 'import -retain'.
+The operations include the parameter constructors that are in scope.
+The optional TYPE filters according to the value type.
+The grep STRINGs filter according to other substrings of the type signatures.
+
+ * Syntax: `so (-grep=STRING)* TYPE?`
+ * Options:
+
+
+|`-raw` |show the types in computed forms (instead of category names)|
+
+ * Flags:
+
+
+|`-grep` |substring used for filtering (the command can have many of these)|
+
+ * Examples:
+
+
+|`so Det` |show all opers that create a Det|
+|`so -grep=Prep` |find opers relating to Prep|
+|`so | wf -file=/tmp/opers` |write the list of opers to a file|
+
+#NORMAL
+
+#VSPACE
+
+#### sp = system_pipe
+
+#NOINDENT
+`sp` = `system_pipe`: *send argument to a system command.*
+
+#TINY
+
+ * Syntax: `sp -command="SYSTEMCOMMAND", alt. ? SYSTEMCOMMAND`
+
+ * Flags:
+
+
+|`-command` |the system command applied to the argument|
+
+ * Examples:
+
+
+|`gt | l | ? wc` |generate trees, linearize, and count words|
+
+#NORMAL
+
+#VSPACE
+
+#### ss = show_source
+
+#NOINDENT
+`ss` = `show_source`: *show the source code of modules in scope, possibly just headers.*
+
+#TINY
+
+Show compiled source code, i.e. as it is included in GF object files.
+This command requires a source grammar to be in scope, imported with 'import -retain'.
+The optional MODULE arguments cause just these modules to be shown.
+The -size and -detailedsize options show code size as the number of constructor nodes.
+This command must be a line of its own, and thus cannot be a part of a pipe.
+
+ * Syntax: `ss (-strip)? (-save)? MODULE*`
+ * Options:
+
+
+|`-detailedsize` |instead of code, show the sizes of all judgements and modules|
+|`-save` |save each MODULE in file MODULE.gfh instead of printing it on terminal|
+|`-size` |instead of code, show the sizes of all modules|
+|`-strip` |show only type signatures of oper's and lin's, not their definitions|
+
+ * Examples:
+
+
+|`ss` |print complete current source grammar on terminal|
+|`ss -strip -save MorphoFin` |print the headers in file MorphoFin.gfh|
+
+#NORMAL
+
+#VSPACE
+
+#### tq = translation_quiz
+
+#NOINDENT
+`tq` = `translation_quiz`: *start a translation quiz.*
+
+#TINY
+
+ * Syntax: `tq -from=LANG -to=LANG (-cat=CAT)? (-probs=FILE)? TREE?`
+
+ * Flags:
+
+
+|`-from` |translate from this language|
+|`-to` |translate to this language|
+|`-cat` |translate in this category|
+|`-number` |the maximum number of questions|
+|`-probs` |file with biased probabilities for generation|
+
+ * Examples:
+
+
+|`tq -from=Eng -to=Swe` |any trees in startcat|
+|`tq -from=Eng -to=Swe (AdjCN (PositA ?2) (UseN ?))` |only trees of this form|
+
+#NORMAL
+
+#VSPACE
+
+#### tt = to_trie
+
+#NOINDENT
+`tt` = `to_trie`: *combine a list of trees into a trie.*
+
+#TINY
+
+ * Syntax: `to_trie`
+
+#NORMAL
+
+#VSPACE
+
+#### ut = unicode_table
+
+#NOINDENT
+`ut` = `unicode_table`: *show a transliteration table for a unicode character set.*
+
+#TINY
+
+ * Options:
+
+
+|`-amharic` |Amharic|
+|`-ancientgreek` |ancient Greek|
+|`-arabic` |Arabic|
+|`-arabic_unvocalized` |unvocalized Arabic|
+|`-devanagari` |Devanagari|
+|`-greek` |modern Greek|
+|`-hebrew` |unvocalized Hebrew|
+|`-nepali` |Nepali|
+|`-persian` |Persian/Farsi|
+|`-sanskrit` |Sanskrit|
+|`-sindhi` |Sindhi|
+|`-telugu` |Telugu|
+|`-thai` |Thai|
+|`-urdu` |Urdu|
+
+#NORMAL
+
+#VSPACE
+
+#### vd = visualize_dependency
+
+#NOINDENT
+`vd` = `visualize_dependency`: *show word dependency tree graphically.*
+
+#TINY
+
+Prints a dependency tree in the .dot format (the graphviz format, default)
+or LaTeX (flag -output=latex)
+or the CoNLL/MaltParser format (flag -output=conll for training, malt_input
+for unanalysed input).
+By default, the last argument is the head of every abstract syntax
+function; moreover, the head depends on the head of the function above.
+The graph can be saved in a file by the wf command as usual.
+If the -view flag is defined, the graph is saved in a temporary file
+which is processed by dot (graphviz) and displayed by the program indicated
+by the view flag. The target format is png, unless overridden by the
+flag -format. Results from multiple trees are combined to pdf with convert (ImageMagick).
+See also 'vp -showdep' for another visualization of dependencies.
+
+ * Options:
+
+
+|`-v` |show extra information|
+|`-conll2latex` |convert conll to latex|
+
+ * Flags:
+
+
+|`-abslabels` |abstract configuration file for labels, format per line 'fun label*'|
+|`-cnclabels` |concrete configuration file for labels, format per line 'fun {words|*} pos label head'|
+|`-file` |same as abslabels (abstract configuration file)|
+|`-format` |format of the visualization file using dot (default "png")|
+|`-output` |output format of graph source (latex, conll, dot (default but deprecated))|
+|`-view` |program to open the resulting graph file (default "open")|
+|`-lang` |the language of analysis|
+
+ * Examples:
+
+
+|`gr | vd` |generate a tree and show dependency tree in .dot|
+|`gr | vd -view=open` |generate a tree and display dependency tree on with Mac's 'open'|
+|`gr | vd -view=open -output=latex` |generate a tree and display latex dependency tree with Mac's 'open'|
+|`gr -number=1000 | vd -abslabels=Lang.labels -cnclabels=LangSwe.labels -output=conll` |generate a random treebank|
+|`rf -file=ex.conll | vd -conll2latex | wf -file=ex.tex` |convert conll file to latex|
+
+#NORMAL
+
+#VSPACE
+
+#### vp = visualize_parse
+
+#NOINDENT
+`vp` = `visualize_parse`: *show parse tree graphically.*
+
+#TINY
+
+Prints a parse tree in the .dot format (the graphviz format).
+The graph can be saved in a file by the wf command as usual.
+If the -view flag is defined, the graph is saved in a temporary file
+which is processed by dot (graphviz) and displayed by the program indicated
+by the view flag. The target format is png, unless overridden by the
+flag -format. Results from multiple trees are combined to pdf with convert (ImageMagick).
+
+ * Options:
+
+
+|`-showcat` |show categories in the tree nodes (default)|
+|`-nocat` |don't show categories|
+|`-showdep` |show dependency labels|
+|`-showfun` |show function names in the tree nodes|
+|`-nofun` |don't show function names (default)|
+|`-showleaves` |show the leaves of the tree (default)|
+|`-noleaves` |don't show the leaves of the tree (i.e., only the abstract tree)|
+
+ * Flags:
+
+
+|`-lang` |the language to visualize|
+|`-file` |configuration file for dependency labels with -deps, format per line 'fun label*'|
+|`-format` |format of the visualization file (default "png")|
+|`-view` |program to open the resulting file (default "open")|
+|`-nodefont` |font for tree nodes (default: Times -- graphviz standard font)|
+|`-leaffont` |font for tree leaves (default: nodefont)|
+|`-nodecolor` |color for tree nodes (default: black -- graphviz standard color)|
+|`-leafcolor` |color for tree leaves (default: nodecolor)|
+|`-nodeedgestyle` |edge style between tree nodes (solid/dashed/dotted/bold, default: solid)|
+|`-leafedgestyle` |edge style for links to leaves (solid/dashed/dotted/bold, default: dashed)|
+
+ * Examples:
+
+
+|`p "John walks" | vp` |generate a tree and show parse tree as .dot script|
+|`gr | vp -view=open` |generate a tree and display parse tree on a Mac|
+|`p "she loves us" | vp -view=open -showdep -file=uddeps.labels -nocat` |show a visual variant of a dependency tree|
+
+#NORMAL
+
+#VSPACE
+
+#### vt = visualize_tree
+
+#NOINDENT
+`vt` = `visualize_tree`: *show a set of trees graphically.*
+
+#TINY
+
+Prints a set of trees in the .dot format (the graphviz format).
+The graph can be saved in a file by the wf command as usual.
+If the -view flag is defined, the graph is saved in a temporary file
+which is processed by dot (graphviz) and displayed by the command indicated
+by the view flag. The target format is postscript, unless overridden by the
+flag -format. Results from multiple trees are combined to pdf with convert (ImageMagick).
+With option -mk, use for showing library style function names of form 'mkC'.
+
+ * Options:
+
+
+|`-api` |show the tree with function names converted to 'mkC' with value cats C|
+|`-mk` |similar to -api, deprecated|
+|`-nofun` |don't show functions but only categories|
+|`-nocat` |don't show categories but only functions|
+
+ * Flags:
+
+
+|`-format` |format of the visualization file (default "png")|
+|`-view` |program to open the resulting file (default "open")|
+
+ * Examples:
+
+
+|`p "hello" | vt` |parse a string and show trees as graph script|
+|`p "hello" | vt -view="open"` |parse a string and display trees on a Mac|
+
+#NORMAL
+
+#VSPACE
+
+#### wf = write_file
+
+#NOINDENT
+`wf` = `write_file`: *send string or tree to a file.*
+
+#TINY
+
+ * Options:
+
+
+|`-append` |append to file, instead of overwriting it|
+
+ * Flags:
+
+
+|`-file` |the output filename|
+
+#NORMAL
+
+## The GF batch compiler
+
+With the option `-batch`, GF can be invoked in batch mode, i.e.
+without opening the shell, to compile files from `.gf` to `.gfo`.
+The `-s` option ("silent") eliminates all messages except errors.
+
+ $ gf -batch -s LangIta.gf
+
+With the option `-make`, and as a set of
+top-level grammar files (with the same abstract syntax) as arguments,
+GF produces a `.pgf` file. The flag `-optimize-pgf` minimizes
+the size of the `.pgf` file, and is recommended for grammars to be shipped.
+
+ $ gf -make -optimize-pgf LangIta.gf LangEng.gf LangGer.gf
+
+The flag `-output-format` changes the output format from `.pgf` to
+some other format. For instance
+
+ $ gf -make -output-format=js LangEng.pgf LangGer.pgf
+
+Notice that the arguments can be `.pgf` files, which in this case
+are merged and written into a JavaScript grammar file.
+
+More options and instructions are obtained with
+
+ $ gf -help
+
+To run GF from a *script*, redirection of standard input can be used:
+
+ $ gf "
-%!postproc(html): "#NORMAL" ""
-%!postproc(html): "#TINY" ""
-%!postproc(html): "#NOINDENT" ""
-
-The GF software system implements the GF programming language. Its
-components are
-- the //compiler//,
-translating ``.gf`` source files to ``.gfo`` object files, to
-``.pgf`` run-time grammars, and to various other formats
-- the //run-time system//,
-performing parsing, generation, translation and other functions with
-``.pgf`` grammars
-- the //command interpreter//, also known as the //GF shell//,
-executing user commands by calling the compiler and the run-time system
-
-
-This page describes the commands of the GF shell,
-as well as the use of the compiler in batch mode.
-
-%%toc
-
-==The GF shell==
-
-The GF shell is invoked by the command ``gf``, which takes arguments and
-options according to the following syntax:
-```
- gf (OPTION | FLAG)* FILE*
-```
-The shell maintains a //state//, to which belong
-- a multilingual PGF grammar
-- optionally, a set of compiled GF modules (retaining ``oper`` definitions)
-- a history of previous commands
-- a set of string, tree, and command macros
-
-
-Unless file arguments are provided to the ``gf`` command, the shell starts in an
-empty state, with no grammars and no history.
-
-In the shell, a set of commands
-is available. Some of these commands may change the grammars in the state. The general
-syntax of commands is given by the following BNF grammar:
-```
- COMMAND_LINE ::= COMMAND_PIPE
- COMMAND_LINE ::= COMMAND_PIPE ";" COMMAND_LINE
- COMMAND_PIPE ::= COMMAND
- COMMAND_PIPE ::= COMMAND "|" COMMAND_PIPE
- COMMAND ::= COMMAND_ID (OPTION | FLAG)* ARGUMENT?
- OPTION ::= "-"OPTION_ID
- FLAG ::= "-"OPTION_ID "=" VALUE
- ARGUMENT ::= QUOTED_STRING | TREE
- VALUE ::= IDENT | QUOTED_STRING
-```
-A command pipe is a sequence of commands interpreted in such a way
-that the output of each command
-is send as input to the next. The option ``-tr`` causes GF to show a trace,
-i.e. the intermediate result of the command to which it is attached.
-
-A command line is a sequence of pipes separated by ``;``. These pipes are
-executed one by one, in the order of appearance.
-
-===GF shell commands===
-
-The full set of GF shell commands is listed below with explanations.
-This list can also be obtained in the GF shell by the command ``help -full``.
-
-%!include: gf-help-full.txt
-
-==The GF batch compiler==
-
-With the option ``-batch``, GF can be invoked in batch mode, i.e.
-without opening the shell, to compile files from ``.gf`` to ``.gfo``.
-The ``-s`` option ("silent") eliminates all messages except errors.
-```
- $ gf -batch -s LangIta.gf
-```
-With the option ``-make``, and as a set of
-top-level grammar files (with the same abstract syntax) as arguments,
-GF produces a ``.pgf`` file. The flag ``-optimize-pgf`` minimizes
-the size of the ``.pgf`` file, and is recommended for grammars to be shipped.
-```
- $ gf -make -optimize-pgf LangIta.gf LangEng.gf LangGer.gf
-```
-The flag ``-output-format`` changes the output format from ``.pgf`` to
-some other format. For instance
-```
- $ gf -make -output-format=js LangEng.pgf LangGer.pgf
-```
-Notice that the arguments can be ``.pgf`` files, which in this case
-are merged and written into a JavaScript grammar file.
-
-More options and instructions are obtained with
-```
- $ gf -help
-```
-To run GF from a //script//, redirection of standard input can be used:
-```
- $ gf
-%!postproc(html): |
-%!postproc(html):
-%!postproc(html): 'ICFP 2012' 'ICFP 2012'
-
-
-==Goals==
+## Goals
This tutorial gives a hands-on introduction to GF (Grammatical Framework),
a special-purpose functional language
@@ -32,7 +23,7 @@ combination of advanced features such as parametrized modules, regular
expression pattern matching, and dependent types - all of which are
amply motivated by practical applications.
-The [GF Resource Grammar Library http://www.grammaticalframework.org/lib/doc/synopsis.html]
+The [GF Resource Grammar Library](http://www.grammaticalframework.org/lib/doc/synopsis.html)
is an open-source international project
now comprising 24 languages, with 5 to 10 more under construction.
It makes it possible to develop grammar applications without linguistic knowledge.
@@ -43,25 +34,22 @@ with no exceptions, but so far we haven't met any unsurmountable problems.
If you want to contribute a new language, let us know! It is a job of
2 to 6 months.
-
-==Structure of the tutorial==
+## Structure of the tutorial
Hour 1. Writing multilingual grammars in GF (Aarne Ranta)
-[Slides http://www.cse.chalmers.se/~aarne/talks/gf-icfp-2012-1.pdf]
+[Slides](http://www.cse.chalmers.se/~aarne/talks/gf-icfp-2012-1.pdf)
Hour 2. Applications for the web, mobile phones, and as embedded Haskell programs
(Thomas Hallgren)
-[Slides /~hallgren/Talks/GF/Tutorial2012/tutorial2012.html]
+[Slides](/~hallgren/Talks/GF/Tutorial2012/tutorial2012.html)
Hour 3. Internals of GF, theoretical aspects, and future trends (Krasimir Angelov)
+## Organizers
-==Organizers==
-
-
-[Krasimir Angelov http://www.chalmers.se/cse/EN/organization/divisions/computing-science/people/angelov-krasimir]
+[Krasimir Angelov](http://www.chalmers.se/cse/EN/organization/divisions/computing-science/people/angelov-krasimir)
-[Thomas Hallgren http://www.cse.chalmers.se/~hallgren/]
+[Thomas Hallgren](http://www.cse.chalmers.se/~hallgren/)
-[Aarne Ranta http://www.cse.chalmers.se/~aarne/]
+[Aarne Ranta](http://www.cse.chalmers.se/~aarne/)