public class MacroStmt extends ProofWorkStmt
Constructor and Description |
---|
MacroStmt(ProofWorksheet w)
Default Constructor.
|
MacroStmt(ProofWorksheet w,
java.lang.String name,
java.lang.String args)
Creates a MacroStmt using an input String.
|
Modifier and Type | Method and Description |
---|---|
int |
computeFieldIdCol(int fieldId)
Function used for cursor positioning.
|
java.lang.String |
load(java.lang.String firstToken)
Default load method for ProofWorkStmt that does not validate the input.
|
boolean |
stmtIsIncomplete()
Is statement incomplete?
|
void |
tmffReformat()
Reformats Derivation Step using TMFF.
|
appendToProofText, getLineCnt, getProofWorksheet, getStmtDiagnosticInfo, getStmtText, hasMatchingRefLabel, hasMatchingStepNbr, loadAllStmtTextGetNextStmt, loadStmtTextGetNextStmt, loadStmtTextGetOptionalToken, loadStmtTextGetRequiredToken, setStmtCursorToCurrLineColumn, updateLineCntUsingTokenizer
public MacroStmt(ProofWorksheet w)
w
- the owner ProofWorksheetpublic MacroStmt(ProofWorksheet w, java.lang.String name, java.lang.String args)
The input String is parsed into lines so that lineCnt can be incremented, and newline characters are re-inserted into the text.
The macro text is prefixed by "$m " on the first output line and " " on subsequent lines.
w
- the owner ProofWorksheetname
- The macro nameargs
- The string of macro arguments, with whitespace preservedpublic boolean stmtIsIncomplete()
ProofWorkStmt
-- used primarily for cursor positioning:
-- a virtual method that checks the statement for the state of "incompleteness" of data as indicated by state variables in the specific ProofWorkStmt types.
stmtIsIncomplete
in class ProofWorkStmt
public int computeFieldIdCol(int fieldId)
computeFieldIdCol
in class ProofWorkStmt
fieldId
- value identify ProofWorkStmt field for cursor positioning,
as defined in PaConstants.FIELD_ID_*.public void tmffReformat()
tmffReformat
in class ProofWorkStmt
public java.lang.String load(java.lang.String firstToken) throws java.io.IOException, MMIOException, ProofAsstException
ProofWorkStmt
This is used for GeneratedProofStmt and CommentStmt -- and any other possible future statement where you, theoretically, want to be able to parse and load the input statement but don't care about the contents.
Output/Updates
load
in class ProofWorkStmt
firstToken
- the first tokenjava.io.IOException
- if IO errorMMIOException
- if an error occurredProofAsstException
- if an error occurred