|
20 | 20 | # |
21 | 21 | #################################################################################################### |
22 | 22 |
|
23 | | -# Fixme: <- is not implemented in parser ??? |
24 | | -# |
25 | | -# Generating LALR tables |
26 | | -# WARNING: 7 shift/reduce conflicts |
27 | | -# |
28 | | -# ================================================================================ |
29 | | -# 1 : C <- 0 |
30 | | -# 2017-05-21 14:31:19,562 - PySimAvr.Core.CoreHdlParser.Parser - CoreHdlParser.p_error - ERROR - Syntax error at '<' |
31 | | -# Traceback (most recent call last): |
32 | | -# File "bin/test-core-hdl-parser.py", line 50, in <module> |
33 | | -# program = parser.parse(line) |
34 | | -# File "/home/fabrice/home/developpement/PySimAvr/PySimAvr/Core/CoreHdlParser.py", line 417, in parse |
35 | | -# self._parser.parse(text, lexer=self._lexer) |
36 | | -# File "/opt/python-virtual-env/py35/lib/python3.5/site-packages/ply/yacc.py", line 331, in parse |
37 | | -# return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc) |
38 | | -# File "/opt/python-virtual-env/py35/lib/python3.5/site-packages/ply/yacc.py", line 1199, in parseopt_notrack |
39 | | -# tok = call_errorfunc(self.errorfunc, errtoken, self) |
40 | | -# File "/opt/python-virtual-env/py35/lib/python3.5/site-packages/ply/yacc.py", line 193, in call_errorfunc |
41 | | -# r = errorfunc(token) |
42 | | -# File "/home/fabrice/home/developpement/PySimAvr/PySimAvr/Core/CoreHdlParser.py", line 208, in p_error |
43 | | -# raise NameError('Parser error') |
44 | | -# NameError: Parser error |
| 23 | +"""Test the HDL parser for instruction operations. |
| 24 | +""" |
| 25 | + |
| 26 | +# Fixme: Some operations are supported !!! |
45 | 27 |
|
46 | 28 | #################################################################################################### |
47 | 29 | # |
|
70 | 52 | print(line_number, ':', line) |
71 | 53 | # print() |
72 | 54 | # parser.test_lexer(line) |
73 | | - program = parser.parse(line) |
| 55 | + # try: |
| 56 | + program = parser.parse(line + ';') |
74 | 57 | print() |
75 | 58 | print(program) |
| 59 | + # except: |
| 60 | + # print("Parse error") |
0 commit comments