This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
[docbook] Using the EBNF module for space-structured languages
- From: Ruth Ivimey-Cook <Ruth dot Ivimey-Cook at ivimey dot org>
- To: docbook at lists dot oasis-open dot org
- Date: Mon, 07 Feb 2005 13:45:43 +0000
- Subject: [docbook] Using the EBNF module for space-structured languages
Hi,
I have recently started using DocBook to write a book on the programming
language Occam-Pi, and would like to use the EBNF module (or something
similar to it) to include the language syntax and grammar. However,
there
is a problem: Occam-Pi is a space-structured language, (in the same way
as Python and occam from which Occam-Pi is derived. How can I define
EBNF grammars for it in DocBook?
For a prior example of a grammar for occam, see page 11 of the occam 2.1
manual, found at http://www.wotug.org/occam/documentation/oc21refman.pdf
An example code snippet:
SEQ
a := 10
SEQ i = 0 FOR a STEP 2
calc(i)
calc(i+1)
--
Ruth Ivimey-Cook <ruth@ivimey.org>