SiroccoParser.OneCasaba
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Generated by BJackson.pa at August 26, 1987 3:38:10 pm PDT
using ThreeCasabaFour [1.2] of June 1, 1987 6:00:00 pm PDT
Begin
{ "ARRAY" "BEGIN" "BOOLEAN" "CARDINAL" "CHOICE" "DEPENDS" "END" "ERROR" "FALSE" "INTEGER" "LONG" "OF" "PROCEDURE" "PROGRAM" "RECORD" "REPORTS" "RETURNS" "SEQUENCE" "SINK" "SOURCE" "STRING" "TRUE" "TYPE" "UNSPECIFIED" "UPON" "VERSION" "(" ")" "[" "]" "{" "}" ":" "." ";" "=" "=>" "," "-" }: SimpleTokens;
id: GenericToken = "tokenID" ;
decimal: GenericToken = "tokenDECIMAL" ;
hex: GenericToken = "tokenHEX" ;
octal: GenericToken = "tokenOCTAL" ;
rope: GenericToken = "tokenROPE" ;
export: NonTerminal;
program: NonTerminal;
dependency: NonTerminal;
importlist: NonTerminal;
import: NonTerminal;
declarationlist: NonTerminal;
declaration: NonTerminal;
type: NonTerminal;
simpletype: NonTerminal;
reference: NonTerminal;
primitive: NonTerminal;
construction: NonTerminal;
constant: NonTerminal;
value: NonTerminal;
complexvalue: NonTerminal;
optional: NonTerminal;
mandatory: NonTerminal;
enumeration: NonTerminal;
keyindexpair: NonTerminal;
union: NonTerminal;
selector: NonTerminal;
fieldlist: NonTerminal;
field: NonTerminal;
grouping: NonTerminal;
constructor: NonTerminal;
binding: NonTerminal;
arguments: NonTerminal;
results: NonTerminal;
errors: NonTerminal;
namelist: NonTerminal;
number: NonTerminal;
export ← program "." ;
program ← id ":" "PROGRAM" decimal "VERSION" decimal "=" "BEGIN" dependency declarationlist "END" ;
dependency.empty ← ;
dependency.imports ← "DEPENDS" "UPON" importlist ";" ;
importlist.one ← import ;
importlist.more ← importlist "," import ;
import ← id "(" decimal ")" "VERSION" decimal ;
declarationlist.a ← ;
declarationlist.b ← declarationlist declaration ;
declaration.type ← id ":" "TYPE" "=" type ";" ;
declaration.constant ← id ":" type "=" constant ";" ;
declaration.id ← id ":" type "=" id ";" ;
type.simple ← simpletype ;
type.construction ← construction ;
simpletype.reference ← reference ;
simpletype.primitive ← primitive ;
reference.alias ← id ;
reference.import ← id "." id ;
primitive.bool ← "BOOLEAN" ;
primitive.card16 ← "CARDINAL" ;
primitive.card32 ← "LONG" "CARDINAL" ;
primitive.int16 ← "INTEGER" ;
primitive.int32 ← "LONG" "INTEGER" ;
primitive.sink ← "SINK" ;
primitive.source ← "SOURCE" ;
primitive.string ← "STRING" ;
primitive.unspec ← "UNSPECIFIED" ;
construction.array ← "ARRAY" mandatory "OF" simpletype ;
construction.choice ← "CHOICE" reference "OF" "{" union "}" ;
construction.enum ← "{" enumeration "}" ;
construction.error ← "ERROR" arguments ;
construction.proc ← "PROCEDURE" arguments results errors ;
construction.record ← "RECORD" "[" fieldlist "]" ;
construction.null ← "RECORD" "[" "]" ;
construction.seq ← "SEQUENCE" optional "OF" simpletype ;
constant.value ← value ;
constant.complex ← complexvalue ;
constant.choiceconstant ← id constant ;
constant.choiceid ← id id ;
constant.import ← id "." id ;
value.true ← "TRUE" ;
value.false ← "FALSE" ;
value.number ← number ;
value.inverted ← "-" number ;
value.string ← rope ;
complexvalue.grouping ← "[" grouping "]" ;
complexvalue.constructor ← "[" constructor "]" ;
complexvalue.null ← "[" "]" ;
optional.nonempty ← constant ;
optional.alias ← id ;
optional.empty ← ;
mandatory.value ← constant ;
mandatory.alias ← id ;
enumeration.one ← keyindexpair ;
enumeration.more ← keyindexpair "," enumeration ;
keyindexpair ← id "(" mandatory ")" ;
union.one ← selector ;
union.more ← selector "," union ;
selector.one ← namelist "=>" simpletype ;
selector.two ← namelist "(" number ")" "=>" simpletype ;
fieldlist.field ← field ;
fieldlist.more ← field "," fieldlist ;
field ← namelist ":" simpletype ;
grouping.const ← constant ;
grouping.id ← id ;
grouping.cmore ← constant "," grouping ;
grouping.imore ← id "," grouping ;
constructor.one ← binding ;
constructor.more ← binding "," constructor ;
binding.id ← namelist ":" id ;
binding.const ← namelist ":" constant ;
arguments.empty ← ;
arguments.list ← "[" fieldlist "]" ;
arguments.null ← "[" "]" ;
results.empty ← ;
results.list ← "RETURNS" "[" fieldlist "]" ;
results.null ← "RETURNS" "[" "]" ;
errors.empty ← ;
errors.list ← "REPORTS" "[" namelist "]" ;
namelist.one ← id ;
namelist.more ← id "," namelist ;
number.decimal ← decimal ;
number.octal ← octal ;
number.hex ← hex ;
End.