sjm.examples.minimath
Class MinimathParser
java.lang.Object
|
+--sjm.examples.minimath.MinimathParser
- public class MinimathParser
- extends java.lang.Object
Show a properly working utility class that provides an
parser for "Minimath", using the grammar:
e = Num m*;
m = '-' Num;
|
Method Summary |
static Parser |
e()
Return a parser that will recognize a Minimath
expression. |
protected static Parser |
m()
|
static void |
main(java.lang.String[] args)
Just a little demo. |
protected static Parser |
n()
|
static Parser |
start()
Returns a parser that will recognize a Minimath
expression. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
e
protected static Sequence e
MinimathParser
public MinimathParser()
e
public static Parser e()
- Return a parser that will recognize a Minimath
expression.
- Returns:
- a parser that will recognize a Minimath
expression
m
protected static Parser m()
main
public static void main(java.lang.String[] args)
- Just a little demo.
n
protected static Parser n()
start
public static Parser start()
- Returns a parser that will recognize a Minimath
expression.
- Returns:
- a parser that will recognize a Minimath
expression