com.inxar.syntacs.translator.regexp
Class Regexp
java.lang.Object
|
+--com.inxar.syntacs.translator.regexp.Regexp
- All Implemented Interfaces:
- Symbol
- public abstract class Regexp
- extends Object
- implements Symbol
Base class for all regular expressions in the
com.inxar.syntacs.translator.regexp
package used
during parsing. A Regexp
is notable for its ability
to be transformed into a
org.inxar.syntacs.grammar.regular.RegularExpression
,
which is the representation used by DFA
construction
algorithms.
EPSILON
public static final int EPSILON
ATOM
public static final int ATOM
CLOSURE
public static final int CLOSURE
PCLOSURE
public static final int PCLOSURE
OPTIONAL
public static final int OPTIONAL
GROUP
public static final int GROUP
CHARCLASS
public static final int CHARCLASS
CONCAT
public static final int CONCAT
UNION
public static final int UNION
RANGE
public static final int RANGE
getRegexpType
public int getRegexpType()
setRegexpType
public void setRegexpType(int regexpType)
getSymbolType
public int getSymbolType()
- Description copied from interface:
Symbol
- Returns the symbol type.
- Specified by:
getSymbolType
in interface Symbol
setSymbolType
public void setSymbolType(int symbolType)
- Description copied from interface:
Symbol
- Sets the symbol type. This method is necessary because the
design of the shift-reduce parser interacts with the symbol
such that it automatically sets the type of the symbol returned
to the parser after a reduction to the correct nonterminal
(such that the user doesn't have to worry about it).
- Specified by:
setSymbolType
in interface Symbol
toRegularExpression
public abstract RegularExpression toRegularExpression(RegularGrammar g)
toConcat
public static Regexp toConcat(String s)