C parser in Javascript

前端 未结 3 1524
别跟我提以往
别跟我提以往 2021-02-15 17:00

I\'d like to parse C header files in Javascript. Is there any such library available? Otherwise, any tips to help me get started?

Update: My ultimate go

3条回答
  •  醉梦人生
    2021-02-15 17:39

    You might start by looking at peg.js which generates javascript code to parse a grammar given as input. Details avalable here https://pegjs.org/

    Then yo would need to write or find a grammar for the header files you want to parse.

提交回复
热议问题