Next: Objects and Values
Up: Shore Data Language Reference
Previous: Lexical Syntax
SDL grammar rules are presented at the start of many of the following
sections.
They are also collected in Appendix A.
The notation is an extended form of BNF, with
``regular expressions''
allowed on the right-hand side.
Terminal symbols (tokens) are represented by upper-case words or strings
enclosed in single quotes.
Non-terminal symbols (syntax classes) are denoted by lower-case words.
Grammar operators are as follows.
- word : spec
-
--word is defined to be an instance of spec
- spec +
-
--one or more instances of spec
- spec *
-
--zero or more instances of spec
- spec1 spec2
-
--an instance of spec1 followed by an instance of spec2
- spec1 spec2
-
--an instance of spec1 or an instance of spec2
- [ spec ]
-
--an optional instance of spec
- ( spec )
-
--an instance of spec
The postfix operators `+' and `*'
have higher precedence than concatenation, which has higher precedence
than `'.
Colon (`:') has the lowest precedence of all.
Parentheses are used to override these precedences as appropriate.
Indentation is used to indicate continuation of a grammar rule over multiple
lines.
A standard BNF grammar (acceptable to YACC or Bison) is given in Appendix B.
Marvin Solomon
Fri Aug 2 13:39:38 CDT 1996