com.varankin.bnf
Class SyntaxRule

java.lang.Object
  extended by com.varankin.bnf.WrappedDefinitionsList
      extended by com.varankin.bnf.SyntaxRule

public final class SyntaxRule
extends WrappedDefinitionsList

A syntax-rule consists of a meta-identifier (the name of the non-terminal symbol being defined) followed by a defining-symbol followed by a definitions-list followed by a terminator-symbol.

Author:
© 2009 Nikolai Varankine

Field Summary
 MetaIdentifier id
          Name of non-terminal symbol.
 
Fields inherited from class com.varankin.bnf.WrappedDefinitionsList
list
 
Constructor Summary
SyntaxRule(MetaIdentifier aId, DefinitionsList aList)
           
 
Method Summary
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

public final MetaIdentifier id
Name of non-terminal symbol.

Constructor Detail

SyntaxRule

public SyntaxRule(MetaIdentifier aId,
                  DefinitionsList aList)
Parameters:
aId - name of non-terminal symbol identifying the rule.
aList - definitions list comprising the rule.
Throws:
java.lang.NullPointerException - if either meta identifier or definitions list is null.
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class WrappedDefinitionsList