简体   繁体   中英

Flex/Bison based lexer/parser for C language

Is there a simple lexer/parser for C language or a subset of it which is based on Flex/Bison?

I have found some open source parsers for C (TCC, LCC, ...) but none of them are based on bison.

There is a C11 grammar for YACC (a predecessor of Bison), it should work with Bison (maybe some tweaks will be needed).

GCC used to be based on Bison a long ago. GCC 3.4 source code contains a file with C grammar.

是使用bison / flex的C子集的编译器的实现。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM