- Don't bother keeping track of uncompiled nodes in a special table. Use
the regular symbol table instead. This should in the future make
compiling nodes referenced deeper than (and before) their definitions
fairly straightforward.
- Also, break up the compiler's Message() function into Warn() and Error()
and get rid of zcc_errors.h. I can't really see having a set of error
numbers being useful.
- Added new state options that DECORATE got to the lemon parser.
- Enable token generation for state options. They were previously not
generated, so the grammar treated them as function calls instead.
- Added ZCCCompiler class as a place to generate IR and symbols from an
AST. Right now, all it does is simplify constant expressions into
constant values.
- Do type promotion on the AST where appropriate.
- Added true and false tokens to the parser driver.
- Instead of representating enumeration values with a special node type,
use the same ZCC_ConstantDef nodes that const_def produces. These are
created at the same scope as the ZCC_Enum, rather than being contained
entirely within it. To mark the end of enums for a single instance of
ZCC_Enum, a ZCC_EnumTerminator node is now appended to the chain of
ZCC_ConstantDefs.
- Instead of having ZCC_ExprString, ZCC_ExprInt, and ZCC_ExprFloat,
just use a single ZCC_ExprConstant. It should simplify type
promotion and constant folding in the future.
- More forced line breaks.
- Don't use extra parentheses in places where it can still be unambiguous
without them.
- Don't print the UserType for basic-types that aren't ZCC_UserType.
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)