recognizer
Class RecognizerTest
java.lang.Object
recognizer.RecognizerTest
public class RecognizerTest
- extends java.lang.Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
r0
Recognizer r0
r1
Recognizer r1
r2
Recognizer r2
r3
Recognizer r3
r4
Recognizer r4
r5
Recognizer r5
r6
Recognizer r6
r7
Recognizer r7
r8
Recognizer r8
r9
Recognizer r9
r10
Recognizer r10
r11
Recognizer r11
RecognizerTest
public RecognizerTest()
- Constructor for RecognizerTest.
setUp
public void setUp()
throws java.lang.Exception
- Throws:
java.lang.Exception
testRecognizer
public void testRecognizer()
testIsExpression
public void testIsExpression()
testIsTerm
public void testIsTerm()
testIsFactor
public void testIsFactor()
testIsAddOperator
public void testIsAddOperator()
testIsMultiplyOperator
public void testIsMultiplyOperator()
testIsVariable
public void testIsVariable()
testSymbol
public void testSymbol()
testNextTokenMatchesType
public void testNextTokenMatchesType()
testNextTokenMatchesTypeString
public void testNextTokenMatchesTypeString()
unconsumedTokensShouldBe
private void unconsumedTokensShouldBe(Recognizer recognizer,
java.lang.String expectedTokens)
- The isX Recognizer methods try to recognize an X at the beginning
of the input, but should not consume tokens after the X. For example,
a factor may contain multiplications but not additions, so given a
string such as "3*x+5*y", the isFactor method should consume and
accept the "3*x" but leave the "+5*y" for later.
This method tests the input string to see whether the correct tokens
are left unconsumed.
- Parameters:
recognizer - The Recognizer recently used to recognize some X from
an input string.expectedTokens - The Tokens that should remain in the input string
after the X has been consumed.