metafrastis.git
6 years agoFixed parenting bug somewhere in a hackish manner. master
ethereal [Mon, 15 Apr 2013 20:16:03 +0000 (14:16 -0600)]
Fixed parenting bug somewhere in a hackish manner.

6 years agoRemoved `Opening log file' message.
ethereal [Mon, 15 Apr 2013 19:19:31 +0000 (13:19 -0600)]
Removed `Opening log file' message.

6 years agoMinor fixes, added --disable-opt.
ethereal [Mon, 15 Apr 2013 18:54:06 +0000 (12:54 -0600)]
Minor fixes, added --disable-opt.

6 years agoFixed several bugs here and there.
ethereal [Mon, 15 Apr 2013 10:22:31 +0000 (04:22 -0600)]
Fixed several bugs here and there.

6 years agoAdded run-time division-by-zero check.
ethereal [Mon, 15 Apr 2013 05:45:08 +0000 (23:45 -0600)]
Added run-time division-by-zero check.

6 years agoMade getchar() return -1 on EOF.
ethereal [Mon, 15 Apr 2013 05:30:09 +0000 (23:30 -0600)]
Made getchar() return -1 on EOF.

6 years agoRemoved old debugging information.
ethereal [Mon, 15 Apr 2013 05:25:27 +0000 (23:25 -0600)]
Removed old debugging information.

6 years agoFixed code generation (addCode/addLine calls) and printi.
ethereal [Mon, 15 Apr 2013 05:15:08 +0000 (23:15 -0600)]
Fixed code generation (addCode/addLine calls) and printi.

6 years agoAdded getchar() function to RTS.
ethereal [Mon, 15 Apr 2013 02:04:04 +0000 (20:04 -0600)]
Added getchar() function to RTS.

6 years agoVarious changes.
ethereal [Sat, 13 Apr 2013 06:41:15 +0000 (00:41 -0600)]
Various changes.

6 years agoUpdated builtins/code gen to work with semihosting.
ethereal [Thu, 4 Apr 2013 05:17:42 +0000 (23:17 -0600)]
Updated builtins/code gen to work with semihosting.

6 years agoAdd fortoggen dead-branch pass.
ethereal [Wed, 3 Apr 2013 23:06:59 +0000 (17:06 -0600)]
Add fortoggen dead-branch pass.

6 years agoStarted working on redundant-assignment elimination.
ethereal [Wed, 3 Apr 2013 23:06:28 +0000 (17:06 -0600)]
Started working on redundant-assignment elimination.

6 years agoImplemented dead code removal.
ethereal [Tue, 2 Apr 2013 13:59:32 +0000 (07:59 -0600)]
Implemented dead code removal.

Now for dead branch detection.

6 years agoImplemented control-flow graph generation and dead code detection.
ethereal [Tue, 2 Apr 2013 06:37:26 +0000 (00:37 -0600)]
Implemented control-flow graph generation and dead code detection.

Nothing is currently done with the detected dead code.

6 years agoFixed bug in RelationalExpressionNode.
ethereal [Tue, 2 Apr 2013 03:23:19 +0000 (21:23 -0600)]
Fixed bug in RelationalExpressionNode.

6 years agoReplaced Prometheus overlay infrastructure with general version.
ethereal [Tue, 2 Apr 2013 02:10:23 +0000 (20:10 -0600)]
Replaced Prometheus overlay infrastructure with general version.

See Tree::Overlay for details; this version uses variadic templates and is
hence rather C++11-heavy.

6 years agoCreated new `optimizer' source subtree.
ethereal [Mon, 1 Apr 2013 20:10:16 +0000 (14:10 -0600)]
Created new `optimizer' source subtree.

6 years agoAdded missing fold test file.
ethereal [Mon, 1 Apr 2013 16:21:10 +0000 (10:21 -0600)]
Added missing fold test file.

