Submission #40

Submission information
Submitted by jordi.saludes
Monday, 7 January, 2013 - 16:24
147.83.83.252
Basic information

Which grammar you have written? Which language(s)? Rate your GF and language skills with the following scale:

Language skills

0 : no skills 1 : passive knowledge 2 : fluent non-native 3 : native speaker

GF skills

0 : no skills 1 : basic skills (2-day GF tutorial) 2 : medium skills (previous experience of similar task) 3 : advanced skills (resource grammar writer/substantial contributor)

Application grammars: Part of the mgl library, abstracts of the mgl/sage library, the grammar inside mgl/wproblems.
Resource grammars: Part of the Cat.

Cat: 3, Spa: 3, Fre: 2, Eng: 2, Ger: 1.

GF: 3
Development tools
  • Text editor + GF shell
  • Cloud-based IDE
  • Other, specify later
Vim, Sublime Text.

Mac OS X, Linux Ubuntu.

wproblems: 1726 lines, all mgl: 19737 lines
Tried it when not having GF available because of the syntax checking
I used to write GF code in Apple Xcode developement suite. Then, they changed how you define syntax coloring for a new language and it's not really well documented anymore
Diagnostic tools
verbose (import -v FILE)
  • print_grammar (pg)
  • compute_concrete (cc)
Testing
  • Treebanks
  • ...other method, specify later
I developed ad-hoc code in haskell to store, edit and show differences in treebanks.
RGL
  • RGL synopsis document
  • RGL source browser
  • Download the source files and read them
  • ...because other documentation was not helpful
Grammar writing
  • Test corpus of sentences you want to express in the grammar
  • Abstract syntax based on an existing formal system
Code in Prolog developed simultaneously with GF.
Sentence
  • No semantic control in abstract syntax
  • ...but with external control
  • Base module and domain-specific extensions
  • Common constructions with a functor
  • ...functor only for the concrete syntax of the base grammar?
  • lincats only from recommended RGL API categories
  • lincats from categories that you have created yourself (see example below)
  • ...I use a type synonym and a special constructor
Other comments

If you have any other comments, for which there wasn't space, please comment here.