From 937c5e3a5789013128bab4c392555f3d64264a4d Mon Sep 17 00:00:00 2001 From: Thunder422 Date: Mon, 26 Jan 2015 19:06:43 -0500 Subject: [PATCH] table: set two flag automatically in erector functions changed erector functions to set two flag (added two new functions) added two access functions to table class (used 'not' in two others) removed two flag from all table entries (<> had flag, but wasn't needed) added missing command tokens to parser test 2 (identifiers) changed second <= tests to >= in translator test 11 (temporary strings) added new translator test 18 (complete operator coverage) --- erector.h | 25 ++++ table.cpp | 30 ++-- table.h | 13 +- test/parser2.dat | 3 + test/parser2.txt | 25 ++++ test/translator11.dat | 8 +- test/translator11.out | 16 +-- test/translator11.txt | 16 +-- test/translator18.dat | 117 ++++++++++++++++ test/translator18.out | 313 ++++++++++++++++++++++++++++++++++++++++++ test/translator18.txt | 313 ++++++++++++++++++++++++++++++++++++++++++ 11 files changed, 842 insertions(+), 37 deletions(-) create mode 100644 test/translator18.dat create mode 100644 test/translator18.out create mode 100644 test/translator18.txt diff --git a/erector.h b/erector.h index 4d7973f..74b2def 100644 --- a/erector.h +++ b/erector.h @@ -33,7 +33,9 @@ class Erector private: bool addTwoWordCommandToNameMap(); + void setTwoFlagOnOneWordCommand(); bool addNewPrimaryToNameMap() noexcept; + void setTwoFlagOnOneCharacterOperator(); void addToNameMap() noexcept; void replacePrimary() noexcept; bool addAlternateForOperatorWithMoreOperands(); @@ -95,10 +97,20 @@ inline bool Erector::addTwoWordCommandToNameMap() throw "Multiple two-word command '" + m_entry->commandName() + '\''; } m_entry->addCommandNameToNameMap(); + setTwoFlagOnOneWordCommand(); return true; } +inline void Erector::setTwoFlagOnOneWordCommand() +{ + if (Table *oneWordCommand = m_entry->findName()) + { + oneWordCommand->setTwoWordFlag(); + } +} + + inline bool Erector::addNewPrimaryToNameMap() noexcept { if ((m_primary = m_entry->findName())) @@ -106,10 +118,23 @@ inline bool Erector::addNewPrimaryToNameMap() noexcept return false; } addToNameMap(); + if (m_entry->isTwoCharacterOperator()) + { + setTwoFlagOnOneCharacterOperator(); + } return true; } +inline void Erector::setTwoFlagOnOneCharacterOperator() +{ + if (Table *oneCharacterOperator = Table::find(m_entry->name().substr(0, 1))) + { + oneCharacterOperator->setTwoWordFlag(); + } +} + + inline void Erector::addToNameMap() noexcept { checkIfNotHomogeneousOperator(); diff --git a/table.cpp b/table.cpp index eec4804..2df03d3 100644 --- a/table.cpp +++ b/table.cpp @@ -359,14 +359,14 @@ static Table tableEntries[] = { // Input_Code Code{}, "INPUT", "", "Keep", - Command_Flag | Two_Flag, 4, &Null_ExprInfo, + Command_Flag, 4, &Null_ExprInfo, inputTranslate, NULL, NULL, NULL, inputRecreate }, { // InputPrompt_Code Code{}, "INPUT", "PROMPT", "Keep", - Command_Flag | Two_Flag, 4, &Null_ExprInfo, + Command_Flag, 4, &Null_ExprInfo, inputTranslate, NULL, NULL, NULL, inputRecreate }, @@ -414,14 +414,14 @@ static Table tableEntries[] = { // End_Code Code{}, "END", "", "", - Command_Flag | Two_Flag, 4, &Null_ExprInfo, + Command_Flag, 4, &Null_ExprInfo, NULL, NULL, NULL, NULL, NULL }, { // EndIf_Code Code{}, "END", "IF", "", - Command_Flag | Two_Flag, 4, &Null_ExprInfo, + Command_Flag, 4, &Null_ExprInfo, NULL, NULL, NULL, NULL, NULL }, @@ -456,56 +456,56 @@ static Table tableEntries[] = { // Do_Code Code{}, "DO", "", "", - Command_Flag | Two_Flag, 4, &Null_ExprInfo, + Command_Flag, 4, &Null_ExprInfo, NULL, NULL, NULL, NULL, NULL }, { // DoWhile_Code Code{}, "DO", "WHILE", "", - Command_Flag | Two_Flag, 4, &Null_ExprInfo, + Command_Flag, 4, &Null_ExprInfo, NULL, NULL, NULL, NULL, NULL }, { // DoUntil_Code Code{}, "DO", "UNTIL", "", - Command_Flag | Two_Flag, 4, &Null_ExprInfo, + Command_Flag, 4, &Null_ExprInfo, NULL, NULL, NULL, NULL, NULL }, { // While_Code Code{}, "WHILE", "", "", - Command_Flag | Two_Flag, 4, &Null_ExprInfo, + Command_Flag, 4, &Null_ExprInfo, NULL, NULL, NULL, NULL, NULL }, { // Until_Code Code{}, "UNTIL", "", "", - Command_Flag | Two_Flag, 4, &Null_ExprInfo, + Command_Flag, 4, &Null_ExprInfo, NULL, NULL, NULL, NULL, NULL }, { // Loop_Code Code{}, "LOOP", "", "", - Command_Flag | Two_Flag, 4, &Null_ExprInfo, + Command_Flag, 4, &Null_ExprInfo, NULL, NULL, NULL, NULL, NULL }, { // LoopWhile_Code Code{}, "LOOP", "WHILE", "", - Command_Flag | Two_Flag, 4, &Null_ExprInfo, + Command_Flag, 4, &Null_ExprInfo, NULL, NULL, NULL, NULL, NULL }, { // LoopUntil_Code Code{}, "LOOP", "UNTIL", "", - Command_Flag | Two_Flag, 4, &Null_ExprInfo, + Command_Flag, 4, &Null_ExprInfo, NULL, NULL, NULL, NULL, NULL }, @@ -801,7 +801,7 @@ static Table tableEntries[] = { // Gt_Code Code{}, ">", "", "", - Operator_Flag | Two_Flag, 32, &Int_DblDbl_ExprInfo, + Operator_Flag, 32, &Int_DblDbl_ExprInfo, NULL, NULL, NULL, NULL, binaryOperatorRecreate }, { // GtEq_Code @@ -813,7 +813,7 @@ static Table tableEntries[] = { // Lt_Code Code{}, "<", "", "", - Operator_Flag | Two_Flag, 32, &Int_DblDbl_ExprInfo, + Operator_Flag, 32, &Int_DblDbl_ExprInfo, NULL, NULL, NULL, NULL, binaryOperatorRecreate }, { // LtEq_Code @@ -825,7 +825,7 @@ static Table tableEntries[] = { // NotEq_Code Code{}, "<>", "", "", - Operator_Flag | Two_Flag, 30, &Int_DblDbl_ExprInfo, + Operator_Flag, 30, &Int_DblDbl_ExprInfo, NULL, NULL, NULL, NULL, binaryOperatorRecreate }, { // OpenParen_Code diff --git a/table.h b/table.h index 64b2c1f..846a005 100644 --- a/table.h +++ b/table.h @@ -240,11 +240,16 @@ class Table private: bool hasName() const { - return !m_name.empty(); + return not m_name.empty(); } bool isTwoWordCommand() const { - return hasFlag(Two_Flag) && !m_name2.empty(); + return isCommand() && not m_name2.empty(); + } + bool isTwoCharacterOperator() const + { + return isOperator() && not isalpha(m_name.front()) + && m_name.length() == 2; } bool isNotAssignmentOperator() const { @@ -254,6 +259,10 @@ class Table { m_flags |= Multiple_Flag; } + void setTwoWordFlag() + { + m_flags |= Two_Flag; + } bool hasOperands() const { return m_exprInfo->m_operandCount > 0; diff --git a/test/parser2.dat b/test/parser2.dat index 47d3b85..bd8bb44 100644 --- a/test/parser2.dat +++ b/test/parser2.dat @@ -18,3 +18,6 @@ rem-this should be a comment # more 'FN' tests (these should be plain identifiers) fn fn( fn1 fn1( fn_ fn_( + +dim DEF If Then eLSE end end if for to step next +do Do While DO UNTIL While unTIL Loop looP WHILE LOOP until diff --git a/test/parser2.txt b/test/parser2.txt index dd8909d..fd43f85 100644 --- a/test/parser2.txt +++ b/test/parser2.txt @@ -71,3 +71,28 @@ Input: fn fn( fn1 fn1( fn_ fn_( 16: Variable Double |fn_| 20: UserFunc () Double |fn_(| 24: Operator Op None EOL + +Input: dim DEF If Then eLSE end end if for to step next + 0: Command Op DIM + 4: Command Op DEF + 8: Command Op IF + 11: Command Op THEN + 16: Command Op ELSE + 21: Command Op END + 25: Command Op ENDIF + 32: Command Op FOR + 36: Command Op TO + 39: Command Op STEP + 44: Command Op NEXT + 48: Operator Op None EOL + +Input: do Do While DO UNTIL While unTIL Loop looP WHILE LOOP until + 0: Command Op DO + 3: Command Op DOWHILE + 12: Command Op DOUNTIL + 21: Command Op WHILE + 27: Command Op UNTIL + 33: Command Op LOOP + 38: Command Op LOOPWHILE + 49: Command Op LOOPUNTIL + 59: Operator Op None EOL diff --git a/test/translator11.dat b/test/translator11.dat index 1a7e40e..e74fe6f 100644 --- a/test/translator11.dat +++ b/test/translator11.dat @@ -22,10 +22,10 @@ Z% = A$ > B$ Z% = A$ + B$ > C$ Z% = A$ > B$ + C$ Z% = A$ + B$ > C$ + D$ -Z% = A$ <= B$ -Z% = A$ + B$ <= C$ -Z% = A$ <= B$ + C$ -Z% = A$ + B$ <= C$ + D$ +Z% = A$ >= B$ +Z% = A$ + B$ >= C$ +Z% = A$ >= B$ + C$ +Z% = A$ + B$ >= C$ + D$ Z% = A$ <> B$ Z% = A$ + B$ <> C$ Z% = A$ <> B$ + C$ diff --git a/test/translator11.out b/test/translator11.out index 0ba0638..33caa55 100644 --- a/test/translator11.out +++ b/test/translator11.out @@ -59,17 +59,17 @@ Output: Z% = A$ > B$ + C$ Input: Z% = A$ + B$ > C$ + D$ Output: Z% = A$ + B$ > C$ + D$ -Input: Z% = A$ <= B$ -Output: Z% = A$ <= B$ +Input: Z% = A$ >= B$ +Output: Z% = A$ >= B$ -Input: Z% = A$ + B$ <= C$ -Output: Z% = A$ + B$ <= C$ +Input: Z% = A$ + B$ >= C$ +Output: Z% = A$ + B$ >= C$ -Input: Z% = A$ <= B$ + C$ -Output: Z% = A$ <= B$ + C$ +Input: Z% = A$ >= B$ + C$ +Output: Z% = A$ >= B$ + C$ -Input: Z% = A$ + B$ <= C$ + D$ -Output: Z% = A$ + B$ <= C$ + D$ +Input: Z% = A$ + B$ >= C$ + D$ +Output: Z% = A$ + B$ >= C$ + D$ Input: Z% = A$ <> B$ Output: Z% = A$ <> B$ diff --git a/test/translator11.txt b/test/translator11.txt index ff6c689..9693a76 100644 --- a/test/translator11.txt +++ b/test/translator11.txt @@ -59,17 +59,17 @@ Output: Z% A$ B$ C$ +$ >$ Assign% Input: Z% = A$ + B$ > C$ + D$ Output: Z% A$ B$ +$ C$ D$ +$ >$ Assign% -Input: Z% = A$ <= B$ -Output: Z% A$ B$ <=$ Assign% +Input: Z% = A$ >= B$ +Output: Z% A$ B$ >=$ Assign% -Input: Z% = A$ + B$ <= C$ -Output: Z% A$ B$ +$ C$ <=$ Assign% +Input: Z% = A$ + B$ >= C$ +Output: Z% A$ B$ +$ C$ >=$ Assign% -Input: Z% = A$ <= B$ + C$ -Output: Z% A$ B$ C$ +$ <=$ Assign% +Input: Z% = A$ >= B$ + C$ +Output: Z% A$ B$ C$ +$ >=$ Assign% -Input: Z% = A$ + B$ <= C$ + D$ -Output: Z% A$ B$ +$ C$ D$ +$ <=$ Assign% +Input: Z% = A$ + B$ >= C$ + D$ +Output: Z% A$ B$ +$ C$ D$ +$ >=$ Assign% Input: Z% = A$ <> B$ Output: Z% A$ B$ <>$ Assign% diff --git a/test/translator18.dat b/test/translator18.dat new file mode 100644 index 0000000..b27763b --- /dev/null +++ b/test/translator18.dat @@ -0,0 +1,117 @@ +##################################################### +# Translator Test #18: Complete Operator Coverage # +##################################################### + +A = NOT B +A = -B + +A% = NOT B% +A% = -B% + +A = B + C +A = B - C +A = B * C +A = B / C +A = B MOD C +A = B ^ C +A% = B \ C +A = B = C +A = B <> C +A = B < C +A = B <= C +A = B > C +A = B >= C +A = B AND C +A = B OR C +A = B EQV C +A = B IMP C +A = B XOR C + +A = B% + C +A = B% - C +A = B% * C +A = B% / C +A = B% MOD C +A = B% ^ C +A% = B% \ C +A% = B% = C +A% = B% <> C +A% = B% < C +A% = B% <= C +A% = B% > C +A% = B% >= C +A% = B% AND C +A% = B% OR C +A% = B% EQV C +A% = B% IMP C +A% = B% XOR C + +A = B + C% +A = B - C% +A = B * C% +A = B / C% +A = B MOD C% +A = B ^ C% +A% = B \ C% +A% = B = C% +A% = B <> C% +A% = B < C% +A% = B <= C% +A% = B > C% +A% = B >= C% +A% = B AND C% +A% = B OR C% +A% = B EQV C% +A% = B IMP C% +A% = B XOR C% + +A% = B% + C% +A% = B% - C% +A% = B% * C% +A% = B% / C% +A% = B% MOD C% +A% = B% ^ C% +A% = B% \ C% +A% = B% = C% +A% = B% <> C% +A% = B% < C% +A% = B% <= C% +A% = B% > C% +A% = B% >= C% +A% = B% AND C% +A% = B% OR C% +A% = B% EQV C% +A% = B% IMP C% +A% = B% XOR C% + +A$ = B$ + C$ +A% = B$ = C$ +A% = B$ <> C$ +A% = B$ < C$ +A% = B$ <= C$ +A% = B$ > C$ +A% = B$ >= C$ + +A$ = LEFT$(B$, 1) + C$ +A% = LEFT$(B$, 1) = C$ +A% = LEFT$(B$, 1) <> C$ +A% = LEFT$(B$, 1) < C$ +A% = LEFT$(B$, 1) <= C$ +A% = LEFT$(B$, 1) > C$ +A% = LEFT$(B$, 1) >= C$ + +A$ = B$ + RIGHT$(C$, 1) +A% = B$ = RIGHT$(C$, 1) +A% = B$ <> RIGHT$(C$, 1) +A% = B$ < RIGHT$(C$, 1) +A% = B$ <= RIGHT$(C$, 1) +A% = B$ > RIGHT$(C$, 1) +A% = B$ >= RIGHT$(C$, 1) + +A$ = MID$(B$, 1) + MID$(C$, 1, 2) +A% = MID$(B$, 1) = MID$(C$, 1, 2) +A% = MID$(B$, 1) <> MID$(C$, 1, 2) +A% = MID$(B$, 1) < MID$(C$, 1, 2) +A% = MID$(B$, 1) <= MID$(C$, 1, 2) +A% = MID$(B$, 1) > MID$(C$, 1, 2) +A% = MID$(B$, 1) >= MID$(C$, 1, 2) diff --git a/test/translator18.out b/test/translator18.out new file mode 100644 index 0000000..059682a --- /dev/null +++ b/test/translator18.out @@ -0,0 +1,313 @@ + +Input: A = NOT B +Output: A = NOT B + +Input: A = -B +Output: A = -B + +Input: A% = NOT B% +Output: A% = NOT B% + +Input: A% = -B% +Output: A% = -B% + +Input: A = B + C +Output: A = B + C + +Input: A = B - C +Output: A = B - C + +Input: A = B * C +Output: A = B * C + +Input: A = B / C +Output: A = B / C + +Input: A = B MOD C +Output: A = B MOD C + +Input: A = B ^ C +Output: A = B ^ C + +Input: A% = B \ C +Output: A% = B \ C + +Input: A = B = C +Output: A = B = C + +Input: A = B <> C +Output: A = B <> C + +Input: A = B < C +Output: A = B < C + +Input: A = B <= C +Output: A = B <= C + +Input: A = B > C +Output: A = B > C + +Input: A = B >= C +Output: A = B >= C + +Input: A = B AND C +Output: A = B AND C + +Input: A = B OR C +Output: A = B OR C + +Input: A = B EQV C +Output: A = B EQV C + +Input: A = B IMP C +Output: A = B IMP C + +Input: A = B XOR C +Output: A = B XOR C + +Input: A = B% + C +Output: A = B% + C + +Input: A = B% - C +Output: A = B% - C + +Input: A = B% * C +Output: A = B% * C + +Input: A = B% / C +Output: A = B% / C + +Input: A = B% MOD C +Output: A = B% MOD C + +Input: A = B% ^ C +Output: A = B% ^ C + +Input: A% = B% \ C +Output: A% = B% \ C + +Input: A% = B% = C +Output: A% = B% = C + +Input: A% = B% <> C +Output: A% = B% <> C + +Input: A% = B% < C +Output: A% = B% < C + +Input: A% = B% <= C +Output: A% = B% <= C + +Input: A% = B% > C +Output: A% = B% > C + +Input: A% = B% >= C +Output: A% = B% >= C + +Input: A% = B% AND C +Output: A% = B% AND C + +Input: A% = B% OR C +Output: A% = B% OR C + +Input: A% = B% EQV C +Output: A% = B% EQV C + +Input: A% = B% IMP C +Output: A% = B% IMP C + +Input: A% = B% XOR C +Output: A% = B% XOR C + +Input: A = B + C% +Output: A = B + C% + +Input: A = B - C% +Output: A = B - C% + +Input: A = B * C% +Output: A = B * C% + +Input: A = B / C% +Output: A = B / C% + +Input: A = B MOD C% +Output: A = B MOD C% + +Input: A = B ^ C% +Output: A = B ^ C% + +Input: A% = B \ C% +Output: A% = B \ C% + +Input: A% = B = C% +Output: A% = B = C% + +Input: A% = B <> C% +Output: A% = B <> C% + +Input: A% = B < C% +Output: A% = B < C% + +Input: A% = B <= C% +Output: A% = B <= C% + +Input: A% = B > C% +Output: A% = B > C% + +Input: A% = B >= C% +Output: A% = B >= C% + +Input: A% = B AND C% +Output: A% = B AND C% + +Input: A% = B OR C% +Output: A% = B OR C% + +Input: A% = B EQV C% +Output: A% = B EQV C% + +Input: A% = B IMP C% +Output: A% = B IMP C% + +Input: A% = B XOR C% +Output: A% = B XOR C% + +Input: A% = B% + C% +Output: A% = B% + C% + +Input: A% = B% - C% +Output: A% = B% - C% + +Input: A% = B% * C% +Output: A% = B% * C% + +Input: A% = B% / C% +Output: A% = B% / C% + +Input: A% = B% MOD C% +Output: A% = B% MOD C% + +Input: A% = B% ^ C% +Output: A% = B% ^ C% + +Input: A% = B% \ C% +Output: A% = B% \ C% + +Input: A% = B% = C% +Output: A% = B% = C% + +Input: A% = B% <> C% +Output: A% = B% <> C% + +Input: A% = B% < C% +Output: A% = B% < C% + +Input: A% = B% <= C% +Output: A% = B% <= C% + +Input: A% = B% > C% +Output: A% = B% > C% + +Input: A% = B% >= C% +Output: A% = B% >= C% + +Input: A% = B% AND C% +Output: A% = B% AND C% + +Input: A% = B% OR C% +Output: A% = B% OR C% + +Input: A% = B% EQV C% +Output: A% = B% EQV C% + +Input: A% = B% IMP C% +Output: A% = B% IMP C% + +Input: A% = B% XOR C% +Output: A% = B% XOR C% + +Input: A$ = B$ + C$ +Output: A$ = B$ + C$ + +Input: A% = B$ = C$ +Output: A% = B$ = C$ + +Input: A% = B$ <> C$ +Output: A% = B$ <> C$ + +Input: A% = B$ < C$ +Output: A% = B$ < C$ + +Input: A% = B$ <= C$ +Output: A% = B$ <= C$ + +Input: A% = B$ > C$ +Output: A% = B$ > C$ + +Input: A% = B$ >= C$ +Output: A% = B$ >= C$ + +Input: A$ = LEFT$(B$, 1) + C$ +Output: A$ = LEFT$(B$, 1) + C$ + +Input: A% = LEFT$(B$, 1) = C$ +Output: A% = LEFT$(B$, 1) = C$ + +Input: A% = LEFT$(B$, 1) <> C$ +Output: A% = LEFT$(B$, 1) <> C$ + +Input: A% = LEFT$(B$, 1) < C$ +Output: A% = LEFT$(B$, 1) < C$ + +Input: A% = LEFT$(B$, 1) <= C$ +Output: A% = LEFT$(B$, 1) <= C$ + +Input: A% = LEFT$(B$, 1) > C$ +Output: A% = LEFT$(B$, 1) > C$ + +Input: A% = LEFT$(B$, 1) >= C$ +Output: A% = LEFT$(B$, 1) >= C$ + +Input: A$ = B$ + RIGHT$(C$, 1) +Output: A$ = B$ + RIGHT$(C$, 1) + +Input: A% = B$ = RIGHT$(C$, 1) +Output: A% = B$ = RIGHT$(C$, 1) + +Input: A% = B$ <> RIGHT$(C$, 1) +Output: A% = B$ <> RIGHT$(C$, 1) + +Input: A% = B$ < RIGHT$(C$, 1) +Output: A% = B$ < RIGHT$(C$, 1) + +Input: A% = B$ <= RIGHT$(C$, 1) +Output: A% = B$ <= RIGHT$(C$, 1) + +Input: A% = B$ > RIGHT$(C$, 1) +Output: A% = B$ > RIGHT$(C$, 1) + +Input: A% = B$ >= RIGHT$(C$, 1) +Output: A% = B$ >= RIGHT$(C$, 1) + +Input: A$ = MID$(B$, 1) + MID$(C$, 1, 2) +Output: A$ = MID$(B$, 1) + MID$(C$, 1, 2) + +Input: A% = MID$(B$, 1) = MID$(C$, 1, 2) +Output: A% = MID$(B$, 1) = MID$(C$, 1, 2) + +Input: A% = MID$(B$, 1) <> MID$(C$, 1, 2) +Output: A% = MID$(B$, 1) <> MID$(C$, 1, 2) + +Input: A% = MID$(B$, 1) < MID$(C$, 1, 2) +Output: A% = MID$(B$, 1) < MID$(C$, 1, 2) + +Input: A% = MID$(B$, 1) <= MID$(C$, 1, 2) +Output: A% = MID$(B$, 1) <= MID$(C$, 1, 2) + +Input: A% = MID$(B$, 1) > MID$(C$, 1, 2) +Output: A% = MID$(B$, 1) > MID$(C$, 1, 2) + +Input: A% = MID$(B$, 1) >= MID$(C$, 1, 2) +Output: A% = MID$(B$, 1) >= MID$(C$, 1, 2) + diff --git a/test/translator18.txt b/test/translator18.txt new file mode 100644 index 0000000..01ca39c --- /dev/null +++ b/test/translator18.txt @@ -0,0 +1,313 @@ + +Input: A = NOT B +Output: A B CvtInt NOT CvtDbl Assign + +Input: A = -B +Output: A B -U Assign + +Input: A% = NOT B% +Output: A% B% NOT Assign% + +Input: A% = -B% +Output: A% B% -U% Assign% + +Input: A = B + C +Output: A B C + Assign + +Input: A = B - C +Output: A B C - Assign + +Input: A = B * C +Output: A B C * Assign + +Input: A = B / C +Output: A B C / Assign + +Input: A = B MOD C +Output: A B C MOD Assign + +Input: A = B ^ C +Output: A B C ^ Assign + +Input: A% = B \ C +Output: A% B C \ Assign% + +Input: A = B = C +Output: A B C = CvtDbl Assign + +Input: A = B <> C +Output: A B C <> CvtDbl Assign + +Input: A = B < C +Output: A B C < CvtDbl Assign + +Input: A = B <= C +Output: A B C <= CvtDbl Assign + +Input: A = B > C +Output: A B C > CvtDbl Assign + +Input: A = B >= C +Output: A B C >= CvtDbl Assign + +Input: A = B AND C +Output: A B CvtInt C CvtInt AND CvtDbl Assign + +Input: A = B OR C +Output: A B CvtInt C CvtInt OR CvtDbl Assign + +Input: A = B EQV C +Output: A B CvtInt C CvtInt EQV CvtDbl Assign + +Input: A = B IMP C +Output: A B CvtInt C CvtInt IMP CvtDbl Assign + +Input: A = B XOR C +Output: A B CvtInt C CvtInt XOR CvtDbl Assign + +Input: A = B% + C +Output: A B% C +%1 Assign + +Input: A = B% - C +Output: A B% C -%1 Assign + +Input: A = B% * C +Output: A B% C *%1 Assign + +Input: A = B% / C +Output: A B% C /%1 Assign + +Input: A = B% MOD C +Output: A B% C MOD%1 Assign + +Input: A = B% ^ C +Output: A B% C ^%1 Assign + +Input: A% = B% \ C +Output: A% B% CvtDbl C \ Assign% + +Input: A% = B% = C +Output: A% B% C =%1 Assign% + +Input: A% = B% <> C +Output: A% B% C <>%1 Assign% + +Input: A% = B% < C +Output: A% B% C <%1 Assign% + +Input: A% = B% <= C +Output: A% B% C <=%1 Assign% + +Input: A% = B% > C +Output: A% B% C >%1 Assign% + +Input: A% = B% >= C +Output: A% B% C >=%1 Assign% + +Input: A% = B% AND C +Output: A% B% C CvtInt AND Assign% + +Input: A% = B% OR C +Output: A% B% C CvtInt OR Assign% + +Input: A% = B% EQV C +Output: A% B% C CvtInt EQV Assign% + +Input: A% = B% IMP C +Output: A% B% C CvtInt IMP Assign% + +Input: A% = B% XOR C +Output: A% B% C CvtInt XOR Assign% + +Input: A = B + C% +Output: A B C% +%2 Assign + +Input: A = B - C% +Output: A B C% -%2 Assign + +Input: A = B * C% +Output: A B C% *%2 Assign + +Input: A = B / C% +Output: A B C% /%2 Assign + +Input: A = B MOD C% +Output: A B C% MOD%2 Assign + +Input: A = B ^ C% +Output: A B C% ^* Assign + +Input: A% = B \ C% +Output: A% B C% CvtDbl \ Assign% + +Input: A% = B = C% +Output: A% B C% =%2 Assign% + +Input: A% = B <> C% +Output: A% B C% <>%2 Assign% + +Input: A% = B < C% +Output: A% B C% <%2 Assign% + +Input: A% = B <= C% +Output: A% B C% <=%2 Assign% + +Input: A% = B > C% +Output: A% B C% >%2 Assign% + +Input: A% = B >= C% +Output: A% B C% >=%2 Assign% + +Input: A% = B AND C% +Output: A% B CvtInt C% AND Assign% + +Input: A% = B OR C% +Output: A% B CvtInt C% OR Assign% + +Input: A% = B EQV C% +Output: A% B CvtInt C% EQV Assign% + +Input: A% = B IMP C% +Output: A% B CvtInt C% IMP Assign% + +Input: A% = B XOR C% +Output: A% B CvtInt C% XOR Assign% + +Input: A% = B% + C% +Output: A% B% C% +% Assign% + +Input: A% = B% - C% +Output: A% B% C% -% Assign% + +Input: A% = B% * C% +Output: A% B% C% *% Assign% + +Input: A% = B% / C% +Output: A% B% C% /% Assign% + +Input: A% = B% MOD C% +Output: A% B% C% MOD% Assign% + +Input: A% = B% ^ C% +Output: A% B% C% ^% Assign% + +Input: A% = B% \ C% +Output: A% B% CvtDbl C% CvtDbl \ Assign% + +Input: A% = B% = C% +Output: A% B% C% =% Assign% + +Input: A% = B% <> C% +Output: A% B% C% <>% Assign% + +Input: A% = B% < C% +Output: A% B% C% <% Assign% + +Input: A% = B% <= C% +Output: A% B% C% <=% Assign% + +Input: A% = B% > C% +Output: A% B% C% >% Assign% + +Input: A% = B% >= C% +Output: A% B% C% >=% Assign% + +Input: A% = B% AND C% +Output: A% B% C% AND Assign% + +Input: A% = B% OR C% +Output: A% B% C% OR Assign% + +Input: A% = B% EQV C% +Output: A% B% C% EQV Assign% + +Input: A% = B% IMP C% +Output: A% B% C% IMP Assign% + +Input: A% = B% XOR C% +Output: A% B% C% XOR Assign% + +Input: A$ = B$ + C$ +Output: A$ B$ C$ +$ Assign$ + +Input: A% = B$ = C$ +Output: A% B$ C$ =$ Assign% + +Input: A% = B$ <> C$ +Output: A% B$ C$ <>$ Assign% + +Input: A% = B$ < C$ +Output: A% B$ C$ <$ Assign% + +Input: A% = B$ <= C$ +Output: A% B$ C$ <=$ Assign% + +Input: A% = B$ > C$ +Output: A% B$ C$ >$ Assign% + +Input: A% = B$ >= C$ +Output: A% B$ C$ >=$ Assign% + +Input: A$ = LEFT$(B$, 1) + C$ +Output: A$ B$ 1% LEFT$( C$ +$ Assign$ + +Input: A% = LEFT$(B$, 1) = C$ +Output: A% B$ 1% LEFT$( C$ =$ Assign% + +Input: A% = LEFT$(B$, 1) <> C$ +Output: A% B$ 1% LEFT$( C$ <>$ Assign% + +Input: A% = LEFT$(B$, 1) < C$ +Output: A% B$ 1% LEFT$( C$ <$ Assign% + +Input: A% = LEFT$(B$, 1) <= C$ +Output: A% B$ 1% LEFT$( C$ <=$ Assign% + +Input: A% = LEFT$(B$, 1) > C$ +Output: A% B$ 1% LEFT$( C$ >$ Assign% + +Input: A% = LEFT$(B$, 1) >= C$ +Output: A% B$ 1% LEFT$( C$ >=$ Assign% + +Input: A$ = B$ + RIGHT$(C$, 1) +Output: A$ B$ C$ 1% RIGHT$( +$ Assign$ + +Input: A% = B$ = RIGHT$(C$, 1) +Output: A% B$ C$ 1% RIGHT$( =$ Assign% + +Input: A% = B$ <> RIGHT$(C$, 1) +Output: A% B$ C$ 1% RIGHT$( <>$ Assign% + +Input: A% = B$ < RIGHT$(C$, 1) +Output: A% B$ C$ 1% RIGHT$( <$ Assign% + +Input: A% = B$ <= RIGHT$(C$, 1) +Output: A% B$ C$ 1% RIGHT$( <=$ Assign% + +Input: A% = B$ > RIGHT$(C$, 1) +Output: A% B$ C$ 1% RIGHT$( >$ Assign% + +Input: A% = B$ >= RIGHT$(C$, 1) +Output: A% B$ C$ 1% RIGHT$( >=$ Assign% + +Input: A$ = MID$(B$, 1) + MID$(C$, 1, 2) +Output: A$ B$ 1% MID$(2 C$ 1% 2% MID$(3 +$ Assign$ + +Input: A% = MID$(B$, 1) = MID$(C$, 1, 2) +Output: A% B$ 1% MID$(2 C$ 1% 2% MID$(3 =$ Assign% + +Input: A% = MID$(B$, 1) <> MID$(C$, 1, 2) +Output: A% B$ 1% MID$(2 C$ 1% 2% MID$(3 <>$ Assign% + +Input: A% = MID$(B$, 1) < MID$(C$, 1, 2) +Output: A% B$ 1% MID$(2 C$ 1% 2% MID$(3 <$ Assign% + +Input: A% = MID$(B$, 1) <= MID$(C$, 1, 2) +Output: A% B$ 1% MID$(2 C$ 1% 2% MID$(3 <=$ Assign% + +Input: A% = MID$(B$, 1) > MID$(C$, 1, 2) +Output: A% B$ 1% MID$(2 C$ 1% 2% MID$(3 >$ Assign% + +Input: A% = MID$(B$, 1) >= MID$(C$, 1, 2) +Output: A% B$ 1% MID$(2 C$ 1% 2% MID$(3 >=$ Assign% +