Skip to content
This repository has been archived by the owner on Jun 4, 2019. It is now read-only.

Fatal error: exception Common.Todo #162

Open
dbeecham opened this issue May 9, 2019 · 1 comment
Open

Fatal error: exception Common.Todo #162

dbeecham opened this issue May 9, 2019 · 1 comment

Comments

@dbeecham
Copy link

dbeecham commented May 9, 2019

$ pfff -parse_c .
PARSING: ./src/x.c
PARSING: ./src/y.c
PARSING: ./src/z.c
Cpp(PragmaAndCo(()))
PB: Ast_c_build, on ./src/z.c (exn = Common.Todo)
Fatal error: exception Common.Todo

same thing with codegraph:

$ codegraph -lang c -build .
Using /usr/local/share/pfff//data/cpp_stdlib/macros.h macro file

step0: parsing
Cpp(PragmaAndCo(()))
PB: Ast_c_build, on [...]/src/z.c (exn = Common.Todo)
(ONCE) PARSE ERROR with [...]/src/z.c, exn = Common.Todo
Fatal error: exception Common.Todo
@aryx
Copy link
Contributor

aryx commented May 9, 2019

Yes -parse_c is very rudimentary. You may want -parse_cpp instead.
I wrote -parse_c by using the C++ parser in pfff with its very complicated ast_cpp.ml file
and converting only the subset of C I need from ast_cpp.ml to ast_c_simple.ml.
The error means the constructs from ast_cpp.ml has no correspondance in ast_c_simple.ml

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants