My program is a Windows Form Application in C#.
I have an interpreter/compiler IDE w/c basically runs a custom Language through a customized console window.
When interpreting input lines like "scanf", how do pause the interpreting while the user doesn't press enter?
Sample custom code to parse:
1 VAR x AS INT
2 START
3 INPUT: x
4 OUTPUT: x
5 STOP
For example, in those lines, when my program processes line 3, it doesn't process the other lines until the user inputs something and presses enter.
Pseudo-Snippet for line by line parsing:
foreach (string line in inputCode)
{
LineType lineType = line.getType();
if(lineType.InputStatement)
{
//wait for input here
}
else if(lineType.OutputStatement)
{
//analyze output code here
}
else if(lineType.AssignmentStatement)
{
//do Evaluation here
}
}