org.activemath.exercises.parsers
Class CasParserAxiom
java.lang.Object
org.activemath.exercises.openmath.OpenMath
org.activemath.exercises.CasParser
org.activemath.exercises.parsers.CasParserAxiom
- All Implemented Interfaces:
- CasParserAxiomConstants
public class CasParserAxiom
- extends CasParser
- implements CasParserAxiomConstants
CAS parser for Axiom syntax.
- Version:
- $Revision: 1.37 $ $Date: 2012/04/24 12:30:16 $
| Fields inherited from interface org.activemath.exercises.parsers.CasParserAxiomConstants |
APPLICATION, DEFAULT, DIGIT, DOUBLE, EOF, EOL, INTEGER, STRING, SYMBOL, tokenImage, VARIABLE |
| Methods inherited from class org.activemath.exercises.CasParser |
console, linearToOpenMath, linearToOpenMath, newCasParser, newCasParser, newCasParser, newCasParser, newCasParser, newCasParser, nextOmobj, parseForeign, symbol, symbolUnary |
| Methods inherited from class org.activemath.exercises.openmath.OpenMath |
applyBinding, getOmobjContents, oma, oma, oma, oma, oma, ombind, ombind, ombind, ombind, ombind, ombvar, ombvar, ombvar, ombvar, ome, ome, ome, ome, omf, omf, omi, omi, omobj, oms, omstr, omv, output, setOmNamespace, substituteVariables, tidyForOpenMath1, toDouble, toInt |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
token_source
public CasParserAxiomTokenManager token_source
token
public Token token
jj_nt
public Token jj_nt
lookingAhead
public boolean lookingAhead
CasParserAxiom
public CasParserAxiom(InputStream stream)
CasParserAxiom
public CasParserAxiom(Reader stream)
CasParserAxiom
public CasParserAxiom(CasParserAxiomTokenManager tm)
main
public static void main(String[] args)
advanceToNextEOL
public void advanceToNextEOL()
- Description copied from class:
CasParser
- Advance to next End Of Line (EOL) or end of input.
Is overriden by the subclasses that implement the actual parser.
- Overrides:
advanceToNextEOL in class CasParser
nextLine
public final org.jdom.Element nextLine()
throws ParseException
- Description copied from class:
CasParser
- Entry point for the recursive descendant parser.
Is overriden by the subclasses that implement the actual parser.
This function is to be used only if you want to handle the
ParseException and TokenMgrError objects yourself. Normally it's better
to call nextOmobj() that encapsulates all this and returns always an
OMOBJ, which contains an OME (OM error) when there is some parsing
error.
- Overrides:
nextLine in class CasParser
- Returns:
- OpenMath object encoded as a JDOM tree.
- Throws:
ParseException - Problem when parsing.
expr
public final org.jdom.Element expr()
throws ParseException
- Throws:
ParseException
exprPrec1
public final org.jdom.Element exprPrec1()
throws ParseException
- Throws:
ParseException
exprPrec2
public final org.jdom.Element exprPrec2()
throws ParseException
- Throws:
ParseException
exprPrec3
public final org.jdom.Element exprPrec3()
throws ParseException
- Throws:
ParseException
argumentList
public final List argumentList()
throws ParseException
- Throws:
ParseException
unary
public final org.jdom.Element unary()
throws ParseException
- Throws:
ParseException
element
public final org.jdom.Element element()
throws ParseException
- Throws:
ParseException
ReInit
public void ReInit(InputStream stream)
ReInit
public void ReInit(Reader stream)
ReInit
public void ReInit(CasParserAxiomTokenManager tm)
getNextToken
public final Token getNextToken()
getToken
public final Token getToken(int index)
generateParseException
public ParseException generateParseException()
enable_tracing
public final void enable_tracing()
disable_tracing
public final void disable_tracing()