ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Antoine Cailliau <antoinecailliau@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: t-bnf module with MKIV
Date: Wed, 26 Jul 2017 13:28:05 +0200	[thread overview]
Message-ID: <CAKX8Tc5=jde=BDRRVs-p7EaF0NAEPZASSEqEJ7tcdUMgXKgLWA@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1684 bytes --]

Hi,

I'm trying to typeset a BNF grammar. The module t-bnf appears to not work
with mkiv.

http://ctan.math.washington.edu/tex-archive/macros/context/contrib/context-bnf/doc/context/third/bnf/t-bnf.pdf

tex error       > tex error on line 157 in file
/Users/acailliau/context/tex/texmf-modules/tex/context/third/bnf/t-bnf.tex:
! Undefined control sequence
 \c!terminalstart
                 =\tttf
\syst_helpers_process_comma_item #1,#2->\if ,#1
                                               ,\expandafter
\syst_helpers_p... \c!terminalstart =\tttf , \c!terminalstop
                                          =, \c!nonterminalstart =\mathematics
\syst_helpers_get_parameters ...cess_comma_item #1
                                                  ,],\_e_o_p_
l.157    \c!indentnext=\v!no]


147     \def\setupbnfgrammar%
148       {\dosingleargument\dosetupbnfgrammar}
149
150     \setupbnfgrammar
151       [\c!terminalstart=\tttf,
152        \c!terminalstop=,
153        \c!nonterminalstart=\mathematics{\langle},
154        \c!nonterminalstop=\mathematics{\rangle},
155        \c!is={ \mathematics{\longrightarrow}},
156        \c!option=\mathematics{\vert},
157 >>     \c!indentnext=\v!no]
158
159     %D \macros
160     %D   {BNF}
161     %D
162     %D We also define a useful abbreviation to be used for header
texts and labels.
163
164     \logo[BNF]{bnf}
165
166     %D And we use it here:
167


Can anyone provides me clues on how to make it work ?

Here is a minimal example:

\usemodule[t-bnf]

\starttext

\startbnfgrammar[]
<exp>: <num> | <num> "+" <num>
<num>: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
\stopbnfgrammar

\stoptext

Thanks in advance,

Antoine

[-- Attachment #1.2: Type: text/html, Size: 2987 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

                 reply	other threads:[~2017-07-26 11:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKX8Tc5=jde=BDRRVs-p7EaF0NAEPZASSEqEJ7tcdUMgXKgLWA@mail.gmail.com' \
    --to=antoinecailliau@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).