Skip to content

Releases: iiicp/lcc

improve error diagnostic

03 Mar 17:19
Compare
Choose a tag to compare

1, Add a diagnostic engine
2,An error was encountered during the parsing process, and the parser will still continue

eg: output the following error

[Parser.cc:274]:../tests/c/decl_09.c:1:1: error: expect storage class or type specifier or qualifier
main(void) {
^
[Parser.cc:2141]:../tests/c/decl_09.c:5:9: error: the beginning of external declaration
int f();{}
        ^
[Parser.cc:2053]:../tests/c/decl_09.c:8:9: error: expect semi after this
  int a:12
        ^

lcc-v0.3

08 Feb 11:39
Compare
Choose a tag to compare

features:
support almost c99 features
add dumpTokens and dumpAst option
you can ./lcc --dumpTokens test.c or ./lcc --dumpAst test.c or ./lcc --dumpTokens --dumpAst test.c

bug fix:
1, fix typedef
2, fix complex function declarator
3, improve declarator and abstract declarator

lcc-v0.2

29 Jan 14:51
Compare
Choose a tag to compare

V0.2 upadte

  1. 重构C语言词法解析,改成了状态机的方式(unicode字符和L字符暂不支持)
  2. 支持几乎所有的语法结点解析,除了K&&R函数声明
例如以下的代码声明是,C89之前的标准。不计划支持。
void t(a,b)int a, int b {} 

lcc-v0.1

06 Nov 07:40
Compare
Choose a tag to compare

1, 支持mac/linux/windows构建
2, 能够运行一些简单的C程序

功能列表
https://github.com/iiicp/lcc/wiki/lcc-v0.1