|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgrammar.ProductionChecker
public class ProductionChecker
Production checker
| Field Summary | |
|---|---|
static java.lang.String |
delimiter
Delimiter between left hand side and right hand side. |
| Constructor Summary | |
|---|---|
ProductionChecker()
Creates an instance of production checker |
|
| Method Summary | |
|---|---|
static boolean |
isProduction(java.lang.String production)
Checks whether a given production is invalid. |
static boolean |
isProductionLHS(java.lang.String lhs)
Checks whether the left hand side of a given production is invalid. |
static boolean |
isTerminal(java.lang.String token)
Returns true if a given token is a terminal. |
static boolean |
isTerminalProduction(Production production)
Returns true if a given production is a terminal production, whose RHS has no variables. |
static boolean |
isVariable(java.lang.String token)
Returns true if a given token is a variable. |
static boolean |
isVariableProduction(Production production)
Returns true if a given production is a variable production, whose RHS has at least one variable. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String delimiter
| Constructor Detail |
|---|
public ProductionChecker()
| Method Detail |
|---|
public static boolean isVariable(java.lang.String token)
token - the given token
public static boolean isTerminal(java.lang.String token)
token - the given token.
public static boolean isVariableProduction(Production production)
public static boolean isTerminalProduction(Production production)
public static boolean isProduction(java.lang.String production)
production - the given production
public static boolean isProductionLHS(java.lang.String lhs)
lhs - the left hand side of a given production
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||