1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook EBNF Module V1.0//EN"
3 "http://www.oasis-open.org/docbook/xml/ebnf/1.0/dbebnf.dtd">
6 <title>Unit Test: productionset.001</title>
7 <releaseinfo role="CVS">$Id: productionset.001.xml,v 1.2 2008-07-11 07:53:15 rt Exp $</releaseinfo>
8 <author><firstname>Norman</firstname><surname>Walsh</surname>
9 <affiliation><address><email>ndw@nwalsh.com</email></address></affiliation>
13 <productionset><title>Arithemetic Expressions</title>
14 <production id="ebnf.expression">
16 <rhs><nonterminal def="#ebnf.arith">ArithExpression</nonterminal> |
17 <nonterminal def="#ebnf.mult">MultExpression</nonterminal>
18 <lineannotation>Does this grammar actually get precedence right?
22 <production id="ebnf.arith">
23 <lhs>ArithExpression</lhs>
24 <rhs><nonterminal def="#ebnf.expression">Expression</nonterminal>
26 <nonterminal def="#ebnf.mult">MultExpression</nonterminal>
29 <rhs><nonterminal def="#ebnf.expression">Expression</nonterminal>
31 <nonterminal def="#ebnf.mult">MultExpression</nonterminal>
35 <production id="ebnf.mult">
36 <lhs>MultExpression</lhs>
37 <rhs><nonterminal def="#ebnf.mult">MultExpression</nonterminal>
39 <nonterminal def="#ebnf.mult">MultExpression</nonterminal>
43 <nonterminal def="#ebnf.mult">MultExpression</nonterminal>
45 <nonterminal def="#ebnf.mult">MultExpression</nonterminal>
48 <constraint linkend="div0"/>
51 <nonterminal def="#ebnf.number">Number</nonterminal>
55 <production id="ebnf.number">
61 <constraintdef id="div0" role="Err">
62 <title>Division by Zero</title>
63 <para>Division by zero is an error.</para>