Commit Graph

  • 4c4ff597e6 Add goto and labeled statement Rui Ueyama 2019-08-15 14:57:36 +09:00
  • e464458b97 Add continue statement Rui Ueyama 2019-08-15 14:04:51 +09:00
  • fb31bad4cf Add break statement Rui Ueyama 2019-08-15 13:48:41 +09:00
  • 63f9e536d1 Add a notion of an incomplete struct type Rui Ueyama 2019-08-15 11:28:03 +09:00
  • 2c121830d3 Implement array-to-pointer decay in the func param context Rui Ueyama 2019-08-14 11:00:05 +09:00
  • 13dd809190 Add a notion of an incomplete array type Rui Ueyama 2019-08-13 21:03:20 +09:00
  • 4f07c7e167 Add && and || operators Rui Ueyama 2019-08-13 20:10:23 +09:00
  • 1ee4aed1f8 Add |, & and ^ operators Rui Ueyama 2019-08-13 19:54:37 +09:00
  • 989e7eabb1 Add ~ operator Rui Ueyama 2019-08-13 19:41:11 +09:00
  • 3bd2f40b82 Add ! operator Rui Ueyama 2019-08-13 19:31:04 +09:00
  • 01a451653c Add +=, -=, *= and /= operators Rui Ueyama 2019-08-13 18:04:08 +09:00
  • e8fb5f1500 Add ++ and -- operators Rui Ueyama 2019-08-12 12:12:42 +09:00
  • a628e0d7c6 Add comma operator Rui Ueyama 2019-08-12 10:29:17 +09:00
  • 9c9cbacc20 Add examples/nqueen.c Rui Ueyama 2019-08-11 22:55:07 +09:00
  • b8c3c8d3df Allow for-loops to define local variables Rui Ueyama 2019-08-11 22:53:26 +09:00
  • f282f6f181 Add block-scope global variable, a.k.a. static local variable Rui Ueyama 2019-08-11 20:40:48 +09:00
  • 898feaba67 Add enum Rui Ueyama 2019-08-11 19:59:27 +09:00
  • f29b04b32e Add function declaration Rui Ueyama 2019-08-11 16:28:21 +09:00
  • eb0c092d9d Handle function return type correctly Rui Ueyama 2019-08-11 16:27:43 +09:00
  • e28e2cbd12 Add char literal Rui Ueyama 2019-08-11 16:06:14 +09:00
  • b7efb0f5f7 Add type cast Rui Ueyama 2019-08-11 15:24:40 +09:00
  • f8f0508834 Fix large literal number's type Rui Ueyama 2019-08-11 15:04:35 +09:00
  • 2f394eb800 Make sizeof to accept not only an expression but also a typename Rui Ueyama 2019-08-11 14:12:01 +09:00
  • 1b8715cde6 Handle complex type declarations correctly Rui Ueyama 2019-08-11 11:04:36 +09:00
  • df52150246 Add _Bool type Rui Ueyama 2019-08-11 10:18:55 +09:00
  • 95781b8d80 Add void type Rui Ueyama 2019-08-11 09:53:31 +09:00
  • 2e6dbb051f Add a return type to a function Rui Ueyama 2019-08-11 09:30:00 +09:00
  • f27e866b72 Support nested type declarators, e.g., "int (*x)[3]" Rui Ueyama 2019-08-10 23:05:37 +09:00
  • 12fbefa47e Add short and long types Rui Ueyama 2019-08-09 10:29:42 +09:00
  • b0ae168045 Change the size of int from 8 to 4 Rui Ueyama 2019-08-09 10:12:23 +09:00
  • 3af44cefa6 Add typedef Rui Ueyama 2019-08-09 08:46:41 +09:00
  • 4d07786d4d Add "->" operator Rui Ueyama 2019-08-09 08:05:53 +09:00
  • 3b91b4f817 Support struct tags Rui Ueyama 2019-08-09 07:30:00 +09:00
  • 9dc38e71dd Align local variables Rui Ueyama 2019-08-09 00:10:31 +09:00
  • 2ba17c55b0 Align struct members correctly Rui Ueyama 2019-08-09 00:04:18 +09:00
  • 0385d25a9d Add struct Rui Ueyama 2019-08-08 22:43:58 +09:00
  • 91fbea423d Rewrite tests in shell script in C Rui Ueyama 2019-08-07 10:17:26 +09:00
  • 5346339ae9 Handle block scope Rui Ueyama 2019-08-07 09:25:19 +09:00
  • 81403b2d99 Add line and block comments Rui Ueyama 2019-08-07 08:56:28 +09:00
  • 6a62177536 Read code from a file instead of argv[1] Rui Ueyama 2019-08-07 08:30:06 +09:00
  • 9a810d6593 Add GNU expression statement Rui Ueyama 2019-08-07 08:05:18 +09:00
  • ff171ad6db Add \a, \b, \t, \n \v, \f, \r, \e and \0 Rui Ueyama 2019-08-06 22:36:19 +09:00
  • a1e2f21e94 Add string literal Rui Ueyama 2019-08-06 20:49:57 +09:00
  • 87a9d298e1 Add char type Rui Ueyama 2019-08-06 20:10:55 +09:00
  • 97935ca2fa Add global variables Rui Ueyama 2019-08-06 19:44:47 +09:00
  • 30d530831f Add "sizeof" operator Rui Ueyama 2019-08-06 18:44:53 +09:00
  • c97aa80173 Add [] operator Rui Ueyama 2019-08-06 18:14:53 +09:00
  • f5536961e8 Support arrays including multi-dimensional ones Rui Ueyama 2019-08-05 23:30:35 +09:00
  • 0d0358fc85 Add keyword "int" and make variable definition mandatory Rui Ueyama 2019-08-05 22:44:44 +09:00
  • 1813fe470e Annotate AST nodes with types Rui Ueyama 2019-08-05 22:30:34 +09:00
  • 80ed7c4258 Add unary & and * Rui Ueyama 2019-08-05 21:12:44 +09:00
  • f4616bb0f5 Add a representative node to each Node to improve error messages Rui Ueyama 2019-08-05 20:53:58 +09:00
  • 3973698139 Support function definition up to 6 parameters Rui Ueyama 2019-08-04 19:47:41 +09:00
  • 004b0fd8d2 Support zero-arity function definition Rui Ueyama 2019-08-04 19:16:16 +09:00
  • aedbf56c3a Make sure that stack frames are aligned to 16 bytes boundaries Rui Ueyama 2019-08-05 08:35:49 +09:00
  • 5dea368205 Support function call with up to 6 arguments Rui Ueyama 2019-08-04 19:03:46 +09:00
  • f5540b578e Support zero-arity function calls Rui Ueyama 2019-08-04 18:25:20 +09:00
  • cbb9bd0e1a Add LICENSE and README.md Rui Ueyama 2019-08-04 18:07:31 +09:00
  • 8eea2ec3a8 Add { ... } Rui Ueyama 2019-08-04 17:55:33 +09:00
  • 801ee65d81 Add "for" statement Rui Ueyama 2019-08-04 17:35:53 +09:00
  • a072d39871 Add "while" statement Rui Ueyama 2019-08-04 17:24:03 +09:00
  • ead8dc6996 Add "if" statement Rui Ueyama 2019-08-04 17:12:59 +09:00
  • 8a8a35b924 Support multi-letter local variables Rui Ueyama 2019-08-04 15:21:44 +09:00
  • 97a255d2d3 Support single-letter local variables Rui Ueyama 2019-08-03 19:05:07 +09:00
  • 74a759540c Add the notion of the expression statement Rui Ueyama 2019-08-03 19:00:00 +09:00
  • 5124ded8ea Add "return" statement Rui Ueyama 2019-08-03 18:30:00 +09:00
  • b4ff70045f Accept multiple statements separated by semicolons Rui Ueyama 2019-08-03 18:00:00 +09:00
  • 3396747fcb Split main.c into multiple small files Rui Ueyama 2019-08-03 17:17:13 +09:00
  • 6ddba4be5f Add ==, !=, <= and >= operators Rui Ueyama 2019-08-03 16:15:23 +09:00
  • bb5fe99dba Add unary plus and minus Rui Ueyama 2019-08-03 15:41:40 +09:00
  • 3c1e383100 Add *, / and () Rui Ueyama 2019-08-03 15:36:43 +09:00
  • c6ff1d98a1 Improve error message Rui Ueyama 2019-08-03 15:02:08 +09:00
  • ef6d1791eb Add a tokenizer to allow space characters between tokens Rui Ueyama 2019-08-03 12:36:06 +09:00
  • afc9e8f05f Add + and - operators Rui Ueyama 2019-08-03 12:20:08 +09:00
  • 4bc98b4ec4 Accept void as a parameter list Rui Ueyama 2019-08-20 08:30:43 +09:00
  • 8f296f307e Allow global variable initializer to have an addend Rui Ueyama 2019-08-20 07:27:31 +09:00
  • aada5f04d2 Add string literal initializer for global variable Rui Ueyama 2019-08-19 21:40:11 +09:00
  • 2f218ca269 Skip excess initializer elements Rui Ueyama 2019-08-19 08:35:11 +09:00
  • 490f01b935 Allow parentheses in initializers to be omitted Rui Ueyama 2019-08-19 06:53:50 +09:00
  • 042d671cd9 Add array and struct initializers for global variables Rui Ueyama 2019-08-18 20:35:17 +09:00
  • 5b0e79f99a Add scalar global initializer Rui Ueyama 2019-08-18 19:12:02 +09:00
  • 4fc741d109 Handle struct initializers for local variables Rui Ueyama 2019-08-18 17:56:36 +09:00
  • b15b929b53 Allow array length to be omitted if an initializer is given Rui Ueyama 2019-08-18 16:47:44 +09:00
  • 15ee521156 Add string literal initializer Rui Ueyama 2019-08-18 16:34:39 +09:00
  • e3331d8cb3 Initialize excess array elements with zero Rui Ueyama 2019-08-18 16:11:11 +09:00
  • e1b12f2c3d Support local variable initializers Rui Ueyama 2019-08-18 12:01:02 +09:00
  • 8a90e2c51f Add constant expression Rui Ueyama 2019-08-17 10:38:20 +09:00
  • 0f367201b1 Add ?: operator Rui Ueyama 2019-08-17 10:27:35 +09:00
  • 55d24d049b Add <<, >>, <<= and >>= Rui Ueyama 2019-08-16 13:45:24 +09:00
  • 8a207a4dc7 Allow functions returning void Rui Ueyama 2019-08-15 17:21:15 +09:00
  • f3bdaefbc8 Add switch-case Rui Ueyama 2019-08-15 16:43:24 +09:00
  • 3ccdb2974f Add goto and labeled statement Rui Ueyama 2019-08-15 14:57:36 +09:00
  • 08f3970c58 Add continue statement Rui Ueyama 2019-08-15 14:04:51 +09:00
  • afd829689f Add break statement Rui Ueyama 2019-08-15 13:48:41 +09:00
  • 6f59ac376a Add a notion of an incomplete struct type Rui Ueyama 2019-08-15 11:28:03 +09:00
  • ed316955a8 Implement array-to-pointer decay in the func param context Rui Ueyama 2019-08-14 11:00:05 +09:00
  • 6f24dbde5b Add a notion of an incomplete array type Rui Ueyama 2019-08-13 21:03:20 +09:00
  • 42f6075787 Add && and || operators Rui Ueyama 2019-08-13 20:10:23 +09:00
  • 2586416967 Add |, & and ^ operators Rui Ueyama 2019-08-13 19:54:37 +09:00
  • 03acdd2ed9 Add ~ operator Rui Ueyama 2019-08-13 19:41:11 +09:00