6 years agoImplemented basic literal folding in Prometheus.
ethereal [Mon, 1 Apr 2013 16:10:45 +0000 (10:10 -0600)]
Implemented basic literal folding in Prometheus.

May want to move the isLiteral() into a Prometheus overlay.

6 years agoFinal work in prep for milestone 3.
ethereal [Fri, 15 Mar 2013 18:22:10 +0000 (12:22 -0600)]
Final work in prep for milestone 3.

6 years agoChanged debug strings.
ethereal [Mon, 11 Mar 2013 16:02:01 +0000 (10:02 -0600)]
Changed debug strings.

6 years agoWorked on milestone 3 compliance.
ethereal [Sat, 9 Mar 2013 04:19:30 +0000 (21:19 -0700)]
Worked on milestone 3 compliance.

All that remains is to double-check everything and then select which test
cases will be used.

6 years agoAdded another parser test for milestone 2.
ethereal [Fri, 15 Feb 2013 19:26:32 +0000 (12:26 -0700)]
Added another parser test for milestone 2.

6 years agoChanges required for milestone 2 submission.
ethereal [Fri, 15 Feb 2013 18:52:29 +0000 (11:52 -0700)]
Changes required for milestone 2 submission.

6 years agoMade TokenDumper output even more via cout.
ethereal [Fri, 1 Feb 2013 06:20:31 +0000 (23:20 -0700)]
Made TokenDumper output even more via cout.

6 years agoMinor modifications before submission.
ethereal [Fri, 1 Feb 2013 06:04:04 +0000 (23:04 -0700)]
Minor modifications before submission.

6 years agoChanged default run mode.
ethereal [Fri, 1 Feb 2013 05:08:52 +0000 (22:08 -0700)]
Changed default run mode.

6 years agoMore doc comments, fixed all warnings.
ethereal [Fri, 1 Feb 2013 04:59:07 +0000 (21:59 -0700)]
More doc comments, fixed all warnings.

6 years agoMade TokenDumper use Message() instead of cout.
ethereal [Fri, 1 Feb 2013 04:14:09 +0000 (21:14 -0700)]
Made TokenDumper use Message() instead of cout.

6 years agoVarious small changes to pass more test cases.
ethereal [Fri, 1 Feb 2013 00:04:38 +0000 (17:04 -0700)]
Various small changes to pass more test cases.

6 years agoAdded some documentation to lexer.
ethereal [Tue, 29 Jan 2013 16:21:22 +0000 (09:21 -0700)]
Added some documentation to lexer.

6 years agoMade multiline comments enabled only when configured.
ethereal [Mon, 28 Jan 2013 17:41:11 +0000 (10:41 -0700)]
Made multiline comments enabled only when configured.

6 years agoFixed several string-related bugs.
ethereal [Fri, 25 Jan 2013 17:48:46 +0000 (10:48 -0700)]
Fixed several string-related bugs.

6 years agoImplemented printi builtin function.
ethereal [Fri, 25 Jan 2013 04:54:50 +0000 (21:54 -0700)]
Implemented printi builtin function.

6 years agoCleaned up code a little bit.
ethereal [Fri, 25 Jan 2013 04:07:55 +0000 (21:07 -0700)]
Cleaned up code a little bit.

6 years agoImplemented //-style comments, shortlog output style.
ethereal [Wed, 23 Jan 2013 17:14:33 +0000 (10:14 -0700)]
Implemented //-style comments, shortlog output style.

6 years agoSome small changes to lexer, error-reporting, etc.
ethereal [Wed, 23 Jan 2013 16:54:54 +0000 (09:54 -0700)]
Some small changes to lexer, error-reporting, etc.

6 years agoprints/string support should be finished.
ethereal [Tue, 22 Jan 2013 17:31:47 +0000 (10:31 -0700)]
prints/string support should be finished.

6 years agoChanged arguments to use hyphens in names instead of underscores.
ethereal [Tue, 22 Jan 2013 16:11:50 +0000 (09:11 -0700)]
Changed arguments to use hyphens in names instead of underscores.

6 years agoImplemented prints() assembly.
ethereal [Tue, 22 Jan 2013 05:21:00 +0000 (22:21 -0700)]
Implemented prints() assembly.

6 years agoStarted to implement built-in functionality.
ethereal [Tue, 22 Jan 2013 05:01:55 +0000 (22:01 -0700)]
Started to implement built-in functionality.

6 years agoAdded support for global variables.
ethereal [Mon, 21 Jan 2013 06:46:15 +0000 (23:46 -0700)]
Added support for global variables.

6 years agoImplemented loops and break statements.
ethereal [Mon, 21 Jan 2013 05:15:45 +0000 (22:15 -0700)]
Implemented loops and break statements.

6 years agoAdded some main function-related checks.
ethereal [Mon, 21 Jan 2013 04:41:17 +0000 (21:41 -0700)]
Added some main function-related checks.

6 years agoFixed return-presence pass to work with conditionals.
ethereal [Mon, 21 Jan 2013 04:33:50 +0000 (21:33 -0700)]
Fixed return-presence pass to work with conditionals.

6 years agoAdded return-presence check pass.
ethereal [Mon, 21 Jan 2013 04:30:01 +0000 (21:30 -0700)]
Added return-presence check pass.

6 years agoRemoved 4,096-byte limit from yystring.
ethereal [Mon, 21 Jan 2013 03:16:20 +0000 (20:16 -0700)]
Removed 4,096-byte limit from yystring.

6 years agoRemoved unnecessary T_NUMBER rule from lexer.
ethereal [Mon, 21 Jan 2013 02:55:21 +0000 (19:55 -0700)]
Removed unnecessary T_NUMBER rule from lexer.

6 years agoUpdated CMake buildsystem generator.
ethereal [Mon, 21 Jan 2013 02:47:16 +0000 (19:47 -0700)]
Updated CMake buildsystem generator.

6 years agoChanged token dumper line/col to be 1-indexed.
ethereal [Mon, 21 Jan 2013 02:43:14 +0000 (19:43 -0700)]
Changed token dumper line/col to be 1-indexed.

6 years agoAdded token source to TokenDumper.
ethereal [Mon, 21 Jan 2013 02:31:33 +0000 (19:31 -0700)]
Added token source to TokenDumper.

6 years agoImplemented token dumper.
ethereal [Mon, 21 Jan 2013 02:26:17 +0000 (19:26 -0700)]
Implemented token dumper.

6 years agoChanged lexer/parser to not use any chars, only tokens.
ethereal [Mon, 21 Jan 2013 02:13:11 +0000 (19:13 -0700)]
Changed lexer/parser to not use any chars, only tokens.

6 years agoFinished return statements.
ethereal [Mon, 21 Jan 2013 01:38:50 +0000 (18:38 -0700)]
Finished return statements.

Fibonacci generator now works!

6 years agoFixed variable assignment stack offsets.
ethereal [Mon, 21 Jan 2013 00:22:47 +0000 (17:22 -0700)]
Fixed variable assignment stack offsets.

6 years agoAdded support for comments and escaped chars in lexer.
ethereal [Mon, 21 Jan 2013 00:14:45 +0000 (17:14 -0700)]
Added support for comments and escaped chars in lexer.

6 years agoImplemented else conditionals.
ethereal [Sun, 20 Jan 2013 23:49:01 +0000 (16:49 -0700)]
Implemented else conditionals.

6 years agoImplemented support for if statements.
ethereal [Sun, 20 Jan 2013 23:46:11 +0000 (16:46 -0700)]
Implemented support for if statements.

6 years agoAdded code generation for boolean expression evaluation.
ethereal [Sun, 20 Jan 2013 23:25:32 +0000 (16:25 -0700)]
Added code generation for boolean expression evaluation.

6 years agoImplemented function calls properly.
ethereal [Sun, 20 Jan 2013 22:40:27 +0000 (15:40 -0700)]
Implemented function calls properly.

6 years agoImplemented simple code generation for addition/multiplication.
ethereal [Sun, 20 Jan 2013 19:22:18 +0000 (12:22 -0700)]
Implemented simple code generation for addition/multiplication.

Next up: function calls.

6 years agoImplemented Prometheus overlay system, variable memory allocator.
ethereal [Fri, 18 Jan 2013 20:32:15 +0000 (13:32 -0700)]
Implemented Prometheus overlay system, variable memory allocator.

6 years agoAdded some extra ad-hominem messages.
ethereal [Fri, 18 Jan 2013 18:26:17 +0000 (11:26 -0700)]
Added some extra ad-hominem messages.

6 years agoAdd forgotten extern declaration.
ethereal [Fri, 18 Jan 2013 18:20:12 +0000 (11:20 -0700)]
Add forgotten extern declaration.

6 years agoStarted working on new generator architecture.
ethereal [Fri, 18 Jan 2013 17:26:41 +0000 (10:26 -0700)]
Started working on new generator architecture.

6 years agoStarted working on memory allocation.
ethereal [Thu, 17 Jan 2013 17:15:48 +0000 (10:15 -0700)]
Started working on memory allocation.

6 years agoCommit forgotten changes to CMakeLists.txt.
ethereal [Wed, 16 Jan 2013 16:34:46 +0000 (09:34 -0700)]
Commit forgotten changes to CMakeLists.txt.

6 years agoAdded CMake supporting files for older versions of CMake.
ethereal [Wed, 16 Jan 2013 16:34:07 +0000 (09:34 -0700)]
Added CMake supporting files for older versions of CMake.

6 years agoAdded return-type checking pass.
ethereal [Wed, 16 Jan 2013 16:01:30 +0000 (09:01 -0700)]
Added return-type checking pass.

6 years agoImplemented expression type-checking pass.
ethereal [Wed, 16 Jan 2013 15:21:29 +0000 (08:21 -0700)]
Implemented expression type-checking pass.

6 years agoFixed FlattenPass!
ethereal [Wed, 16 Jan 2013 06:30:19 +0000 (23:30 -0700)]
Fixed FlattenPass!

Now for some semantic checking.

6 years agoImplemented TreeDumper.
ethereal [Wed, 16 Jan 2013 06:16:49 +0000 (23:16 -0700)]
Implemented TreeDumper.

6 years agoChanged some types to use InternalExpressionNode.
ethereal [Wed, 16 Jan 2013 04:41:25 +0000 (21:41 -0700)]
Changed some types to use InternalExpressionNode.

The AST flattening is not finished and needs a rewrite, sigh.

6 years agoHopefully implemented AST flattening pass.
ethereal [Wed, 16 Jan 2013 03:12:41 +0000 (20:12 -0700)]
Hopefully implemented AST flattening pass.

6 years agoAdded InternalExpressionNode, an expression that has children.
ethereal [Wed, 16 Jan 2013 02:55:43 +0000 (19:55 -0700)]
Added InternalExpressionNode, an expression that has children.

6 years agoRemoved debugging informaiton.
ethereal [Tue, 15 Jan 2013 22:59:08 +0000 (15:59 -0700)]
Removed debugging informaiton.

6 years agoFixed double-visiting of nodes during tree walks.
ethereal [Tue, 15 Jan 2013 20:45:15 +0000 (13:45 -0700)]
Fixed double-visiting of nodes during tree walks.

6 years agoAdded expression node tree depth calculation.
ethereal [Tue, 15 Jan 2013 18:20:49 +0000 (11:20 -0700)]
Added expression node tree depth calculation.

6 years agoModified gitignore.
ethereal [Tue, 15 Jan 2013 17:33:14 +0000 (10:33 -0700)]
Modified gitignore.

6 years agoFixed (hopefully) VariablePass.
ethereal [Tue, 15 Jan 2013 17:29:21 +0000 (10:29 -0700)]
Fixed (hopefully) VariablePass.

6 years agoFixed new TreeWalker, ported ParentingPass.
ethereal [Tue, 15 Jan 2013 17:11:13 +0000 (10:11 -0700)]
Fixed new TreeWalker, ported ParentingPass.

6 years agoStarted converting to using NodeCast API and modifiable visitors.
ethereal [Tue, 15 Jan 2013 16:41:44 +0000 (09:41 -0700)]
Started converting to using NodeCast API and modifiable visitors.

6 years agoExpanded error reporting system slightly.
ethereal [Tue, 15 Jan 2013 05:32:20 +0000 (22:32 -0700)]
Expanded error reporting system slightly.

6 years agoStarted working on error reporting framework.
ethereal [Tue, 15 Jan 2013 05:10:06 +0000 (22:10 -0700)]
Started working on error reporting framework.

6 years agoRemoved some debugging information.
ethereal [Tue, 15 Jan 2013 03:42:02 +0000 (20:42 -0700)]
Removed some debugging information.

6 years agoMoved some common Pass-related code into a TreeWalker class.
ethereal [Tue, 15 Jan 2013 03:20:31 +0000 (20:20 -0700)]
Moved some common Pass-related code into a TreeWalker class.

6 years agoChanged auto-generation from parser.y to a new header.
ethereal [Mon, 14 Jan 2013 20:38:10 +0000 (13:38 -0700)]
Changed auto-generation from parser.y to a new header.

6 years agoMade parser.y auto-generated from template.
ethereal [Mon, 14 Jan 2013 18:44:54 +0000 (11:44 -0700)]
Made parser.y auto-generated from template.

6 years agoAdded boolean and relational expressions to AST.
ethereal [Mon, 14 Jan 2013 17:05:37 +0000 (10:05 -0700)]
Added boolean and relational expressions to AST.

6 years agoAdded arithemtical and assignment expression nodes.
ethereal [Mon, 14 Jan 2013 16:35:19 +0000 (09:35 -0700)]
Added arithemtical and assignment expression nodes.

Boolean and relational, and then the AST will be fully constructed.

6 years agoImplemented ArgvParser.
ethereal [Mon, 14 Jan 2013 15:17:25 +0000 (08:17 -0700)]
Implemented ArgvParser.

6 years agoImported configuration system.
ethereal [Mon, 14 Jan 2013 14:49:27 +0000 (07:49 -0700)]
Imported configuration system.

6 years agoAdded support for control flow AST construction.
ethereal [Mon, 14 Jan 2013 07:02:38 +0000 (00:02 -0700)]
Added support for control flow AST construction.

This includes if/else/while/break.

6 years agoFixed main function processing.
ethereal [Mon, 14 Jan 2013 06:26:45 +0000 (23:26 -0700)]
Fixed main function processing.

6 years agoFixed function scope parents.
ethereal [Mon, 14 Jan 2013 06:21:52 +0000 (23:21 -0700)]
Fixed function scope parents.

6 years agoVariables are now resolved within expressions.
ethereal [Mon, 14 Jan 2013 05:11:04 +0000 (22:11 -0700)]
Variables are now resolved within expressions.

6 years agoVariable declarations now work -- Symbol is added to Scope.
ethereal [Mon, 14 Jan 2013 04:34:16 +0000 (21:34 -0700)]
Variable declarations now work -- Symbol is added to Scope.

6 years agoThe scope parenting list is now set up correctly.
ethereal [Mon, 14 Jan 2013 04:09:25 +0000 (21:09 -0700)]
The scope parenting list is now set up correctly.

6 years agoAdded ExpressionWrapperNode.
ethereal [Mon, 14 Jan 2013 03:20:27 +0000 (20:20 -0700)]
Added ExpressionWrapperNode.

This means that FunctionCallNode is now an Expression instead of a Statement,
which allows it to be re-used for nested function calls.