Commit graph

13 commits

Author SHA1 Message Date
Randy Heit
f9f8d1e79b Add a type field for ZCC expressions.
- Constants can fill out the type field right away. Other expressions will need
  to wait until a later pass, after names have been resolved, so they get
  initialized to NULL.
2013-09-10 20:50:21 -05:00
Randy Heit
2823ea5de3 Annote AST nodes with source information 2013-08-28 22:59:03 -05:00
Randy Heit
67caf3303b Add the array size to ZCC_VarName 2013-07-23 19:59:47 -05:00
Randy Heit
aadd4e4de6 ZCCParseNode needs to initialize TopNode
- If the parsing is a complete failure, then TopNode won't ever be set to
  anything during the parsing process.
2013-07-23 18:38:57 -05:00
Randy Heit
6088acd4c0 Add function body to ZCC_FuncDeclarator 2013-07-10 23:26:56 -05:00
Randy Heit
2d139f3846 - DoParse() now writes out the parsed AST for the input file to <file>.ast.
Maybe TODO: Find a simple LISP pretty printer that isn't written in LISP so that the output
  isn't all on one big long line.
- zcc-parse.lemon now returns the complete AST through the parse state.
- Fixed crash in PrintEnumNode().

SVN r3773 (scripting)
2012-07-20 02:54:51 +00:00
Randy Heit
bee4c3e760 - Added functions for converting the AST to text. This is not hooked in anywhere yet, since
the parser currently just throws the AST away.

SVN r2969 (scripting)
2010-10-31 04:36:00 +00:00
Randy Heit
4b8900816b - Make the ZCC parser compilable again. Does every rule in the grammar that needs to appear in
the AST do so now? That would sure be nice.

SVN r2715 (scripting)
2010-09-08 04:32:31 +00:00
Randy Heit
12c6ddfbfb - So, progress...
SVN r2707 (scripting)
2010-09-07 04:11:32 +00:00
Randy Heit
081ebbb64b - I have decided to opt for simplicity over C-like-ness and group array sizes with the rest
of the type declaration rather than split it up after the variable name.
- More AST work. At this rate, maybe I'll finally be building a complete AST by the end of the
  month!

SVN r2499 (scripting)
2010-08-10 04:25:52 +00:00
Randy Heit
9d931ed10c - Make AST nodes for states.
SVN r2425 (scripting)
2010-07-11 18:53:41 +00:00
Randy Heit
85d869315b - More AST'ing about.
SVN r2359 (scripting)
2010-06-06 21:04:55 +00:00
Randy Heit
c043627cc1 - Some abstract syntax tree creation stuff. (Plus some tentative type creation stuff that made
me realize I would be better off creating a type-agnostic AST for the entire input instead
  of trying to tentatively create types before they're seen.)

SVN r2354 (scripting)
2010-06-06 04:15:28 +00:00