├── .circleci └── config.yml ├── .gitignore ├── LICENSE ├── README.md ├── Setup.hs ├── app └── Main.hs ├── doc └── BNF.txt ├── example ├── add.ctn ├── add2.ctn ├── calc.ctn ├── closure.ctn ├── fact.ctn ├── function.ctn ├── global.ctn ├── if.ctn ├── innner_def.ctn ├── multi_args.ctn ├── nest_def.ctn ├── nest_fact.ctn ├── ref │ ├── ref1.ctn │ ├── ref2.ctn │ ├── ref3.ctn │ ├── ref4.ctn │ ├── ref5.ctn │ ├── ref6.ctn │ ├── ref7.ctn │ └── ref8.ctn └── var.ctn ├── package.yaml ├── src ├── Cotton.hs └── Cotton │ ├── Alpha.hs │ ├── Closure.hs │ ├── KNormalize.hs │ ├── LLVM.hs │ ├── Lexer.x │ ├── Parser.y │ ├── Stmt.hs │ ├── Type.hs │ ├── Type │ └── Type.hs │ └── Util.hs ├── stack.yaml └── test ├── Spec.hs └── Spec └── Lexer.hs /.circleci/config.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/.circleci/config.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/README.md -------------------------------------------------------------------------------- /Setup.hs: -------------------------------------------------------------------------------- 1 | import Distribution.Simple 2 | main = defaultMain 3 | -------------------------------------------------------------------------------- /app/Main.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/app/Main.hs -------------------------------------------------------------------------------- /doc/BNF.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/doc/BNF.txt -------------------------------------------------------------------------------- /example/add.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/add.ctn -------------------------------------------------------------------------------- /example/add2.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/add2.ctn -------------------------------------------------------------------------------- /example/calc.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/calc.ctn -------------------------------------------------------------------------------- /example/closure.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/closure.ctn -------------------------------------------------------------------------------- /example/fact.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/fact.ctn -------------------------------------------------------------------------------- /example/function.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/function.ctn -------------------------------------------------------------------------------- /example/global.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/global.ctn -------------------------------------------------------------------------------- /example/if.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/if.ctn -------------------------------------------------------------------------------- /example/innner_def.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/innner_def.ctn -------------------------------------------------------------------------------- /example/multi_args.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/multi_args.ctn -------------------------------------------------------------------------------- /example/nest_def.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/nest_def.ctn -------------------------------------------------------------------------------- /example/nest_fact.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/nest_fact.ctn -------------------------------------------------------------------------------- /example/ref/ref1.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/ref/ref1.ctn -------------------------------------------------------------------------------- /example/ref/ref2.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/ref/ref2.ctn -------------------------------------------------------------------------------- /example/ref/ref3.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/ref/ref3.ctn -------------------------------------------------------------------------------- /example/ref/ref4.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/ref/ref4.ctn -------------------------------------------------------------------------------- /example/ref/ref5.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/ref/ref5.ctn -------------------------------------------------------------------------------- /example/ref/ref6.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/ref/ref6.ctn -------------------------------------------------------------------------------- /example/ref/ref7.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/ref/ref7.ctn -------------------------------------------------------------------------------- /example/ref/ref8.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/ref/ref8.ctn -------------------------------------------------------------------------------- /example/var.ctn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/example/var.ctn -------------------------------------------------------------------------------- /package.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/package.yaml -------------------------------------------------------------------------------- /src/Cotton.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/src/Cotton.hs -------------------------------------------------------------------------------- /src/Cotton/Alpha.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/src/Cotton/Alpha.hs -------------------------------------------------------------------------------- /src/Cotton/Closure.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/src/Cotton/Closure.hs -------------------------------------------------------------------------------- /src/Cotton/KNormalize.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/src/Cotton/KNormalize.hs -------------------------------------------------------------------------------- /src/Cotton/LLVM.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/src/Cotton/LLVM.hs -------------------------------------------------------------------------------- /src/Cotton/Lexer.x: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/src/Cotton/Lexer.x -------------------------------------------------------------------------------- /src/Cotton/Parser.y: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/src/Cotton/Parser.y -------------------------------------------------------------------------------- /src/Cotton/Stmt.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/src/Cotton/Stmt.hs -------------------------------------------------------------------------------- /src/Cotton/Type.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/src/Cotton/Type.hs -------------------------------------------------------------------------------- /src/Cotton/Type/Type.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/src/Cotton/Type/Type.hs -------------------------------------------------------------------------------- /src/Cotton/Util.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/src/Cotton/Util.hs -------------------------------------------------------------------------------- /stack.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/stack.yaml -------------------------------------------------------------------------------- /test/Spec.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/test/Spec.hs -------------------------------------------------------------------------------- /test/Spec/Lexer.hs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliza0x/cotton/HEAD/test/Spec/Lexer.hs --------------------------------------------------------------------------------