public class Grammar extends Object
| Constructor and Description |
|---|
Grammar(Reader reader)
constructs a Grammar from the data on reader.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
defines(String s)
returns true if symbol s is defined (a non-terminal) in the grammar
|
Vector |
getProductions(String LHS)
returns the definition of symbol LHS in the grammar, or
null if LHS is not defined in the grammar.
|
Vector |
getProductionsEndingIn(Object element)
returns a Vector of all productions whose last element is element.
|
public Grammar(Reader reader) throws IOException
IOExceptionpublic Vector getProductions(String LHS)
public Vector getProductionsEndingIn(Object element)
public boolean defines(String s)
Copyright © 2016 New York University. All rights reserved.