public class Ebnf extends Action
Translate regular expressions to context free grammars.
Note: The Grammar start symbol is always expandable (i.e.: it is never used at the right-hand-side). Recursion usually expands the right-hand-side symbol.
| Constructor and Description |
|---|
Ebnf(int helper) |
| Modifier and Type | Method and Description |
|---|---|
Object |
choice(Object[] body) |
int |
getHelper() |
Object |
loop(Object rawBody) |
Object |
range(char first,
char last) |
Object |
sequence(Object[] body) |
Object |
symbol(int symbol) |
static Grammar |
translate(Rule[] rules,
StringArrayList symbolTable)
helper symbols are added without gaps, starting with freeHelper.
|
Object |
without(Object left,
Object right) |
public static Grammar translate(Rule[] rules, StringArrayList symbolTable) throws ActionException
ActionExceptionpublic int getHelper()
public Object range(char first, char last) throws ActionException
range in class ActionActionExceptionpublic Object without(Object left, Object right) throws ActionException
without in class ActionActionExceptionCopyright © 1998–2017 1&1. All rights reserved.