Laxenade
Laxenade

Reputation: 9

Parsing C struct using ANTLR

Is parsing C struct using ANTLR possible? if so, is there any existing tool/grammar file? the code will be like this:

typedef struct C {
    int i;
    float f;
}

Upvotes: 0

Views: 856

Answers (1)

Bart Kiers
Bart Kiers

Reputation: 170308

Is parsing C struct using ANTLR possible?

Yes.

if so, is there any existing tool/grammar file?

There are C grammars for both ANTLR3 and ANTLR4:

Upvotes: 1

Related Questions