Commit Graph

20 Commits

Author SHA1 Message Date
Stefano Sanfilippo d7494702af Simplify the Expression hierarchy by moving the operator on the binary father.
As a consequence, the Emitter interface is greatly simplified.
2015-03-05 17:25:02 +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 0fb3ea5dd6 Moving pointer stuff to separater header. 2015-03-05 01:09:04 +01:00
Stefano Sanfilippo 9c0a2573c3 Adding simple module dependency analysis.
Addresses #14
2014-12-10 20:38:32 +01:00
Stefano Sanfilippo f148814087 g++ 4.6.x compatibility 2014-12-02 17:28:42 +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 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 b31feeb4ea Adding operator << for Type enum. 2014-11-28 20:18:50 +01:00
Stefano Sanfilippo 262508fafd Using Pointer type instead of std::unique_ptr
For now, it's just an alias.
2014-11-28 19:40:47 +01:00
Stefano Sanfilippo 015f8ae6d1 Renaming List to more meaningful PointerList. 2014-11-28 19:37:14 +01:00
Stefano Sanfilippo 7050c5586e Introducing auto-free List<T> in Node.hpp 2014-11-28 19:32:35 +01:00
Stefano Sanfilippo e93fef76f1 Freeing Function objects before destroying program. 2014-11-28 19:15:36 +01:00
Stefano Sanfilippo 3facc1c9d4 Getting rid of last C leftovers. 2014-11-28 00:01:24 +01:00
Stefano Sanfilippo 84199887a7 Close all memory leaks. 2014-11-27 23:52:21 +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 37141d1e7a Implementing AST nodes. 2014-11-27 20:01:06 +01:00