Parser implemented by recursive descending method. More...
#include <parser.h>
Classes | |
struct | CurveParam |
Public Member Functions | |
Parser (Editor *editor, bool canChangeEditor=true) | |
~Parser () | |
QString | getReport () const |
bool | run (const QString &filename, QList< State * > &stateList, QRect &gridRect) |
Static Public Member Functions | |
static bool | checkNameCorrectness (const QString &name, QString *error) |
Protected Member Functions | |
bool | Arc (bool &small) |
void | checkTrParam (Transition *tr) |
void | ChgParam () |
QString | Color () |
int | Dir (bool &isParam) |
int | DirParam (bool &isParam) |
bool | Edge () |
bool | Element () |
void | EndTransitionDeclaration (const QString &typeName, bool left, float pos, bool isPosParam) |
void | errorReportUTOKEN () |
void | File () |
Qt::BrushStyle | FillStatus () |
bool | kwTest (VaucansonKeywords::Token token) |
void | Label_r () |
Qt::PenStyle | LineStyle () |
int | Loop () |
void | matching (VaucansonKeywords::Token token, bool end=false) |
void | Name () |
void | NameAllowedToken () |
void | NameNextPart () |
void | NextLabel () |
bool | NoBracesToken () |
bool | NoBracketsToken () |
int | Numb () |
float | Number () |
float | NumberNextPart () |
void | OneStateTransition () |
float | Pos (bool &isParam) |
float | PosParam (bool &isParam) |
void | Predeclaration () |
void | resetParams () |
void | resetStateParams () |
void | resetTrParams () |
bool | Sign () |
void | State_r () |
void | StateDeclaration (const QString &typeName) |
void | StateLabel () |
void | Switch () |
void | Transition_r () |
void | TransitionLabel () |
void | TwoStateTransition () |
bool | VArc () |
void | VArcParam () |
void | VArcParamIdent () |
void | VArcParamNext () |
void | VCPicture () |
void | VCPut () |
bool | VCurve () |
void | VCurveParam () |
void | VCurveParamIdent () |
void | VCurveParamNext () |
Protected Attributes | |
struct Parser::CurveParam | cParam |
bool | dimEdge |
QString | dimEdgeLabelColor |
float | dimEdgeLineCoef |
QString | dimEdgeLineColor |
Qt::PenStyle | dimEdgeLineStyle |
bool | dimState |
QString | dimStateFillColor |
QString | dimStateLabelColor |
float | dimStateLineCoef |
QString | dimStateLineColor |
Qt::PenStyle | dimStateLineStyle |
bool | edgeBorder |
QString | edgeLabelColor |
float | edgeLabelScale |
float | edgeLineBorderCoef |
QString | edgeLineBorderColor |
QString | edgeLineColor |
float | edgeLineDblCoef |
float | edgeLineDblSep |
bool | edgeLineDblStatus |
Qt::PenStyle | edgeLineStyle |
float | edgeLineWidth |
Editor * | editor |
int | err_count |
Transition * | lastTr |
LexAn * | lexan |
bool | loaded |
bool | m_canChangeEditor |
QRect | m_gridRect |
QMap< QString, State * > | m_stateMap |
QString | param |
QStringList | report |
QString | stateFillColor |
Qt::BrushStyle | stateFillStatus |
QString | stateLabelColor |
float | stateLabelScale |
QString | stateLineColor |
bool | stateLineDouble |
float | stateLineDoubleCoef |
float | stateLineDoubleSep |
Qt::PenStyle | stateLineStyle |
float | stateLineWidth |
bool | varLoop |
int | war_count |
Parser implemented by recursive descending method.
Definition at line 112 of file parser.h.
Parser::Parser | ( | Editor * | editor, | |
bool | canChangeEditor = true | |||
) |
Definition at line 445 of file parser.cpp.
References IF_CAN_CHANGE_EDITOR, resetParams(), Editor::showChanged(), Editor::showFrame, and Editor::showGrid.
Parser::~Parser | ( | ) |
Definition at line 498 of file parser.cpp.
References lexan.
bool Parser::Arc | ( | bool & | small | ) | [protected] |
Definition at line 1787 of file parser.cpp.
References LexAn::getToken(), VaucansonKeywords::kwArcL, VaucansonKeywords::kwArcR, VaucansonKeywords::kwLArcL, VaucansonKeywords::kwLArcR, lexan, and matching().
Referenced by TwoStateTransition().
bool Parser::checkNameCorrectness | ( | const QString & | name, | |
QString * | error | |||
) | [static] |
Returns true if name is in correct form, otherwise returns false
error | - sets error string if not NULL |
Definition at line 568 of file parser.cpp.
Referenced by NameAcceptDialog::myAccept(), and Name().
void Parser::checkTrParam | ( | Transition * | tr | ) | [protected] |
Definition at line 517 of file parser.cpp.
References Transition::adjust(), DEF_DIM_COLOR, DEF_DIM_EDGE_LINE_COEF, DEF_DIM_LINE_STYLE, DEF_EDGE_LINE_BORDER_COEF, DEF_EDGE_LINE_BORDER_COLOR, DEF_EDGE_LINE_DBL_COEF, DEF_EDGE_LINE_DBL_SEP, Transition::dimEdgeLabelColor, dimEdgeLabelColor, dimEdgeLineCoef, Transition::dimEdgeLineColor, dimEdgeLineColor, Transition::dimEdgeLineStyle, dimEdgeLineStyle, Transition::edgeLabelColor, Editor::edgeLabelColor, edgeLabelColor, edgeLabelScale, Transition::edgeLineBorderCoef, edgeLineBorderCoef, Transition::edgeLineBorderColor, edgeLineBorderColor, Transition::edgeLineColor, Editor::edgeLineColor, edgeLineColor, Transition::edgeLineDblCoef, edgeLineDblCoef, Transition::edgeLineDblSep, edgeLineDblSep, Transition::edgeLineDblStatus, Editor::edgeLineDblStatus, edgeLineDblStatus, Transition::edgeLineStyle, Editor::edgeLineStyle, edgeLineStyle, edgeLineWidth, Transition::setDimEdgeLineCoef(), Transition::setEdgeLabelScale(), and Transition::setEdgeLineWidth().
Referenced by EndTransitionDeclaration(), and OneStateTransition().
void Parser::ChgParam | ( | ) | [protected] |
Definition at line 928 of file parser.cpp.
References VaucansonKeywords::chgEdgeLabelColor, VaucansonKeywords::chgEdgeLabelScale, VaucansonKeywords::chgEdgeLineColor, VaucansonKeywords::chgEdgeLineStyle, VaucansonKeywords::chgEdgeLineWidth, VaucansonKeywords::chgStateFillColor, VaucansonKeywords::chgStateFillStatus, VaucansonKeywords::chgStateLabelColor, VaucansonKeywords::chgStateLabelScale, VaucansonKeywords::chgStateLineColor, VaucansonKeywords::chgStateLineStyle, VaucansonKeywords::chgStateLineWidth, Color(), DBGLOG_PAR, dimEdgeLabelColor, dimEdgeLineCoef, dimEdgeLineColor, dimEdgeLineStyle, dimStateFillColor, dimStateLabelColor, dimStateLineCoef, dimStateLineColor, dimStateLineStyle, Editor::edgeLabelColor, edgeLabelColor, Editor::edgeLabelScale, edgeLabelScale, edgeLineBorderCoef, edgeLineBorderColor, Editor::edgeLineColor, edgeLineColor, edgeLineDblCoef, edgeLineDblSep, Editor::edgeLineStyle, edgeLineStyle, Editor::edgeLineWidth, edgeLineWidth, FillStatus(), VaucansonKeywords::fixDimEdge, VaucansonKeywords::fixDimState, VaucansonKeywords::fixEdgeBorder, VaucansonKeywords::fixEdgeLineDouble, VaucansonKeywords::fixStateLineDouble, LexAn::getLineNumber(), LexAn::getToken(), LexAn::getTokenData(), VaucansonKeywords::IDENT, IF_CAN_CHANGE_EDITOR, VaucansonKeywords::LBRACE, lexan, LineStyle(), matching(), Number(), VaucansonKeywords::RBRACE, report, VaucansonKeywords::rstEdgeLabelColor, VaucansonKeywords::rstEdgeLabelScale, VaucansonKeywords::rstEdgeLineColor, VaucansonKeywords::rstEdgeLineStyle, VaucansonKeywords::rstEdgeLineWidth, VaucansonKeywords::rstStateFillColor, VaucansonKeywords::rstStateFillStatus, VaucansonKeywords::rstStateLabelColor, VaucansonKeywords::rstStateLabelScale, VaucansonKeywords::rstStateLineColor, VaucansonKeywords::rstStateLineStyle, VaucansonKeywords::rstStateLineWidth, VaucansonKeywords::setEdgeLabelColor, VaucansonKeywords::setEdgeLabelScale, VaucansonKeywords::setEdgeLineColor, VaucansonKeywords::setEdgeLineStyle, VaucansonKeywords::setEdgeLineWidth, VaucansonKeywords::setStateFillColor, VaucansonKeywords::setStateFillStatus, VaucansonKeywords::setStateLabelColor, VaucansonKeywords::setStateLabelScale, VaucansonKeywords::setStateLineColor, VaucansonKeywords::setStateLineStyle, VaucansonKeywords::setStateLineWidth, Editor::stateFillColor, stateFillColor, Editor::stateFillStatus, stateFillStatus, Editor::stateLabelColor, stateLabelColor, Editor::stateLabelScale, stateLabelScale, Editor::stateLineColor, stateLineColor, stateLineDoubleCoef, stateLineDoubleSep, Editor::stateLineStyle, stateLineStyle, stateLineWidth, Editor::stateLineWidth, and war_count.
Referenced by Element(), and Predeclaration().
QString Parser::Color | ( | ) | [protected] |
Definition at line 1345 of file parser.cpp.
References errorReportUTOKEN(), LexAn::getToken(), LexAn::getTokenData(), VaucansonKeywords::IDENT, lexan, and matching().
Referenced by ChgParam().
int Parser::Dir | ( | bool & | isParam | ) | [protected] |
Definition at line 2034 of file parser.cpp.
References errorReportUTOKEN(), LexAn::getToken(), LexAn::getTokenData(), VaucansonKeywords::IDENT, lexan, and matching().
Referenced by DirParam().
int Parser::DirParam | ( | bool & | isParam | ) | [protected] |
Definition at line 2020 of file parser.cpp.
References Dir(), LexAn::getToken(), VaucansonKeywords::LBRACKET, lexan, matching(), and VaucansonKeywords::RBRACKET.
Referenced by OneStateTransition().
bool Parser::Edge | ( | ) | [protected] |
Definition at line 1777 of file parser.cpp.
References LexAn::getToken(), VaucansonKeywords::kwEdgeL, VaucansonKeywords::kwEdgeR, lexan, and matching().
Referenced by TwoStateTransition().
bool Parser::Element | ( | ) | [protected] |
Definition at line 780 of file parser.cpp.
References ChgParam(), VaucansonKeywords::COMMENT, DBGLOG_PAR, VaucansonKeywords::EOI, err_count, errorReportUTOKEN(), LexAn::getLineNumber(), LexAn::getToken(), VaucansonKeywords::kwArcL, VaucansonKeywords::kwArcR, VaucansonKeywords::kwCLoopE, VaucansonKeywords::kwCLoopN, VaucansonKeywords::kwCLoopNE, VaucansonKeywords::kwCLoopNW, VaucansonKeywords::kwCLoopS, VaucansonKeywords::kwCLoopSE, VaucansonKeywords::kwCLoopSW, VaucansonKeywords::kwCLoopW, VaucansonKeywords::kwDimEdge, VaucansonKeywords::kwDimState, VaucansonKeywords::kwEdgeBorder, VaucansonKeywords::kwEdgeBorderOff, VaucansonKeywords::kwEdgeL, VaucansonKeywords::kwEdgeLineDouble, VaucansonKeywords::kwEdgeLineSimple, VaucansonKeywords::kwEdgeR, VaucansonKeywords::kwEnd, VaucansonKeywords::kwFinal, VaucansonKeywords::kwFinalState, VaucansonKeywords::kwFinalStateVar, VaucansonKeywords::kwInitial, VaucansonKeywords::kwLabelL, VaucansonKeywords::kwLabelR, VaucansonKeywords::kwLArcL, VaucansonKeywords::kwLArcR, VaucansonKeywords::kwLoopE, VaucansonKeywords::kwLoopN, VaucansonKeywords::kwLoopNE, VaucansonKeywords::kwLoopNW, VaucansonKeywords::kwLoopS, VaucansonKeywords::kwLoopSE, VaucansonKeywords::kwLoopSW, VaucansonKeywords::kwLoopVarN, VaucansonKeywords::kwLoopVarS, VaucansonKeywords::kwLoopW, VaucansonKeywords::kwRstEdge, VaucansonKeywords::kwRstState, VaucansonKeywords::kwState, VaucansonKeywords::kwStateLineDouble, VaucansonKeywords::kwStateLineSimple, VaucansonKeywords::kwStateVar, kwTest(), VaucansonKeywords::kwVArcL, VaucansonKeywords::kwVArcR, VaucansonKeywords::kwVarLoopOff, VaucansonKeywords::kwVarLoopOn, VaucansonKeywords::kwVCPut, VaucansonKeywords::kwVCurveL, VaucansonKeywords::kwVCurveR, Label_r(), lexan, matching(), NO_STATE, LexAn::readToken(), report, STATE_EXIST, State_r(), Switch(), Transition_r(), U_TOKEN, VCPut(), and war_count.
Referenced by VCPicture().
void Parser::EndTransitionDeclaration | ( | const QString & | typeName, | |
bool | left, | |||
float | pos, | |||
bool | isPosParam | |||
) | [protected] |
Definition at line 1919 of file parser.cpp.
References Parser::CurveParam::angleA, Parser::CurveParam::angleB, Transition::assign(), checkTrParam(), cParam, TransitionManager::createTwoStatesTransition(), DBGLOG_PAR, DBGPAR, DEF_ARC_ANGLE, dimEdge, err_count, TransitionManager::getInstance(), LexAn::getLineNumber(), Parser::CurveParam::isAngleA, Parser::CurveParam::isAngleB, Parser::CurveParam::isNCurv, lastTr, VaucansonKeywords::LBRACE, lexan, m_stateMap, matching(), Name(), Parser::CurveParam::ncurv, param, VaucansonKeywords::RBRACE, RELLOG, report, Transition::setArcAngle(), Transition::setArcAngleB(), Transition::setLabelPos(), Transition::setNCurv(), and TransitionLabel().
Referenced by TwoStateTransition().
void Parser::errorReportUTOKEN | ( | ) | [inline, protected] |
Definition at line 257 of file parser.h.
References err_count, LexAn::getLineNumber(), LexAn::getTokenData(), lexan, and report.
Referenced by Color(), Dir(), Element(), FillStatus(), LineStyle(), matching(), NameAllowedToken(), NoBracesToken(), NoBracketsToken(), State_r(), StateDeclaration(), VArcParamIdent(), VCPicture(), and VCurveParamIdent().
void Parser::File | ( | ) | [protected] |
Definition at line 642 of file parser.cpp.
References DBGLOG_PAR, Predeclaration(), and VCPicture().
Referenced by run().
Qt::BrushStyle Parser::FillStatus | ( | ) | [protected] |
Definition at line 1286 of file parser.cpp.
References errorReportUTOKEN(), LexAn::getLineNumber(), LexAn::getToken(), LexAn::getTokenData(), VaucansonKeywords::IDENT, lexan, matching(), report, and war_count.
Referenced by ChgParam().
QString Parser::getReport | ( | ) | const [inline] |
Definition at line 122 of file parser.h.
References report.
Referenced by Editor::loadAutomata(), and Editor::openFile().
bool Parser::kwTest | ( | VaucansonKeywords::Token | token | ) | [protected] |
Definition at line 539 of file parser.cpp.
References VaucansonKeywords::eFirstKw, and VaucansonKeywords::eLastKw.
Referenced by Element(), and Predeclaration().
void Parser::Label_r | ( | ) | [protected] |
Definition at line 1500 of file parser.cpp.
References Transition::addNextLabel(), DBGLOG_PAR, err_count, Transition::getLabelColor(), LexAn::getLineNumber(), LexAn::getToken(), VaucansonKeywords::kwLabelL, VaucansonKeywords::kwLabelR, lastTr, lexan, Transition::m_labelFontSize, matching(), param, PosParam(), VaucansonKeywords::RBRACE, RELLOG, report, Transition::setLabelPosition(), and TransitionLabel().
Referenced by Element().
Qt::PenStyle Parser::LineStyle | ( | ) | [protected] |
Definition at line 1317 of file parser.cpp.
References errorReportUTOKEN(), LexAn::getLineNumber(), LexAn::getToken(), LexAn::getTokenData(), VaucansonKeywords::IDENT, lexan, matching(), report, and war_count.
Referenced by ChgParam().
int Parser::Loop | ( | ) | [protected] |
Definition at line 1665 of file parser.cpp.
References EAST, LexAn::getToken(), VaucansonKeywords::kwCLoopE, VaucansonKeywords::kwCLoopN, VaucansonKeywords::kwCLoopNE, VaucansonKeywords::kwCLoopNW, VaucansonKeywords::kwCLoopS, VaucansonKeywords::kwCLoopSE, VaucansonKeywords::kwCLoopSW, VaucansonKeywords::kwCLoopW, VaucansonKeywords::kwLoopE, VaucansonKeywords::kwLoopN, VaucansonKeywords::kwLoopNE, VaucansonKeywords::kwLoopNW, VaucansonKeywords::kwLoopS, VaucansonKeywords::kwLoopSE, VaucansonKeywords::kwLoopSW, VaucansonKeywords::kwLoopVarN, VaucansonKeywords::kwLoopVarS, VaucansonKeywords::kwLoopW, lexan, matching(), NORTH, NORTH_EAST, NORTH_WEST, SOUTH, SOUTH_EAST, SOUTH_WEST, trCLoopDirection(), trLoopVarDirection(), and WEST.
Referenced by OneStateTransition().
void Parser::matching | ( | VaucansonKeywords::Token | token, | |
bool | end = false | |||
) | [protected] |
Definition at line 503 of file parser.cpp.
References DBGLOG_PAR, VaucansonKeywords::EOI, errorReportUTOKEN(), LexAn::getToken(), lexan, and LexAn::readToken().
Referenced by Arc(), ChgParam(), Color(), Dir(), DirParam(), Edge(), Element(), EndTransitionDeclaration(), FillStatus(), Label_r(), LineStyle(), Loop(), NameAllowedToken(), NoBracesToken(), NoBracketsToken(), Numb(), NumberNextPart(), OneStateTransition(), PosParam(), Sign(), State_r(), StateDeclaration(), Switch(), TwoStateTransition(), VArc(), VArcParamIdent(), VArcParamNext(), VCPicture(), VCPut(), VCurve(), VCurveParamIdent(), and VCurveParamNext().
void Parser::Name | ( | ) | [protected] |
Definition at line 2136 of file parser.cpp.
References checkNameCorrectness(), err_count, LexAn::getLineNumber(), lexan, NoBracesToken(), param, and report.
Referenced by EndTransitionDeclaration(), OneStateTransition(), and StateDeclaration().
void Parser::NameAllowedToken | ( | ) | [protected] |
Definition at line 2165 of file parser.cpp.
References VaucansonKeywords::DOT, errorReportUTOKEN(), VaucansonKeywords::FLOAT, LexAn::getToken(), LexAn::getTokenData(), VaucansonKeywords::IDENT, lexan, matching(), VaucansonKeywords::NUMB, and param.
Referenced by NameNextPart().
void Parser::NameNextPart | ( | ) | [protected] |
Definition at line 2154 of file parser.cpp.
References LexAn::getToken(), lexan, and NameAllowedToken().
void Parser::NextLabel | ( | ) | [protected] |
bool Parser::NoBracesToken | ( | ) | [protected] |
Definition at line 2189 of file parser.cpp.
References VaucansonKeywords::COMMA, DBGLOG_PAR, VaucansonKeywords::DOT, VaucansonKeywords::EQUAL, errorReportUTOKEN(), VaucansonKeywords::FLOAT, LexAn::getToken(), LexAn::getTokenData(), VaucansonKeywords::IDENT, VaucansonKeywords::LBRACE, VaucansonKeywords::LBRACKET, lexan, VaucansonKeywords::LPAR, matching(), VaucansonKeywords::MINUS, VaucansonKeywords::NUMB, VaucansonKeywords::OTHER, param, VaucansonKeywords::RBRACE, VaucansonKeywords::RBRACKET, VaucansonKeywords::RPAR, VaucansonKeywords::SPECIAL, and VaucansonKeywords::UNDERLINE.
Referenced by Name().
bool Parser::NoBracketsToken | ( | ) | [protected] |
Definition at line 2279 of file parser.cpp.
References VaucansonKeywords::COMMA, DBGLOG_PAR, VaucansonKeywords::DOT, VaucansonKeywords::EQUAL, errorReportUTOKEN(), VaucansonKeywords::FLOAT, LexAn::getToken(), LexAn::getTokenData(), VaucansonKeywords::IDENT, VaucansonKeywords::LBRACE, VaucansonKeywords::LBRACKET, lexan, VaucansonKeywords::LPAR, matching(), VaucansonKeywords::MINUS, VaucansonKeywords::NUMB, VaucansonKeywords::OTHER, param, VaucansonKeywords::RBRACE, VaucansonKeywords::RBRACKET, VaucansonKeywords::RPAR, VaucansonKeywords::SPECIAL, and VaucansonKeywords::UNDERLINE.
int Parser::Numb | ( | ) | [protected] |
Definition at line 2107 of file parser.cpp.
References DBGLOG_PAR, LexAn::getLineNumber(), LexAn::getToken(), LexAn::getTokenData(), VaucansonKeywords::IDENT, lexan, matching(), VaucansonKeywords::NUMB, LexAn::readToken(), report, Sign(), and war_count.
Referenced by VArcParamIdent(), VCPicture(), and VCurveParamIdent().
float Parser::Number | ( | ) | [protected] |
Definition at line 2076 of file parser.cpp.
References DBGLOG_PAR, NumberNextPart(), and Sign().
Referenced by ChgParam(), Pos(), StateDeclaration(), VArcParamIdent(), VCPut(), and VCurveParamIdent().
float Parser::NumberNextPart | ( | ) | [protected] |
Definition at line 2083 of file parser.cpp.
References VaucansonKeywords::FLOAT, LexAn::getLineNumber(), LexAn::getToken(), LexAn::getTokenData(), lexan, matching(), VaucansonKeywords::NUMB, report, and war_count.
Referenced by Number().
void Parser::OneStateTransition | ( | ) | [protected] |
Definition at line 1541 of file parser.cpp.
References Transition::assign(), checkTrParam(), TransitionManager::createOneStateTransition(), DBGLOG_PAR, DBGPAR, dimEdge, DirParam(), err_count, TransitionManager::getInstance(), LexAn::getLineNumber(), LexAn::getToken(), LexAn::getTokenData(), VaucansonKeywords::kwFinal, VaucansonKeywords::kwInitial, lastTr, VaucansonKeywords::LBRACE, lexan, Loop(), m_stateMap, matching(), Name(), param, PosParam(), VaucansonKeywords::RBRACE, RELLOG, report, Transition::setLabelPos(), TransitionLabel(), trLoopDirection(), varLoop, and war_count.
Referenced by Transition_r().
float Parser::Pos | ( | bool & | isParam | ) | [protected] |
Definition at line 2001 of file parser.cpp.
References VaucansonKeywords::FLOAT, LexAn::getToken(), lexan, VaucansonKeywords::MINUS, VaucansonKeywords::NUMB, Number(), and VaucansonKeywords::RBRACKET.
Referenced by PosParam().
float Parser::PosParam | ( | bool & | isParam | ) | [protected] |
Definition at line 1987 of file parser.cpp.
References LexAn::getToken(), VaucansonKeywords::LBRACKET, lexan, matching(), Pos(), and VaucansonKeywords::RBRACKET.
Referenced by Label_r(), OneStateTransition(), and TwoStateTransition().
void Parser::Predeclaration | ( | ) | [protected] |
Definition at line 649 of file parser.cpp.
References Editor::addition, ChgParam(), VaucansonKeywords::EOI, LexAn::getToken(), IF_CAN_CHANGE_EDITOR, VaucansonKeywords::kwBeginVCPicture, VaucansonKeywords::kwHideFrame, VaucansonKeywords::kwHideGrid, VaucansonKeywords::kwShowFrame, VaucansonKeywords::kwShowGrid, kwTest(), lexan, LexAn::readToken(), Editor::showChanged(), Editor::showFrame, Editor::showGrid, and U_TOKEN.
Referenced by File().
void Parser::resetParams | ( | ) | [protected] |
Definition at line 460 of file parser.cpp.
References dimEdgeLabelColor, dimEdgeLineCoef, dimEdgeLineColor, dimEdgeLineStyle, dimStateFillColor, dimStateLabelColor, dimStateLineCoef, dimStateLineColor, dimStateLineStyle, edgeLabelColor, edgeLabelScale, edgeLineBorderCoef, edgeLineBorderColor, edgeLineColor, edgeLineDblCoef, edgeLineDblSep, edgeLineDblStatus, edgeLineStyle, edgeLineWidth, stateFillColor, stateFillStatus, stateLabelColor, stateLabelScale, stateLineColor, stateLineDoubleCoef, stateLineDoubleSep, stateLineStyle, and stateLineWidth.
Referenced by Parser().
void Parser::resetStateParams | ( | ) | [protected] |
Definition at line 544 of file parser.cpp.
References stateFillColor, stateFillStatus, stateLabelColor, stateLabelScale, stateLineColor, stateLineStyle, and stateLineWidth.
Referenced by Switch().
void Parser::resetTrParams | ( | ) | [protected] |
Definition at line 554 of file parser.cpp.
References edgeLabelColor, edgeLabelScale, edgeLineColor, edgeLineDblStatus, edgeLineStyle, and edgeLineWidth.
Referenced by Switch().
bool Parser::run | ( | const QString & | filename, | |
QList< State * > & | stateList, | |||
QRect & | gridRect | |||
) |
fill created states (with assigned transitions) -> editor will add it all to scene or do with it something other
Definition at line 584 of file parser.cpp.
References BAD_GRID, err_count, File(), LexAn::getLineNumber(), lexan, m_gridRect, m_stateMap, LexAn::openFile(), LexAn::readToken(), report, U_EOI, U_TOKEN, and war_count.
Referenced by Editor::loadAutomata(), and Editor::openFile().
bool Parser::Sign | ( | ) | [protected] |
Definition at line 2127 of file parser.cpp.
References LexAn::getToken(), lexan, matching(), and VaucansonKeywords::MINUS.
Referenced by Numb(), and Number().
void Parser::State_r | ( | ) | [protected] |
Definition at line 1357 of file parser.cpp.
References errorReportUTOKEN(), LexAn::getToken(), LexAn::getTokenData(), VaucansonKeywords::kwFinalState, VaucansonKeywords::kwFinalStateVar, VaucansonKeywords::kwState, VaucansonKeywords::kwStateVar, lexan, matching(), param, and StateDeclaration().
Referenced by Element().
void Parser::StateDeclaration | ( | const QString & | typeName | ) | [protected] |
Definition at line 1384 of file parser.cpp.
References VaucansonKeywords::COMMA, StateManager::createState(), DBGLOG_PAR, DBGPAR, DEF_DIM_COLOR, DEF_DIM_FILL_COLOR, DEF_DIM_LINE_STYLE, DEF_DIM_STATE_LINE_COEF, DEF_STATE_LINE_DBL_COEF, DEF_STATE_LINE_DBL_SEP, dimState, State::dimStateFillColor, dimStateFillColor, State::dimStateLabelColor, dimStateLabelColor, dimStateLineCoef, State::dimStateLineColor, dimStateLineColor, State::dimStateLineStyle, dimStateLineStyle, err_count, errorReportUTOKEN(), StateManager::getInstance(), LexAn::getLineNumber(), LexAn::getToken(), VaucansonKeywords::LBRACE, VaucansonKeywords::LBRACKET, lexan, VaucansonKeywords::LPAR, m_stateMap, matching(), Name(), Number(), param, VaucansonKeywords::RBRACE, VaucansonKeywords::RBRACKET, RELLOG, report, VaucansonKeywords::RPAR, State::setDimStateLineCoef(), State::setStateLabelScale(), State::setStateLineDoubleCoef(), State::setStateLineDoubleSep(), State::setStateLineWidth(), State::stateFillColor, Editor::stateFillColor, stateFillColor, State::stateFillStatus, Editor::stateFillStatus, stateFillStatus, StateLabel(), State::stateLabelColor, Editor::stateLabelColor, stateLabelColor, stateLabelScale, State::stateLineColor, Editor::stateLineColor, stateLineColor, stateLineDouble, stateLineDoubleCoef, stateLineDoubleSep, State::stateLineStyle, Editor::stateLineStyle, stateLineStyle, stateLineWidth, and Editor::toScenePos().
Referenced by State_r().
void Parser::StateLabel | ( | ) | [protected] |
Definition at line 1466 of file parser.cpp.
References lexan, param, and LexAn::readStringBetween().
Referenced by StateDeclaration().
void Parser::Switch | ( | ) | [protected] |
Definition at line 890 of file parser.cpp.
References dimEdge, dimState, edgeBorder, edgeLineDblStatus, err_count, LexAn::getLineNumber(), LexAn::getToken(), LexAn::getTokenData(), VaucansonKeywords::kwDimEdge, VaucansonKeywords::kwDimState, VaucansonKeywords::kwEdgeBorder, VaucansonKeywords::kwEdgeBorderOff, VaucansonKeywords::kwEdgeLineDouble, VaucansonKeywords::kwEdgeLineSimple, VaucansonKeywords::kwRstEdge, VaucansonKeywords::kwRstState, VaucansonKeywords::kwStateLineDouble, VaucansonKeywords::kwStateLineSimple, VaucansonKeywords::kwVarLoopOff, VaucansonKeywords::kwVarLoopOn, lexan, matching(), report, resetStateParams(), resetTrParams(), stateLineDouble, and varLoop.
Referenced by Element().
void Parser::Transition_r | ( | ) | [protected] |
Definition at line 1471 of file parser.cpp.
References LexAn::getToken(), VaucansonKeywords::kwCLoopE, VaucansonKeywords::kwCLoopN, VaucansonKeywords::kwCLoopNE, VaucansonKeywords::kwCLoopNW, VaucansonKeywords::kwCLoopS, VaucansonKeywords::kwCLoopSE, VaucansonKeywords::kwCLoopSW, VaucansonKeywords::kwCLoopW, VaucansonKeywords::kwFinal, VaucansonKeywords::kwInitial, VaucansonKeywords::kwLoopE, VaucansonKeywords::kwLoopN, VaucansonKeywords::kwLoopNE, VaucansonKeywords::kwLoopNW, VaucansonKeywords::kwLoopS, VaucansonKeywords::kwLoopSE, VaucansonKeywords::kwLoopSW, VaucansonKeywords::kwLoopVarN, VaucansonKeywords::kwLoopVarS, VaucansonKeywords::kwLoopW, lexan, OneStateTransition(), and TwoStateTransition().
Referenced by Element().
void Parser::TransitionLabel | ( | ) | [protected] |
Definition at line 1982 of file parser.cpp.
References lexan, param, and LexAn::readStringBetween().
Referenced by EndTransitionDeclaration(), Label_r(), and OneStateTransition().
void Parser::TwoStateTransition | ( | ) | [protected] |
Definition at line 1728 of file parser.cpp.
References Arc(), DBGLOG_PAR, Edge(), EndTransitionDeclaration(), LexAn::getToken(), VaucansonKeywords::kwArcL, VaucansonKeywords::kwArcR, VaucansonKeywords::kwEdgeL, VaucansonKeywords::kwEdgeR, VaucansonKeywords::kwLArcL, VaucansonKeywords::kwLArcR, VaucansonKeywords::kwVArcL, VaucansonKeywords::kwVArcR, VaucansonKeywords::kwVCurveL, VaucansonKeywords::kwVCurveR, VaucansonKeywords::LBRACE, lexan, matching(), param, PosParam(), VaucansonKeywords::RBRACE, VArc(), VArcParam(), VCurve(), and VCurveParam().
Referenced by Transition_r().
bool Parser::VArc | ( | ) | [protected] |
Definition at line 1810 of file parser.cpp.
References LexAn::getToken(), VaucansonKeywords::kwVArcL, VaucansonKeywords::kwVArcR, lexan, and matching().
Referenced by TwoStateTransition().
void Parser::VArcParam | ( | ) | [protected] |
Definition at line 1830 of file parser.cpp.
References cParam, LexAn::getToken(), Parser::CurveParam::isAngleA, Parser::CurveParam::isNCurv, lexan, VArcParamIdent(), and VArcParamNext().
Referenced by TwoStateTransition().
void Parser::VArcParamIdent | ( | ) | [protected] |
Definition at line 1849 of file parser.cpp.
References Parser::CurveParam::angleA, cParam, VaucansonKeywords::EQUAL, errorReportUTOKEN(), LexAn::getToken(), LexAn::getTokenData(), VaucansonKeywords::IDENT, Parser::CurveParam::isAngleA, Parser::CurveParam::isNCurv, lexan, matching(), Parser::CurveParam::ncurv, Numb(), and Number().
Referenced by VArcParam(), and VArcParamNext().
void Parser::VArcParamNext | ( | ) | [protected] |
Definition at line 1840 of file parser.cpp.
References VaucansonKeywords::COMMA, LexAn::getToken(), lexan, matching(), and VArcParamIdent().
Referenced by VArcParam().
void Parser::VCPicture | ( | ) | [protected] |
Definition at line 710 of file parser.cpp.
References VaucansonKeywords::COMMA, DBGLOG_PAR, Element(), errorReportUTOKEN(), LexAn::getToken(), LexAn::getTokenData(), VaucansonKeywords::IDENT, IF_CAN_CHANGE_EDITOR, VaucansonKeywords::kwBeginVCPicture, VaucansonKeywords::kwEnd, VaucansonKeywords::LBRACE, lexan, VaucansonKeywords::LPAR, m_gridRect, matching(), Numb(), VaucansonKeywords::RBRACE, VaucansonKeywords::RPAR, and Editor::setGridRect().
Referenced by File().
void Parser::VCPut | ( | ) | [protected] |
Definition at line 753 of file parser.cpp.
References VaucansonKeywords::COMMA, LexAn::getLineNumber(), LexAn::getToken(), VaucansonKeywords::kwVCPut, VaucansonKeywords::LBRACE, VaucansonKeywords::LBRACKET, lexan, VaucansonKeywords::LPAR, matching(), Number(), param, VaucansonKeywords::RBRACE, VaucansonKeywords::RBRACKET, LexAn::readStringBetween(), RELLOG, report, VaucansonKeywords::RPAR, and war_count.
Referenced by Element().
bool Parser::VCurve | ( | ) | [protected] |
Definition at line 1820 of file parser.cpp.
References LexAn::getToken(), VaucansonKeywords::kwVCurveL, VaucansonKeywords::kwVCurveR, lexan, and matching().
Referenced by TwoStateTransition().
void Parser::VCurveParam | ( | ) | [protected] |
Definition at line 1873 of file parser.cpp.
References cParam, LexAn::getToken(), Parser::CurveParam::isAngleA, Parser::CurveParam::isAngleB, Parser::CurveParam::isNCurv, lexan, VCurveParamIdent(), and VCurveParamNext().
Referenced by TwoStateTransition().
void Parser::VCurveParamIdent | ( | ) | [protected] |
Definition at line 1891 of file parser.cpp.
References Parser::CurveParam::angleA, Parser::CurveParam::angleB, cParam, VaucansonKeywords::EQUAL, errorReportUTOKEN(), LexAn::getToken(), LexAn::getTokenData(), VaucansonKeywords::IDENT, Parser::CurveParam::isAngleA, Parser::CurveParam::isAngleB, Parser::CurveParam::isNCurv, lexan, matching(), Parser::CurveParam::ncurv, Numb(), and Number().
Referenced by VCurveParam(), and VCurveParamNext().
void Parser::VCurveParamNext | ( | ) | [protected] |
Definition at line 1883 of file parser.cpp.
References VaucansonKeywords::COMMA, LexAn::getToken(), lexan, matching(), and VCurveParamIdent().
Referenced by VCurveParam().
struct Parser::CurveParam Parser::cParam [protected] |
Referenced by EndTransitionDeclaration(), VArcParam(), VArcParamIdent(), VCurveParam(), and VCurveParamIdent().
bool Parser::dimEdge [protected] |
Definition at line 149 of file parser.h.
Referenced by EndTransitionDeclaration(), OneStateTransition(), and Switch().
QString Parser::dimEdgeLabelColor [protected] |
Definition at line 192 of file parser.h.
Referenced by checkTrParam(), ChgParam(), and resetParams().
float Parser::dimEdgeLineCoef [protected] |
Definition at line 191 of file parser.h.
Referenced by checkTrParam(), ChgParam(), and resetParams().
QString Parser::dimEdgeLineColor [protected] |
Definition at line 190 of file parser.h.
Referenced by checkTrParam(), ChgParam(), and resetParams().
Qt::PenStyle Parser::dimEdgeLineStyle [protected] |
Definition at line 189 of file parser.h.
Referenced by checkTrParam(), ChgParam(), and resetParams().
bool Parser::dimState [protected] |
Definition at line 148 of file parser.h.
Referenced by StateDeclaration(), and Switch().
QString Parser::dimStateFillColor [protected] |
Definition at line 187 of file parser.h.
Referenced by ChgParam(), resetParams(), and StateDeclaration().
QString Parser::dimStateLabelColor [protected] |
Definition at line 186 of file parser.h.
Referenced by ChgParam(), resetParams(), and StateDeclaration().
float Parser::dimStateLineCoef [protected] |
Definition at line 185 of file parser.h.
Referenced by ChgParam(), resetParams(), and StateDeclaration().
QString Parser::dimStateLineColor [protected] |
Definition at line 184 of file parser.h.
Referenced by ChgParam(), resetParams(), and StateDeclaration().
Qt::PenStyle Parser::dimStateLineStyle [protected] |
Definition at line 183 of file parser.h.
Referenced by ChgParam(), resetParams(), and StateDeclaration().
bool Parser::edgeBorder [protected] |
QString Parser::edgeLabelColor [protected] |
Definition at line 169 of file parser.h.
Referenced by checkTrParam(), ChgParam(), resetParams(), and resetTrParams().
float Parser::edgeLabelScale [protected] |
Definition at line 170 of file parser.h.
Referenced by checkTrParam(), ChgParam(), resetParams(), and resetTrParams().
float Parser::edgeLineBorderCoef [protected] |
Definition at line 177 of file parser.h.
Referenced by checkTrParam(), ChgParam(), and resetParams().
QString Parser::edgeLineBorderColor [protected] |
Definition at line 178 of file parser.h.
Referenced by checkTrParam(), ChgParam(), and resetParams().
QString Parser::edgeLineColor [protected] |
Definition at line 168 of file parser.h.
Referenced by checkTrParam(), ChgParam(), resetParams(), and resetTrParams().
float Parser::edgeLineDblCoef [protected] |
Definition at line 179 of file parser.h.
Referenced by checkTrParam(), ChgParam(), and resetParams().
float Parser::edgeLineDblSep [protected] |
Definition at line 180 of file parser.h.
Referenced by checkTrParam(), ChgParam(), and resetParams().
bool Parser::edgeLineDblStatus [protected] |
Definition at line 171 of file parser.h.
Referenced by checkTrParam(), resetParams(), resetTrParams(), and Switch().
Qt::PenStyle Parser::edgeLineStyle [protected] |
Definition at line 166 of file parser.h.
Referenced by checkTrParam(), ChgParam(), resetParams(), and resetTrParams().
float Parser::edgeLineWidth [protected] |
Definition at line 167 of file parser.h.
Referenced by checkTrParam(), ChgParam(), resetParams(), and resetTrParams().
Editor* Parser::editor [protected] |
int Parser::err_count [protected] |
Definition at line 143 of file parser.h.
Referenced by Element(), EndTransitionDeclaration(), errorReportUTOKEN(), Label_r(), Name(), OneStateTransition(), run(), StateDeclaration(), and Switch().
Transition* Parser::lastTr [protected] |
Definition at line 137 of file parser.h.
Referenced by EndTransitionDeclaration(), Label_r(), and OneStateTransition().
LexAn* Parser::lexan [protected] |
Definition at line 134 of file parser.h.
Referenced by Arc(), ChgParam(), Color(), Dir(), DirParam(), Edge(), Element(), EndTransitionDeclaration(), errorReportUTOKEN(), FillStatus(), Label_r(), LineStyle(), Loop(), matching(), Name(), NameAllowedToken(), NameNextPart(), NoBracesToken(), NoBracketsToken(), Numb(), NumberNextPart(), OneStateTransition(), Pos(), PosParam(), Predeclaration(), run(), Sign(), State_r(), StateDeclaration(), StateLabel(), Switch(), Transition_r(), TransitionLabel(), TwoStateTransition(), VArc(), VArcParam(), VArcParamIdent(), VArcParamNext(), VCPicture(), VCPut(), VCurve(), VCurveParam(), VCurveParamIdent(), VCurveParamNext(), and ~Parser().
bool Parser::loaded [protected] |
bool Parser::m_canChangeEditor [protected] |
QRect Parser::m_gridRect [protected] |
Definition at line 140 of file parser.h.
Referenced by run(), and VCPicture().
QMap<QString, State*> Parser::m_stateMap [protected] |
Definition at line 139 of file parser.h.
Referenced by EndTransitionDeclaration(), OneStateTransition(), run(), and StateDeclaration().
QString Parser::param [protected] |
Definition at line 195 of file parser.h.
Referenced by EndTransitionDeclaration(), Label_r(), Name(), NameAllowedToken(), NoBracesToken(), NoBracketsToken(), OneStateTransition(), State_r(), StateDeclaration(), StateLabel(), TransitionLabel(), TwoStateTransition(), and VCPut().
QStringList Parser::report [protected] |
Definition at line 142 of file parser.h.
Referenced by ChgParam(), Element(), EndTransitionDeclaration(), errorReportUTOKEN(), FillStatus(), getReport(), Label_r(), LineStyle(), Name(), Numb(), NumberNextPart(), OneStateTransition(), run(), StateDeclaration(), Switch(), and VCPut().
QString Parser::stateFillColor [protected] |
Definition at line 164 of file parser.h.
Referenced by ChgParam(), resetParams(), resetStateParams(), and StateDeclaration().
Qt::BrushStyle Parser::stateFillStatus [protected] |
Definition at line 163 of file parser.h.
Referenced by ChgParam(), resetParams(), resetStateParams(), and StateDeclaration().
QString Parser::stateLabelColor [protected] |
Definition at line 161 of file parser.h.
Referenced by ChgParam(), resetParams(), resetStateParams(), and StateDeclaration().
float Parser::stateLabelScale [protected] |
Definition at line 162 of file parser.h.
Referenced by ChgParam(), resetParams(), resetStateParams(), and StateDeclaration().
QString Parser::stateLineColor [protected] |
Definition at line 160 of file parser.h.
Referenced by ChgParam(), resetParams(), resetStateParams(), and StateDeclaration().
bool Parser::stateLineDouble [protected] |
Definition at line 151 of file parser.h.
Referenced by StateDeclaration(), and Switch().
float Parser::stateLineDoubleCoef [protected] |
Definition at line 174 of file parser.h.
Referenced by ChgParam(), resetParams(), and StateDeclaration().
float Parser::stateLineDoubleSep [protected] |
Definition at line 175 of file parser.h.
Referenced by ChgParam(), resetParams(), and StateDeclaration().
Qt::PenStyle Parser::stateLineStyle [protected] |
Definition at line 158 of file parser.h.
Referenced by ChgParam(), resetParams(), resetStateParams(), and StateDeclaration().
float Parser::stateLineWidth [protected] |
Definition at line 159 of file parser.h.
Referenced by ChgParam(), resetParams(), resetStateParams(), and StateDeclaration().
bool Parser::varLoop [protected] |
Definition at line 152 of file parser.h.
Referenced by OneStateTransition(), and Switch().
int Parser::war_count [protected] |
Definition at line 143 of file parser.h.
Referenced by ChgParam(), Element(), FillStatus(), LineStyle(), Numb(), NumberNextPart(), OneStateTransition(), run(), and VCPut().