Fixed.
This commit is contained in:
parent
9bbc406364
commit
79d9c3976a
@ -21,7 +21,10 @@ int main(int argc, const char* argv[]) {
|
||||
|
||||
try {
|
||||
|
||||
printf("Compile Program Based on LR(1) Written By Saturneric\n");
|
||||
wcout << "Compile Program Based on LR(1) Written By Saturneric(胡宇 2018303206)" << endl;
|
||||
|
||||
wcout << "老师注意:本程序区分关键字的大小写!!!" << endl
|
||||
<< "这样做的原因是本人在实践上还没有见过有哪门语言不区分关键字大小写的" << endl;
|
||||
|
||||
if (argc < 2) {
|
||||
printf("Usage: <Input Path>\n");
|
||||
|
@ -14,7 +14,7 @@ void SyntaxParser::parse() {
|
||||
auto *p_step = atg->findActionStep(status_stack.top(), tokens_queue.front());
|
||||
|
||||
if (p_step == nullptr) {
|
||||
printError(output);
|
||||
printError();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -42,8 +42,7 @@ void SyntaxParser::parse() {
|
||||
string_buffer << p_symbol->name << " ";
|
||||
tokens_queue.pop();
|
||||
_line_index++;
|
||||
}
|
||||
else if(p_step->action == REDUCE) {
|
||||
} else if (p_step->action == REDUCE) {
|
||||
|
||||
auto *p_pdt = p_step->target.production;
|
||||
output << "REDUCE BY" << "(AUTOMATA STATUS " << status_stack.top() << "): [";
|
||||
|
Loading…
Reference in New Issue
Block a user