Code Monkey home page Code Monkey logo

gf-rgl's Introduction

GF Logo

GF Resource Grammar Library (RGL)

Build Status

The GF Resource Grammar Library is the standard library for Grammatical Framework. It covers the morphology and basic syntax of over 30 languages.

For more about the RGL, see the synopsis page.

Choose your build method

There are 3 ways to build and install the RGL:

  • Haskell script Make.hs
  • Shell script Make.sh (does not require Haskell)
  • Windows batch file Make.bat (does not require Haskell)

Install locations

The install scripts will try to determine where to copy the compiled RGL modules. It will look for, in this order:

  • the --dest= flag (see below)
  • the GF_LIB_PATH environment variable
  • the file ../gf-core/DATA_DIR (relative to this directory). This only works if you have the gf-core and gf-rgl repositories in the same top-level directory and you have already compiled GF from source. (This is considered a bit hacky and will probably disappear in the future).

Language config

A list of all languages and their properties is maintained centrally in languages.csv. This file should be kept up-to-date and all build methods should read this config file. If you see something wrong, please report/fix it.

Description of columns:

  • Code, e,g, Eng
  • Directory, e.g. english
  • Functor (not used)
  • Unlexer (not used)
  • Present: languages that have --# notpresent marked
  • All: languages for which to compile All
  • Try: languages for which to compile Try
  • Symbolic: languages for which to compile Symbolic
  • Compatibility: languages for which to complile Compatibility

Columns can be a string, just y's (where nothing means n) or just (n's where nothing means y).

Haskell script: Make.hs

This build method gives you most options. You will need Haskell installed on your system.

Basic

If you have Make installed and don't care about advanced settings, you can compile the RGL and install it to the default location with:

make install

This is the same as make build followed by make copy. There is also make clean available.

Advanced

For more fine-grained control over the build process, you can run the build script directly:

runghc Make ...

Where ... is one of:

build   [CMDS] [MODE] [--langs=[+|-]LANG,LANG,...] [--gf=...] [--verbose|-v]
copy    [MODE] [--dest=...]
install [CMDS] [MODE] [--langs=[+|-]LANG,LANG,...] [--gf=...] [--dest=...] [--verbose|-v]
clean
  • CMDS is one or more of: prelude, all, lang, api, compat, or an explicit module name (e.g. ExtraEng.gf. You don't need to specify to language subdirectory, but there is a restriction that the module must exist in a direct subdirectory of src). If ommitted, the default command is prelude all.
  • MODE is one of: present, alltenses (default is both).
  • LANG is a 3-letter language code, e.g. Eng, Swe etc.
  • You can override the default language list with --langs=...
  • You can add languages to the default list with --langs=+...
  • You can remove languages from the default list with langs=-...
  • The path to GF installed on your system can be specified via the --gf flag (default is that the gf executable is in the global system path).
  • The --dest flag can be used to manually specify where the compiled RGL modules should be copied/installed. This is the same place as GF_LIB_PATH.

Shell script: Make.sh

This method is provided as an alternative for those who don't have Haskell installed. Simply run the script to build the entire RGL and install in the default location.

You can pass the following flags:

  • --dest=... to manually specify the install location
  • --gf=... to specify the path to the gf executable, if not available on the system path
  • --verbose or -v to show a list of files being built (errors will always be shown)

Windows batch file: Make.bat

This script is still untested.

This method is provided as an alternative for Windows users who don't have Haskell installed.

It is supposed to be a port of Make.sh and works in largely the same way. In particular, it accepts the same flags (in the same format) as described above.

However it currently tries to build all modules for all languages and doesn't consider the details of which modules should be compiled for each language (specified in languages.csv)

About this repository

On 2018-07-25, the monolithic GF repository was split in two:

  1. gf-core โ€” the GF compiler, shell and runtimes
  2. gf-rgl โ€” the resource grammar library

The former repository is now archived and no longer updated. The split was performed using this script and the output of that script is here.

gf-rgl's People

Contributors

aarneranta avatar krangelov avatar inariksit avatar johnjcamilleri avatar ayberkt avatar thomas-h avatar bringert avatar shafqatvirk avatar odanoburu avatar normundsg avatar saludes avatar ramonique avatar gdetrez avatar mkmks avatar adamslaski avatar lizazim avatar malinahlberg avatar danadannells avatar kaljurand avatar cunger avatar scharolta avatar prasanthk-ms09 avatar hleiss avatar kristiank avatar ppski avatar heatherleaf avatar bjarkit avatar olgacaprotti avatar pkolachi avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.