File: README

package info (click to toggle)
context-modules 20140528-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 15,744 kB
  • ctags: 444
  • sloc: xml: 1,501; makefile: 51; sh: 31
file content (39 lines) | stat: -rw-r--r-- 909 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39


                               BNF Module README


INTRODUCTION


  The t-bnf module implements a way to easily write BNF grammars in CONTEXT.
  Let's look at an example BNF grammar in a document:

  \starttext

  Here's a \BNF\ grammar.  Enjoy. 

  \placebnfgrammar
    [here]
    [bnf:test]
    {A test of the \BNF\ module}
    {\startbnfgrammar[]
      <S>: a<S>b
      <S>: $\epsilon$
    \stopbnfgrammar}

  Which will match the language $L = \{\,a^nb^n \mid n \geq 0\,\}$.

  \stoptext

  You may try to generate module documenation embedded in t-bnf.tex with texexec
  as well:

  % texexec --interface=en --module --pdf t-bnf.tex

  If you have any issues with creating the documentation this may be a result
  of lacking the proper language format.  You can look up the proper
  information for generating these formats in minstall.pdf at PRAGMA-ADEs site
  (http://www.pragma-ade.com/).

  Enjoy!