2.4
Grammar Notation
GRAMMARS
which defines one right hand side for the nonterminal
ConstructorDeclaration
.
(This right hand side is an abbreviation for four alternative right hand sides,
because of the two occurrences of  
opt
 .)
When the words  one of   follow the colon in a grammar definition, they sig 
nify that each of the terminal symbols on the following line or lines is an alterna 
tive definition. For example, the lexical grammar for Java contains the production:
ZeroToThree: one of
0 1 2 3
which is merely a convenient abbreviation for:
ZeroToThree:
0
1
2
3
When an alternative in a lexical production appears to be a token, it represents
the sequence of characters that would make up such a token. Thus, the definition:
BooleanLiteral: one of
true false
in a lexical grammar production is shorthand for:
BooleanLiteral:
t r u e
f a l s e
The right hand side of a lexical production may specify that certain expan 
sions are not permitted by using the phrase  but not  and then indicating the
expansions to be excluded, as in the productions for
InputCharacter
 ( 3.4) and
Identifier
 ( 3.8):
InputCharacter:
UnicodeInputCharacter
 but not
CR
 or
LF
Identifier:
IdentifierName
 but not a
Keyword
 or
BooleanLiteral
 or
NullLiteral
Finally, a few nonterminal symbols are described by a descriptive phrase in
roman type in cases where it would be impractical to list all the alternatives:
RawInputCharacter
:
any Unicode character
10






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved