Stefano Sanfilippo
5d043566dc
Turn main into an ordinary function.
2015-03-06 13:40:40 +01:00
Stefano Sanfilippo
b0a01d2fb7
Decouple AST nodes from representation.
...
1. adding getters to all node properties.
2. extracting an Emitter interface.
3. moving all C++ codegen features to a CppEmitter.
All list template specializations typedefs have been removed for
increased readability.
A dependency on Boost is introduced for boost::optional,
which is required in the AST getters API.
2015-03-05 01:16:40 +01:00
Stefano Sanfilippo
9c0a2573c3
Adding simple module dependency analysis.
...
Addresses #14
2014-12-10 20:38:32 +01:00
Stefano Sanfilippo
eb072a063d
Do not wrap simple expressions in braces.
2014-12-10 19:50:51 +01:00
Stefano Sanfilippo
7d615b91a5
Adding missing header for assert(), not in ns std::.
...
Closes #13
2014-12-05 01:28:08 +01:00
Stefano Sanfilippo
c4dd6e3c6b
Removing extra \n when no functions are defined.
2014-12-02 16:28:01 +01:00
Stefano Sanfilippo
2f66c31729
Getting rid of explicit stacks with more left-recursive rules.
...
As a result, the grammar should be more readable.
2014-12-02 16:22:03 +01:00
Stefano Sanfilippo
8e80aa4969
Show the variable name when asking the user for some input.
2014-12-02 01:36:50 +01:00
Stefano Sanfilippo
36de368b19
Enclose output expression in ().
2014-11-30 13:40:08 +01:00
Stefano Sanfilippo
0a49ccfeca
Emitting prototypes for all declared functions.
2014-11-30 13:05:59 +01:00
Stefano Sanfilippo
76a4e3d7f2
Adding support for functions.
2014-11-30 13:03:45 +01:00
Stefano Sanfilippo
335802c667
Fix license header.
2014-11-29 21:38:52 +01:00
Stefano Sanfilippo
971079b89d
Adding GPLv3 license.
2014-11-29 00:47:50 +01:00
Stefano Sanfilippo
57defac719
Refactoring: less indents.
2014-11-28 20:19:19 +01:00
Stefano Sanfilippo
b31feeb4ea
Adding operator << for Type enum.
2014-11-28 20:18:50 +01:00
Stefano Sanfilippo
3facc1c9d4
Getting rid of last C leftovers.
2014-11-28 00:01:24 +01:00
Stefano Sanfilippo
d0f3d30643
Fixing two NPEs in case of missing else and missing main.
2014-11-27 22:10:10 +01:00
Stefano Sanfilippo
ce513643da
Strongly typed enum for type tokens.
2014-11-27 21:53:25 +01:00
Stefano Sanfilippo
76ee587672
Use std::unique_ptr whenever possible.
2014-11-27 21:51:20 +01:00
Stefano Sanfilippo
5573307305
Removing redundant ;
2014-11-27 21:20:50 +01:00
Stefano Sanfilippo
7e9bc1a55e
Adding required headers on top of file.
2014-11-27 20:43:25 +01:00
Stefano Sanfilippo
c326de1131
Blank line after function definition.
2014-11-27 20:43:09 +01:00
Stefano Sanfilippo
37141d1e7a
Implementing AST nodes.
2014-11-27 20:01:06 +01:00