From 2da722d930f0c3eb7bff4653a03a426b6c57c4f7 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 27 Nov 2017 09:50:51 +0100 Subject: [PATCH 1/3] Add cabal sandbox files to .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 8bcdd3c46..1c083eded 100644 --- a/.gitignore +++ b/.gitignore @@ -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 From 98db9a257fb68ac790e45ebccdb09999a871e18d Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 6 Dec 2017 10:35:28 +0100 Subject: [PATCH 2/3] Update editor modes page for Atom --- doc/gf-editor-modes.t2t | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/doc/gf-editor-modes.t2t b/doc/gf-editor-modes.t2t index 64d998e06..d9368dd32 100644 --- a/doc/gf-editor-modes.t2t +++ b/doc/gf-editor-modes.t2t @@ -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`` From 79feeaf5b8f4a7b1a9bcf5f08cec19d2164fdfc4 Mon Sep 17 00:00:00 2001 From: Aarne Ranta Date: Wed, 6 Dec 2017 17:37:12 +0100 Subject: [PATCH 3/3] new option linerize -tabtreebank for tab-separated treebank generation --- src/compiler/GF/Command/Commands.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/GF/Command/Commands.hs b/src/compiler/GF/Command/Commands.hs index 27b72b5c4..3ca2ab962 100644 --- a/src/compiler/GF/Command/Commands.hs +++ b/src/compiler/GF/Command/Commands.hs @@ -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 =