Skip to content

McEarl/forthel-syntax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The syntax of ForTheL

This package contains a complete syntax reference for ForTheL, both for its FTL and its TEX dialect.

Visit https://mcearl.github.io/forthel-syntax for more information on ForTheL and to access an HTML version of its syntax references.

Usage

This package contains just source files for the syntax reference written in Markdown. They can easily be edited, but are not ment for being read. To convert them to HTML follow the steps below:

  1. Download and set up the package nbnf-tools. It provides a tool to convert syntax references like this one from Markdown to HTML.

  2. Execute the shell script makeref.sh from within this directory with the following arguments:

    • The first argument must be either ftl or tex, depending on whether you want to generate the syntax reference for ForTheL's FTL or TEX dialect.

    • The second argument must be the path to your local copy of the nbnf-tools repository.

    • The third argument must either be standalone or jekyll, depending on whether you want to generate a standalone HTML file or an HTML file which can be used within the Jekyll environment used by the GitHub page of this repository.

    For instance the command to execute the script could look like this:

    ./makeref.sh tex ~/github-repos/nbnf-tools standalone
  3. Then within this directory you'll find a new directory called html (if it does not exist already) which contains an HTML file of the syntax reference.

How to edit the source files

To edit the source files of this reference, have a look at the directory src. There you'll find two subdirectories ftl and tex, each containing the sources for the syntax references of the FTL and TEX dialect, respectively, written in Pandoc Markdown. Moreover in the src directory there are some files which are part of the source of the reference of both the FTL and TEX dialect.

Within each of the mentioned subdirectories you'll find a file called header.md. It contains information like title and author of the reference. Each other file contains the source of some chapter of the reference. To add new grammar rules to one of these files, you have to enclose it between ```nbnf and ``` tags and follow the syntax rules of NBNF, an extension of BNF.

After editing any of these files you can update the correspongind HTML version by following the steps in the last section.

If you want to add a new source file, make sure to add its (relative) path to the appropriate file in the contents directory.

About

Complete reference of the syntax of ForTheL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages