-
Notifications
You must be signed in to change notification settings - Fork 170
Closed
Labels
ParserIssues or improvements related to parserIssues or improvements related to parserPyCon India 2023 DevsprintbugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
My fingers stupidly typed print
syntax from Python 2.17. LPython responded with a barf, but, perhaps a friendly error message would be more appropriate.
repro:
def main():
print "done!"
if __name__ == '__main__':
main()
result:
(base) ┌─(~/CLionProjects/lpython/lasr/LP-pycharm)───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(brian@MacBook-Pro:s003)─┐
└─(13:47:03 on lasr ✭)──> lpython -I. ISSUES/IssueStringMain.py 1 ↵ ──(Tue,Sep26)─┘
Internal Compiler Error: Unhandled exception
Traceback (most recent call last):
File "/Users/brian/CLionProjects/lpython/src/bin/lpython.cpp", line 1888
err = compile_python_to_object_file(arg_file, tmp_o, runtime_library_dir,
File "/Users/brian/CLionProjects/lpython/src/bin/lpython.cpp", line 786
LCompilers::Result<LCompilers::LPython::AST::ast_t*> r = parse_python_file(
File "/Users/brian/CLionProjects/lpython/src/lpython/parser/parser.cpp", line 126
Result<LPython::AST::Module_t*> res = parse(al, input, prev_loc, diagnostics);
File "/Users/brian/CLionProjects/lpython/src/lpython/parser/parser.cpp", line 22
p.parse(s, prev_loc);
File "/Users/brian/CLionProjects/lpython/src/lpython/parser/parser.cpp", line 53
m_tokenizer.set_string(inp, prev_loc);
File "parser.yy", line 1107
File "/Users/brian/CLionProjects/lpython/src/lpython/parser/semantics.h", line 879
throw LCompilers::LCompilersException("The string is not recognized by the parser.");
LCompilersException: The string is not recognized by the parser.
Metadata
Metadata
Assignees
Labels
ParserIssues or improvements related to parserIssues or improvements related to parserPyCon India 2023 DevsprintbugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers