Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Pycparser Fake Header Error #1

Open
Rochan-HM opened this issue Oct 20, 2020 · 0 comments
Open

Pycparser Fake Header Error #1

Rochan-HM opened this issue Oct 20, 2020 · 0 comments

Comments

@Rochan-HM
Copy link

Rochan-HM commented Oct 20, 2020

I have set up everything as described with lc3as and lc3sim in my path. However, I am getting this error when running the python file.

pycparser.plyparser.ParseError: /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h:40:27: before: __gnuc_va_list

Here is the complete error:

Traceback (most recent call last):
  File "./compile.py", line 1245, in <module>
    main(sys.argv[1])
  File "./compile.py", line 1234, in main
    ast = parse_file(filename, use_cpp=True, cpp_args=[r"-DLC3"])
  File "/home/rochan/classwork/cs2110/Project1/Projects/Project3/lc3-cc/lib/python3.8/site-packages/pycparser/__init__.py", line 90, in parse_file
    return parser.parse(text, filename)
  File "/home/rochan/classwork/cs2110/Project1/Projects/Project3/lc3-cc/lib/python3.8/site-packages/pycparser/c_parser.py", line 149, in parse
    return self.cparser.parse(
  File "/home/rochan/classwork/cs2110/Project1/Projects/Project3/lc3-cc/lib/python3.8/site-packages/pycparser/ply/yacc.py", line 331, in parse
    return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
  File "/home/rochan/classwork/cs2110/Project1/Projects/Project3/lc3-cc/lib/python3.8/site-packages/pycparser/ply/yacc.py", line 1199, in parseopt_notrack
    tok = call_errorfunc(self.errorfunc, errtoken, self)
  File "/home/rochan/classwork/cs2110/Project1/Projects/Project3/lc3-cc/lib/python3.8/site-packages/pycparser/ply/yacc.py", line 193, in call_errorfunc
    r = errorfunc(token)
  File "/home/rochan/classwork/cs2110/Project1/Projects/Project3/lc3-cc/lib/python3.8/site-packages/pycparser/c_parser.py", line 1858, in p_error
    self._parse_error(
  File "/home/rochan/classwork/cs2110/Project1/Projects/Project3/lc3-cc/lib/python3.8/site-packages/pycparser/plyparser.py", line 67, in _parse_error
    raise ParseError("%s: %s" % (coord, msg))
pycparser.plyparser.ParseError: /usr/lib/gcc/x86_64-linux-gnu/9/include/stdarg.h:40:27: before: __gnuc_va_list

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant