This commit is contained in:
Krasimir Angelov
2017-12-09 23:05:32 +01:00
3 changed files with 15 additions and 7 deletions

2
.gitignore vendored
View File

@@ -41,3 +41,5 @@ src/runtime/java/.libs/
src/runtime/python/build/
src/ui/android/libs/
src/ui/android/obj/
.cabal-sandbox
cabal.sandbox.config

View File

@@ -17,15 +17,16 @@ welcome!
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
==Eclipse==
[GF Eclipse Plugin http://www.grammaticalframework.org/eclipse/index.html]
[GF Eclipse Plugin http://www.grammaticalframework.org/eclipse/index.html], by John J. Camilleri
==Gedit==
[John J. Camilleri http://johnjcamilleri.com/]
provided the following syntax highlighting mode for
[Gedit http://www.gedit.org/] (the default text editor in Ubuntu).
By John J. Camilleri
Copy the file below to
``~/.local/share/gtksourceview-3.0/language-specs/gf.lang`` (under Ubuntu).
@@ -37,7 +38,7 @@ 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
- 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
@@ -51,8 +52,9 @@ Some helpful notes/links:
==Geany==
[John J. Camilleri http://johnjcamilleri.com/] provided the following
[custom filetype http://www.geany.org/manual/dev/index.html#custom-filetypes]
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``

View File

@@ -275,6 +275,7 @@ pgfCommands = Map.fromList [
("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")
] ++ stringOpOptions,
flags = [
@@ -791,6 +792,9 @@ pgfCommands = Map.fromList [
_ | isOpt "treebank" opts ->
(showCId (abstractName pgf) ++ ": " ++ showExpr [] t) :
[showCId lang ++ ": " ++ s | lang <- optLangs pgf opts, s<-linear pgf opts lang t]
_ | isOpt "tabtreebank" opts ->
return $ concat $ intersperse "\t" $ (showExpr [] t) :
[s | lang <- optLangs pgf opts, s <- linear pgf opts lang t]
_ | isOpt "chunks" opts -> map snd $ linChunks pgf opts t
_ -> [s | lang <- optLangs pgf opts, s<-linear pgf opts lang t]
linChunks pgf opts t =