This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]