Commit 35ce1705 authored by Alexander Dietsch's avatar Alexander Dietsch

Simulator:

-Fixed minor bugs occuring on rare conditions

Dissertation:
Finished dissertation
parent 8f0d4580
......@@ -41,7 +41,7 @@ namespace LWSimulatorCons
}
} },
{
"e|execute", "automatically run the program; sets clock-rate to 0 and sets parameter '--quarantined'",
"r|run", "automatically run the code; sets clock-rate to 0 and sets parameter '--quarantined'",
v => {
if(v != null)
{
......@@ -73,11 +73,11 @@ namespace LWSimulatorCons
"q|quarantined", "disallow the simulator to save the options so they won't carry over to the next start; will be set automatically if paremeter '--run' is set",
v => quarantined = v != null },
{
"R|variables=", "set variable file",
"V|variables=", "set variable file",
v => variablePath = v },
{
"r|limit-variables=", "limit the number of variables that any program is allowed to use at most; default is 100",
"v|limit-variables=", "limit the number of variables that any code is allowed to use at most; default is 100",
v => {
if (!tryParseValue(v,out limitVariables))
{
......@@ -86,7 +86,7 @@ namespace LWSimulatorCons
}
} },
{
"s|limit-steps=", "limit the number of steps that any program is allowed to do at most before being interrupted; default is 0 (off)",
"s|limit-steps=", "limit the number of steps that any code is allowed to do at most before being interrupted; default is 0 (off)",
v => {
if (!tryParseValue(v,out limitSteps))
{
......@@ -159,7 +159,7 @@ namespace LWSimulatorCons
if (!errors[0] && limitVariables != long.MaxValue)
{
if(limitVariables <= 0 || !simulator.setOptionVal("maxRegAm",limitVariables))
if(limitVariables <= 0 || !simulator.setOptionVal("maxVarAm",limitVariables))
{
errorInd = true;
errors[1] = true;
......@@ -218,9 +218,9 @@ namespace LWSimulatorCons
{
if(!simulator.allInitialized())
{
printLog("WARNING: The LWSimulator DLL uses callback functions unknown to this console application.");
printLog(new List<string> { "WARNING: The LWSimulator DLL uses callback functions unknown to this console application." });
}
simulator.runProgram(program);
simulator.runProgram(program,inputPath);
waitForFinish.WaitOne();
#if (DEBUG)
Console.ReadLine();
......@@ -294,15 +294,18 @@ namespace LWSimulatorCons
return true;
}
private static void printLog(string s)
private static void printLog(List<string> s)
{
if (logLevel == 2 && !s.StartsWith("Code returned") && !s.StartsWith("Syntax"))
return;
if (logLevel == 1 && !(s.StartsWith("WARNING") || s.StartsWith("ERROR") || s.StartsWith("Code returned") || s.StartsWith("Syntax")))
return;
if (logLevel == 0 && s.StartsWith("DEBUG"))
return;
Console.WriteLine(s);
for (int i = 0; i < s.Count; i++)
{
if (logLevel == 2 && !s[i].StartsWith("Code returned") && !s[i].StartsWith("Syntax"))
continue;
if (logLevel == 1 && !(s[i].StartsWith("WARNING") || s[i].StartsWith("ERROR") || s[i].StartsWith("Code returned") || s[i].StartsWith("Syntax")))
continue;
if (logLevel == 0 && s[i].StartsWith("DEBUG"))
continue;
Console.WriteLine(s[i]);
}
}
/// <summary>
......
......@@ -18,9 +18,9 @@ namespace LWSimulatorGUI
{
InitializeComponent();
simul = coord;
nUDValue.Value = simul.getOptionVal("defRegVal");
nUDValue.Value = simul.getOptionVal("defVarVal");
nUDVariable.Maximum = simul.getVariableAmount() - 1;
nUDVariableAm.Maximum = simul.getOptionVal("maxRegAm") - simul.getVariableAmount();
nUDVariableAm.Maximum = simul.getOptionVal("maxVarAm") - simul.getVariableAmount();
// Attempt to get some uniformity between platforms
nUDVariableAm.Location = new Point(lInsert.Location.X + lInsert.Width + 6, nUDVariableAm.Location.Y);
......
......@@ -93,23 +93,23 @@
<Compile Include="CustomRichTextBox.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="DeleteRegisters.cs">
<Compile Include="DeleteVariables.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="DeleteRegisters.Designer.cs">
<DependentUpon>DeleteRegisters.cs</DependentUpon>
<Compile Include="DeleteVariables.Designer.cs">
<DependentUpon>DeleteVariables.cs</DependentUpon>
</Compile>
<Compile Include="ShiftRegisters.cs">
<Compile Include="ShiftVariables.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ShiftRegisters.Designer.cs">
<DependentUpon>ShiftRegisters.cs</DependentUpon>
<Compile Include="ShiftVariables.Designer.cs">
<DependentUpon>ShiftVariables.cs</DependentUpon>
</Compile>
<Compile Include="InsertRegisters.cs">
<Compile Include="InsertVariables.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="InsertRegisters.Designer.cs">
<DependentUpon>InsertRegisters.cs</DependentUpon>
<Compile Include="InsertVariables.Designer.cs">
<DependentUpon>InsertVariables.cs</DependentUpon>
</Compile>
<Compile Include="DoubleBufferedListBox.cs">
<SubType>Component</SubType>
......@@ -140,14 +140,14 @@
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="SimpleGUISimulation.cs" />
<EmbeddedResource Include="DeleteRegisters.resx">
<DependentUpon>DeleteRegisters.cs</DependentUpon>
<EmbeddedResource Include="DeleteVariables.resx">
<DependentUpon>DeleteVariables.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="ShiftRegisters.resx">
<DependentUpon>ShiftRegisters.cs</DependentUpon>
<EmbeddedResource Include="ShiftVariables.resx">
<DependentUpon>ShiftVariables.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="InsertRegisters.resx">
<DependentUpon>InsertRegisters.cs</DependentUpon>
<EmbeddedResource Include="InsertVariables.resx">
<DependentUpon>InsertVariables.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="LogWindow.resx">
<DependentUpon>LogWindow.cs</DependentUpon>
......
......@@ -191,16 +191,19 @@ namespace LWSimulatorGUI
/// Makes the GUI add a line.
/// </summary>
/// <param name="line">The line to be added.</param>
internal void addLine_Notify(string line)
internal void addLine_Notify(List<string> lines)
{
if (line.StartsWith("DEBUG"))
if(simulator.getOptionVal("advancedLog") == 0)
return;
lock(toAddToLog)
{
for (int i = 0; i < lines.Count; i++)
{
if (lines[i].StartsWith("DEBUG"))
if (simulator.getOptionVal("advancedLog") == 0)
continue;
if (toAddToLog.Count >= simulator.getOptionVal("maxLogLines"))
toAddToLog.RemoveFirst();
toAddToLog.AddLast(line);
toAddToLog.AddLast(lines[i]);
}
}
if (InvokeRequired)
this.Invoke((MethodInvoker)delegate
......
......@@ -429,7 +429,7 @@ namespace LWSimulatorGUI
changeCurCharIndex(curCharIndex);
// create & set Point pt to (0,0)
Point pt = new Point(0, 0);
// get First Index & First Line from richTextBox1
// get First Index & First Line
int First_Index = fCTBProgram.GetCharIndexFromPosition(pt);
int First_Line = fCTBProgram.GetLineFromCharIndex(First_Index);
// set X & Y coordinates of Point pt to ClientRectangle Width & Height respectively
......@@ -803,7 +803,7 @@ namespace LWSimulatorGUI
/// <param name="e">Arguments of the type <see cref="ElapsedEventArgs">ElapsedEventArgs</see></param>
private void FailSafeTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
log.addLine_Notify("DEBUG: FailSafe timed out; Rechecking state.");
log.addLine_Notify(new List<string> { "DEBUG: FailSafe timed out; Rechecking state." });
UpdateRunningStateChange();
}
......@@ -991,7 +991,7 @@ namespace LWSimulatorGUI
if (lineNumb == -1)
lineNumb = fCTBProgram.Lines.Length;
log.addLine_Notify(string.Format("Syntax error in line {0}, position {1}: {2}", lineNumb, p.Position - totalCount, p.Message));
log.addLine_Notify(new List<string> { string.Format("Syntax error in line {0}, position {1}: {2}", lineNumb, p.Position - totalCount, p.Message) });
}
}
}
......@@ -1118,7 +1118,7 @@ namespace LWSimulatorGUI
if (!string.IsNullOrEmpty(currentFilePath))
oFDRegs.InitialDirectory = Path.GetDirectoryName(currentFilePath);
oFDRegs.Filter = "LWVariable files (*.lwreg)|*.lwreg|txt files (*.txt)|*.txt|All files (*.*)|*.*";
oFDRegs.Filter = "LWVariable files (*.lwVar)|*.lwVar|txt files (*.txt)|*.txt|All files (*.*)|*.*";
oFDRegs.FilterIndex = 1;
oFDRegs.RestoreDirectory = true;
oFDRegs.CheckFileExists = true;
......@@ -1160,12 +1160,12 @@ namespace LWSimulatorGUI
else
suggestedName = String.Format("{0}_Variables", Path.GetFileNameWithoutExtension(currentFilePath));
SaveFileDialog save = new SaveFileDialog();
save.Filter = "LWVariable files (*.lwreg)|*.lwreg|txt files (*.txt)|*.txt|All files (*.*)|*.*";
save.Filter = "LWVariable files (*.lwVar)|*.lwVar|txt files (*.txt)|*.txt|All files (*.*)|*.*";
save.FilterIndex = 1;
save.RestoreDirectory = true;
save.OverwritePrompt = true;
save.CheckPathExists = true;
save.FileName = suggestedName + ".lwreg";
save.FileName = suggestedName + ".lwVar";
if (save.ShowDialog() == DialogResult.OK)
{
......
......@@ -23,8 +23,8 @@ namespace LWSimulatorGUI
new ToolTip().SetToolTip(pBHelpRegDefVal, "Initializes every newly added variable with given number.");
new ToolTip().SetToolTip(pBHelpAdvancedLog, "Log will not only display actions of the program\nbut also debug information.");
simulator = simul;
nUDVariables.Value = simul.getOptionVal("maxRegAm");
nUDRegDefVal.Value = simul.getOptionVal("defRegVal");
nUDVariables.Value = simul.getOptionVal("maxVarAm");
nUDRegDefVal.Value = simul.getOptionVal("defVarVal");
nUDLogLines.Value = simul.getOptionVal("maxLogLines");
chBClearLog.Checked = (simul.getOptionVal("clearLog") != 0);
chBAdvancedLog.Checked = (simul.getOptionVal("advancedLog") != 0);
......@@ -84,9 +84,9 @@ namespace LWSimulatorGUI
{
List<string> unableOptions = new List<string>();
bool validDir = Directory.Exists(tBDirPath.Text);
if (!simulator.setOptionVal("maxRegAm", (long)nUDVariables.Value))
if (!simulator.setOptionVal("maxVarAm", (long)nUDVariables.Value))
unableOptions.Add("-Maximum number of variables");
if(!simulator.setOptionVal("defRegVal", (long)nUDRegDefVal.Value))
if(!simulator.setOptionVal("defVarVal", (long)nUDRegDefVal.Value))
unableOptions.Add("-Default value of variables");
if(!simulator.setOptionVal("maxLogLines", (long)nUDLogLines.Value))
unableOptions.Add("-Maximum number of log lines");
......
......@@ -45,8 +45,8 @@ namespace LWSimulatorGUI
clearLog = emptyDummyMethod;
updateOptions = dummyMethod<string>;
logMessage = dummyMethod<string>;
optionVals.Add("maxRegAm", 100);
optionVals.Add("defRegVal", 0);
optionVals.Add("maxVarAm", 100);
optionVals.Add("defVarVal", 0);
optionVals.Add("maxLogLines", 300);
optionVals.Add("clearLog", 1);
optionVals.Add("timePerStep", 100);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -70,8 +70,8 @@ namespace TinyPG
}
tok = scanner.LookAhead(TokenType.REGISTERCALL, TokenType.BRACKETOPEN, TokenType.LOOP, TokenType.WHILE);
if (tok.Type == TokenType.REGISTERCALL
tok = scanner.LookAhead(TokenType.VARIABLECALL, TokenType.BRACKETOPEN, TokenType.LOOP, TokenType.WHILE);
if (tok.Type == TokenType.VARIABLECALL
|| tok.Type == TokenType.BRACKETOPEN
|| tok.Type == TokenType.LOOP
|| tok.Type == TokenType.WHILE)
......@@ -1083,10 +1083,10 @@ namespace TinyPG
tok = scanner.LookAhead(TokenType.REGISTERCALL, TokenType.BRACKETOPEN, TokenType.LOOP, TokenType.WHILE);
tok = scanner.LookAhead(TokenType.VARIABLECALL, TokenType.BRACKETOPEN, TokenType.LOOP, TokenType.WHILE);
switch (tok.Type)
{
case TokenType.REGISTERCALL:
case TokenType.VARIABLECALL:
case TokenType.BRACKETOPEN:
ParseAssignment(node);
break;
......@@ -1130,10 +1130,10 @@ namespace TinyPG
ParseNode node = parent.CreateNode(scanner.GetToken(TokenType.Expression), "Expression");
parent.Nodes.Add(node);
tok = scanner.LookAhead(TokenType.REGISTERCALL, TokenType.ZERO, TokenType.NUMBER_OPERATION);
tok = scanner.LookAhead(TokenType.VARIABLECALL, TokenType.ZERO, TokenType.NUMBER_OPERATION);
switch (tok.Type)
{
case TokenType.REGISTERCALL:
case TokenType.VARIABLECALL:
ParseVariable(node);
......@@ -1164,10 +1164,10 @@ namespace TinyPG
ParseNode node = parent.CreateNode(scanner.GetToken(TokenType.Assignment), "Assignment");
parent.Nodes.Add(node);
tok = scanner.LookAhead(TokenType.REGISTERCALL, TokenType.BRACKETOPEN);
tok = scanner.LookAhead(TokenType.VARIABLECALL, TokenType.BRACKETOPEN);
switch (tok.Type)
{
case TokenType.REGISTERCALL:
case TokenType.VARIABLECALL:
ParseVariable(node);
......@@ -1183,10 +1183,10 @@ namespace TinyPG
}
tok = scanner.LookAhead(TokenType.REGISTERCALL, TokenType.ZERO, TokenType.NUMBER_OPERATION, TokenType.NAME);
tok = scanner.LookAhead(TokenType.VARIABLECALL, TokenType.ZERO, TokenType.NUMBER_OPERATION, TokenType.NAME);
switch (tok.Type)
{
case TokenType.REGISTERCALL:
case TokenType.VARIABLECALL:
case TokenType.ZERO:
case TokenType.NUMBER_OPERATION:
ParseValue(node);
......@@ -1232,10 +1232,10 @@ namespace TinyPG
ParseNode node = parent.CreateNode(scanner.GetToken(TokenType.Value), "Value");
parent.Nodes.Add(node);
tok = scanner.LookAhead(TokenType.REGISTERCALL, TokenType.ZERO, TokenType.NUMBER_OPERATION);
tok = scanner.LookAhead(TokenType.VARIABLECALL, TokenType.ZERO, TokenType.NUMBER_OPERATION);
switch (tok.Type)
{
case TokenType.REGISTERCALL:
case TokenType.VARIABLECALL:
ParseVariable(node);
break;
case TokenType.ZERO:
......@@ -1322,12 +1322,12 @@ namespace TinyPG
tok = scanner.Scan(TokenType.REGISTERCALL);
tok = scanner.Scan(TokenType.VARIABLECALL);
n = node.CreateNode(tok, tok.ToString() );
node.Token.UpdateRange(tok);
node.Nodes.Add(n);
if (tok.Type != TokenType.REGISTERCALL) {
tree.Errors.Add(new ParseError("Unexpected token '" + tok.Text.Replace("\n", "") + "' found. Expected " + TokenType.REGISTERCALL.ToString(), 0x1001, 0, tok.StartPos, tok.StartPos, tok.Length));
if (tok.Type != TokenType.VARIABLECALL) {
tree.Errors.Add(new ParseError("Unexpected token '" + tok.Text.Replace("\n", "") + "' found. Expected " + TokenType.VARIABLECALL.ToString(), 0x1001, 0, tok.StartPos, tok.StartPos, tok.Length));
return;
}
......@@ -1431,8 +1431,8 @@ namespace TinyPG
}
tok = scanner.LookAhead(TokenType.REGISTERCALL);
if (tok.Type == TokenType.REGISTERCALL)
tok = scanner.LookAhead(TokenType.VARIABLECALL);
if (tok.Type == TokenType.VARIABLECALL)
{
ParseVariableEnum(node);
}
......@@ -1482,8 +1482,8 @@ namespace TinyPG
}
tok = scanner.LookAhead(TokenType.REGISTERCALL, TokenType.BRACKETOPEN, TokenType.LOOP, TokenType.WHILE);
if (tok.Type == TokenType.REGISTERCALL
tok = scanner.LookAhead(TokenType.VARIABLECALL, TokenType.BRACKETOPEN, TokenType.LOOP, TokenType.WHILE);
if (tok.Type == TokenType.VARIABLECALL
|| tok.Type == TokenType.BRACKETOPEN
|| tok.Type == TokenType.LOOP
|| tok.Type == TokenType.WHILE)
......@@ -1536,8 +1536,8 @@ namespace TinyPG
}
tok = scanner.LookAhead(TokenType.REGISTERCALL, TokenType.BRACKETOPEN, TokenType.LOOP, TokenType.WHILE);
if (tok.Type == TokenType.REGISTERCALL
tok = scanner.LookAhead(TokenType.VARIABLECALL, TokenType.BRACKETOPEN, TokenType.LOOP, TokenType.WHILE);
if (tok.Type == TokenType.VARIABLECALL
|| tok.Type == TokenType.BRACKETOPEN
|| tok.Type == TokenType.LOOP
|| tok.Type == TokenType.WHILE)
......
......@@ -49,7 +49,7 @@ namespace TinyPG
Patterns.Add(TokenType.PROGRAMTYPE, regex);
Tokens.Add(TokenType.PROGRAMTYPE);
regex = new Regex(@"#MAXREG", RegexOptions.Compiled);
regex = new Regex(@"#MAXREG|#MAXVAR", RegexOptions.Compiled);
Patterns.Add(TokenType.PRE_EXEC_COMS_INT, regex);
Tokens.Add(TokenType.PRE_EXEC_COMS_INT);
......@@ -74,8 +74,8 @@ namespace TinyPG
Tokens.Add(TokenType.NAME);
regex = new Regex(@"x", RegexOptions.Compiled);
Patterns.Add(TokenType.REGISTERCALL, regex);
Tokens.Add(TokenType.REGISTERCALL);
Patterns.Add(TokenType.VARIABLECALL, regex);
Tokens.Add(TokenType.VARIABLECALL);
regex = new Regex(@"def", RegexOptions.Compiled);
Patterns.Add(TokenType.DEFINE, regex);
......@@ -335,7 +335,7 @@ namespace TinyPG
ZERO = 43,
INTEGER = 44,
NAME = 45,
REGISTERCALL= 46,
VARIABLECALL= 46,
DEFINE = 47,
ENDDEFINE= 48,
INPUT = 49,
......
......@@ -3,19 +3,19 @@
<% @TinyPG Language="c#" %>
// Language to disallow natural numbers in registers.
// Language to disallow natural numbers in Variables.
// Terminals
BRACKETOPEN -> @"\(";
BRACKETCLOSE -> @"\)";
PROGRAMTYPE -> @"#(LOOP|WHILE)";
PRE_EXEC_COMS_INT -> @"#MAXREG";
PRE_EXEC_COMS_INT -> @"#MAXREG|#MAXVAR";
PRE_EXEC_COMS_STRING -> @"#IMPORT";
STRING -> @"[A-Za-z0-9-_,.]+[A-Za-z0-9-_]";
ZERO -> @"0";
INTEGER -> @"0|[1-9][0-9]*";
NAME -> @"[A-Z][a-zA-Z_0-9]*";
REGISTERCALL -> @"x";
VARIABLECALL -> @"x";
DEFINE -> @"def";
ENDDEFINE -> @"enddef";
INPUT -> @"in";
......@@ -52,41 +52,41 @@ COMMENTBLOCK -> @"/\*[^*]*\*+(?:[^/*][^*]*\*+)*/";
Start -> PROGRAMTYPE (PreExecComs)* (MacroDef)* (Instruction)? EOF;
PreExecComs -> (PRE_EXEC_COMS_INT INTEGER) |(PRE_EXEC_COMS_STRING STRING);
MacroDef -> DEFINE NAME OutputDef InputDef AuxDef DO InstructionM ENDDEFINE;
OutputDef -> OUTPUT COLON OutputRegister (COMMA OutputRegister)*;
OutputRegister -> OUTPUTCALL INTEGER;
InputDef -> INPUT COLON ( InputRegister (COMMA InputRegister)* )?;
InputRegister -> INPUTCALL INTEGER;
AuxDef -> AUX COLON (AuxRegister (COMMA AuxRegister)* )?;
AuxRegister -> AUXCALL INTEGER;
AnyRegisterM -> (INPUTCALL | (OUTPUTCALL | AUXCALL)) INTEGER;
OutputDef -> OUTPUT COLON OutputVariable (COMMA OutputVariable)*;
OutputVariable -> OUTPUTCALL INTEGER;
InputDef -> INPUT COLON ( InputVariable (COMMA InputVariable)* )?;
InputVariable -> INPUTCALL INTEGER;
AuxDef -> AUX COLON (AuxVariable (COMMA AuxVariable)* )?;
AuxVariable -> AUXCALL INTEGER;
AnyVariableM -> (INPUTCALL | (OUTPUTCALL | AUXCALL)) INTEGER;
InstructionM -> (AssignmentM | LoopBodyM | WhileBodyM) (SEMICOLON InstructionM)? ;
ExpressionM -> (AnyRegisterM (ExpressionMakroM)? )| NumberM;
AssignmentM -> (AnyRegisterM ASSIGN (ValueM | MacroM)) | (RegisterArrayM ASSIGN MacroM);
ValueM -> AnyRegisterM | NumberM;
ExpressionM -> (AnyVariableM (ExpressionMakroM)? )| NumberM;
AssignmentM -> (AnyVariableM ASSIGN (ValueM | MacroM)) | (VariableArrayM ASSIGN MacroM);
ValueM -> AnyVariableM | NumberM;
NumberM -> ZERO | (NUMBER_OPERATION BRACKETOPEN ValueM BRACKETCLOSE);
RegisterEnumM -> AnyRegisterM (COMMA AnyRegisterM)* ;
RegisterArrayM -> BRACKETOPEN RegisterEnumM BRACKETCLOSE;
RegisterArrayEmpM -> BRACKETOPEN (RegisterEnumM)? BRACKETCLOSE;
VariableEnumM -> AnyVariableM (COMMA AnyVariableM)* ;
VariableArrayM -> BRACKETOPEN VariableEnumM BRACKETCLOSE;
VariableArrayEmpM -> BRACKETOPEN (VariableEnumM)? BRACKETCLOSE;
LoopBodyM -> LOOP ValueM DO (InstructionM)? END;
WhileBodyM -> WHILE ExpressionM DO (InstructionM)? END;
MacroM -> NAME RegisterArrayEmpM RegisterArrayEmpM;
MacroM -> NAME VariableArrayEmpM VariableArrayEmpM;
ExpressionMakroM -> AS MacroM;
Instruction -> (Assignment | LoopBody | WhileBody) (SEMICOLON Instruction)? ;
Expression -> (Register (ExpressionMakro)? )| Number;
Assignment -> (Register ASSIGN (Value | Macro)) | (RegisterArray ASSIGN Macro);
Value -> Register | Number;
Expression -> (Variable (ExpressionMakro)? )| Number;
Assignment -> (Variable ASSIGN (Value | Macro)) | (VariableArray ASSIGN Macro);
Value -> Variable | Number;
Number -> ZERO | (NUMBER_OPERATION BRACKETOPEN Value BRACKETCLOSE);
Register -> REGISTERCALL INTEGER;
RegisterEnum -> Register (COMMA Register)* ;
RegisterArray -> BRACKETOPEN RegisterEnum BRACKETCLOSE;
RegisterArrayEmp -> BRACKETOPEN (RegisterEnum)? BRACKETCLOSE;
Variable -> VARIABLECALL INTEGER;
VariableEnum -> Variable (COMMA Variable)* ;
VariableArray -> BRACKETOPEN VariableEnum BRACKETCLOSE;
VariableArrayEmp -> BRACKETOPEN (VariableEnum)? BRACKETCLOSE;
LoopBody -> LOOP Value DO (Instruction)? END;
WhileBody -> WHILE Expression DO (Instruction)? END;
Macro -> NAME RegisterArrayEmp RegisterArrayEmp;
Macro -> NAME VariableArrayEmp VariableArrayEmp;
ExpressionMakro -> AS Macro;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment