diff options
author | Justyna Att Ilczuk <justyna.ilczuk@gmail.com> | 2012-12-05 20:32:43 +0100 |
---|---|---|
committer | Justyna Att Ilczuk <justyna.ilczuk@gmail.com> | 2012-12-05 20:32:43 +0100 |
commit | c5cf3e2fc93a640c7d75fa007e094f3ed1dffa0b (patch) | |
tree | 434fb04fcdbddb523e44926c444b669fe56204bb | |
parent | 98c33d3ec16821d1628d1f60ea5d7eb1835e5a55 (diff) | |
download | sencha-lang-c5cf3e2fc93a640c7d75fa007e094f3ed1dffa0b.tar.gz sencha-lang-c5cf3e2fc93a640c7d75fa007e094f3ed1dffa0b.tar.bz2 sencha-lang-c5cf3e2fc93a640c7d75fa007e094f3ed1dffa0b.tar.xz sencha-lang-c5cf3e2fc93a640c7d75fa007e094f3ed1dffa0b.zip |
wtf git
69 files changed, 162 insertions, 364 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5761abc --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.o diff --git a/Sencha-lang/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree b/Sencha-lang/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree Binary files differdeleted file mode 100644 index 284ff48..0000000 --- a/Sencha-lang/.metadata/.plugins/org.eclipse.core.resources/.root/1.tree +++ /dev/null diff --git a/Sencha-lang/AST.cpp b/Sencha-lang/AST.cpp deleted file mode 100644 index d31be57..0000000 --- a/Sencha-lang/AST.cpp +++ /dev/null @@ -1,19 +0,0 @@ -/* - * AST.cpp - * - * Created on: Nov 4, 2012 - * Author: attero - */ -#include "AST.h" -#include "AllTypesOfASTNodes.h" - -AST::AST() { - root = new ASTProgram(); - current_node = root; - number_of_nodes = 1; - level_of_depth = 0; -} - -AST::~AST() { -} - diff --git a/Sencha-lang/AST.h b/Sencha-lang/AST.h deleted file mode 100644 index c29207e..0000000 --- a/Sencha-lang/AST.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * AST.h - * - * Created on: Nov 4, 2012 - * Author: attero - */ - -#ifndef AST_H_ -#define AST_H_ -#include "ASTNode.h" - -class AST { -public: - AST(); - ASTNode * root; - ASTNode * current_node; - int number_of_nodes; - int level_of_depth; - ASTNode * add_node(ASTNode * node); - virtual ~AST(); -}; - -#endif /* AST_H_ */ diff --git a/Sencha-lang/AST/ASTExpression.h b/Sencha-lang/AST/ASTExpression.h index 69010ae..df2c3d1 100644 --- a/Sencha-lang/AST/ASTExpression.h +++ b/Sencha-lang/AST/ASTExpression.h @@ -7,11 +7,13 @@ #ifndef ASTEXPRESSION_H_ #define ASTEXPRESSION_H_ +#include <string> #include "ASTNode.h" class ASTExpression : public ASTNode { public: - ASTExpression(); + + virtual int evaluate() = 0; virtual ~ASTExpression(); }; diff --git a/Sencha-lang/AST/ASTProgram.cpp b/Sencha-lang/AST/ASTProgram.cpp deleted file mode 100644 index 8b74923..0000000 --- a/Sencha-lang/AST/ASTProgram.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* - * ASTProgram.cpp - * - * Created on: Nov 5, 2012 - * Author: attero - */ - -#include "ASTProgram.h" - -ASTProgram::ASTProgram() { - // TODO Auto-generated constructor stub - -} - -ASTProgram::~ASTProgram() { - // TODO Auto-generated destructor stub -} - -void ASTProgram::execute() { - std::cout << "Program started!\n"; -} diff --git a/Sencha-lang/AST/ASTProgram.h b/Sencha-lang/AST/ASTProgram.h deleted file mode 100644 index f83bbf3..0000000 --- a/Sencha-lang/AST/ASTProgram.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * ASTProgram.h - * - * Created on: Nov 5, 2012 - * Author: attero - */ - -#ifndef ASTPROGRAM_H_ -#define ASTPROGRAM_H_ -#include <iostream> -#include "ASTNode.h" -#include "ASTStatement.h" - -class ASTProgram : public ASTNode { -public: - ASTProgram(); - ASTStatement * add_child(ASTStatement * node); - virtual ~ASTProgram(); - virtual void execute(); -}; - -#endif /* ASTPROGRAM_H_ */ diff --git a/Sencha-lang/AST/BasicExpression.cpp b/Sencha-lang/AST/BasicExpression.cpp new file mode 100644 index 0000000..5065de3 --- /dev/null +++ b/Sencha-lang/AST/BasicExpression.cpp @@ -0,0 +1,49 @@ +/* + * BasicExpression.cpp + * + * Created on: Dec 5, 2012 + * Author: attero + */ + +#include "BasicExpression.h" + +void BasicExpression::set_operator(std::string op) +{ + this->oper = op; +} + +void BasicExpression::set_left_operand(ASTNode * left) +{ + this->children[0] = left; + this->left = static_cast<ASTExpression *>(children[0]); +} + +void BasicExpression::set_right_operand(ASTNode * right) +{ + this->children[1] = right; + this->right = static_cast<ASTExpression *>(children[1]); +} + +virtual int BasicExpression::evaluate() +{ + if(oper == "+") + { + return left->evaluate() + right->evaluate(); + } + + return 0; +} + +BasicExpression::BasicExpression() { + // initialize pointers + this->add_children(0); + this->add_children(0); + left = static_cast<ASTExpression *>(children[0]); + right = static_cast<ASTExpression *>(children[1]); +} + +BasicExpression::~BasicExpression() { + // TODO Auto-generated destructor stub + // TODO free children memory +} + diff --git a/Sencha-lang/AST/BasicExpression.h b/Sencha-lang/AST/BasicExpression.h new file mode 100644 index 0000000..cf6d80e --- /dev/null +++ b/Sencha-lang/AST/BasicExpression.h @@ -0,0 +1,29 @@ +/* + * BasicExpression.h + * + * Created on: Dec 5, 2012 + * Author: attero + */ + +#ifndef BASICEXPRESSION_H_ +#define BASICEXPRESSION_H_ +#include "ASTExpression.h" +#include <string> + +class BasicExpression : public ASTExpression { +public: + //TODO change oper to enum + std::string oper; + ASTExpression * left; + ASTExpression * right; + + void set_operator(std::string op); + void set_left_operand(ASTNode * left); + void set_right_operand(ASTNode * right); + virtual int evaluate(); + + BasicExpression(); + virtual ~BasicExpression(); +}; + +#endif /* BASICEXPRESSION_H_ */ diff --git a/Sencha-lang/AST/ConstantExpression.cpp b/Sencha-lang/AST/ConstantExpression.cpp new file mode 100644 index 0000000..702dfe0 --- /dev/null +++ b/Sencha-lang/AST/ConstantExpression.cpp @@ -0,0 +1,18 @@ +/* + * ConstantExpression.cpp + * + * Created on: Dec 5, 2012 + * Author: attero + */ + +#include "ConstantExpression.h" + +ConstantExpression::ConstantExpression() { + // TODO Auto-generated constructor stub + +} + +ConstantExpression::~ConstantExpression() { + // TODO Auto-generated destructor stub +} + diff --git a/Sencha-lang/AST/ConstantExpression.h b/Sencha-lang/AST/ConstantExpression.h new file mode 100644 index 0000000..cc96adc --- /dev/null +++ b/Sencha-lang/AST/ConstantExpression.h @@ -0,0 +1,19 @@ +/* + * ConstantExpression.h + * + * Created on: Dec 5, 2012 + * Author: attero + */ + +#ifndef CONSTANTEXPRESSION_H_ +#define CONSTANTEXPRESSION_H_ +#include "ASTExpression.h" + +class ConstantExpression : public ASTExpression { +public: + ConstantExpression(); + virtual ~ConstantExpression(); + virtual int evaluate(); +}; + +#endif /* CONSTANTEXPRESSION_H_ */ diff --git a/Sencha-lang/AST/PostfixExpression.cpp b/Sencha-lang/AST/PostfixExpression.cpp new file mode 100644 index 0000000..4ceb6b4 --- /dev/null +++ b/Sencha-lang/AST/PostfixExpression.cpp @@ -0,0 +1,18 @@ +/* + * PostfixExpression.cpp + * + * Created on: Dec 5, 2012 + * Author: attero + */ + +#include "PostfixExpression.h" + +PostfixExpression::PostfixExpression() { + // TODO Auto-generated constructor stub + +} + +PostfixExpression::~PostfixExpression() { + // TODO Auto-generated destructor stub +} + diff --git a/Sencha-lang/AST/PostfixExpression.h b/Sencha-lang/AST/PostfixExpression.h new file mode 100644 index 0000000..855de51 --- /dev/null +++ b/Sencha-lang/AST/PostfixExpression.h @@ -0,0 +1,17 @@ +/* + * PostfixExpression.h + * + * Created on: Dec 5, 2012 + * Author: attero + */ + +#ifndef POSTFIXEXPRESSION_H_ +#define POSTFIXEXPRESSION_H_ + +class PostfixExpression { +public: + PostfixExpression(); + virtual ~PostfixExpression(); +}; + +#endif /* POSTFIXEXPRESSION_H_ */ diff --git a/Sencha-lang/ASTExpression.cpp b/Sencha-lang/ASTExpression.cpp deleted file mode 100644 index 32a47d8..0000000 --- a/Sencha-lang/ASTExpression.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * ASTExpression.cpp - * - * Created on: Nov 4, 2012 - * Author: attero - */ - -#include "ASTExpression.h" - -ASTExpression::ASTExpression() { - // TODO Auto-generated constructor stub - -} - -ASTExpression::~ASTExpression() { - // TODO Auto-generated destructor stub -} - diff --git a/Sencha-lang/ASTExpression.h b/Sencha-lang/ASTExpression.h deleted file mode 100644 index 69010ae..0000000 --- a/Sencha-lang/ASTExpression.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * ASTExpression.h - * - * Created on: Nov 4, 2012 - * Author: attero - */ - -#ifndef ASTEXPRESSION_H_ -#define ASTEXPRESSION_H_ -#include "ASTNode.h" - -class ASTExpression : public ASTNode { -public: - ASTExpression(); - virtual ~ASTExpression(); -}; - -#endif /* ASTEXPRESSION_H_ */ diff --git a/Sencha-lang/ASTNode.cpp b/Sencha-lang/ASTNode.cpp deleted file mode 100644 index 80429c2..0000000 --- a/Sencha-lang/ASTNode.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * ASTNode.cpp - * - * Created on: Nov 4, 2012 - * Author: attero - */ - -#include "ASTNode.h" - -ASTNode::ASTNode() { - // TODO Auto-generated constructor stub - parent = 0; -} - -ASTNode::~ASTNode() { - // TODO Auto-generated destructor stub -} - diff --git a/Sencha-lang/ASTNode.h b/Sencha-lang/ASTNode.h deleted file mode 100644 index b0145a3..0000000 --- a/Sencha-lang/ASTNode.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * ASTNode.h - * - * Created on: Nov 4, 2012 - * Author: attero - */ - -#ifndef ASTNODE_H_ -#define ASTNODE_H_ -#include <vector> - -class ASTNode { -public: - ASTNode(); - ASTNode * parent; - std::vector<ASTNode *> children; - void add_children(ASTNode *); - void remove_most_right_children(); - void set_parent(ASTNode *); - virtual void execute() = 0; - virtual ~ASTNode(); -}; - -#endif /* ASTNODE_H_ */ diff --git a/Sencha-lang/ASTPrimary.cpp b/Sencha-lang/ASTPrimary.cpp deleted file mode 100644 index c442ec5..0000000 --- a/Sencha-lang/ASTPrimary.cpp +++ /dev/null @@ -1,20 +0,0 @@ -/* - * ASTPrimary.cpp - * - * Created on: Nov 4, 2012 - * Author: attero - */ - -#include "ASTPrimary.h" - -ASTPrimary::ASTPrimary(ASTNode * parent) { - // TODO Auto-generated constructor stub - value = ""; - this->parent = parent; -} - -ASTPrimary::~ASTPrimary() { - // TODO Auto-generated destructor stub -} - - diff --git a/Sencha-lang/ASTPrimary.h b/Sencha-lang/ASTPrimary.h deleted file mode 100644 index 9387a0a..0000000 --- a/Sencha-lang/ASTPrimary.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * ASTPrimary.h - * - * Created on: Nov 4, 2012 - * Author: attero - */ - -#ifndef ASTPRIMARY_H_ -#define ASTPRIMARY_H_ -#include "ASTNode.h" -#include <string> - -class ASTPrimary : public ASTNode { -public: - ASTPrimary(ASTNode * parent); - - virtual ~ASTPrimary(); - virtual void execute() {}; - std::string value; - -}; - -#endif /* ASTPRIMARY_H_ */ diff --git a/Sencha-lang/ASTProgram.cpp b/Sencha-lang/ASTProgram.cpp deleted file mode 100644 index 8b74923..0000000 --- a/Sencha-lang/ASTProgram.cpp +++ /dev/null @@ -1,21 +0,0 @@ -/* - * ASTProgram.cpp - * - * Created on: Nov 5, 2012 - * Author: attero - */ - -#include "ASTProgram.h" - -ASTProgram::ASTProgram() { - // TODO Auto-generated constructor stub - -} - -ASTProgram::~ASTProgram() { - // TODO Auto-generated destructor stub -} - -void ASTProgram::execute() { - std::cout << "Program started!\n"; -} diff --git a/Sencha-lang/ASTProgram.h b/Sencha-lang/ASTProgram.h deleted file mode 100644 index f83bbf3..0000000 --- a/Sencha-lang/ASTProgram.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * ASTProgram.h - * - * Created on: Nov 5, 2012 - * Author: attero - */ - -#ifndef ASTPROGRAM_H_ -#define ASTPROGRAM_H_ -#include <iostream> -#include "ASTNode.h" -#include "ASTStatement.h" - -class ASTProgram : public ASTNode { -public: - ASTProgram(); - ASTStatement * add_child(ASTStatement * node); - virtual ~ASTProgram(); - virtual void execute(); -}; - -#endif /* ASTPROGRAM_H_ */ diff --git a/Sencha-lang/ASTStatement.cpp b/Sencha-lang/ASTStatement.cpp deleted file mode 100644 index 52c5526..0000000 --- a/Sencha-lang/ASTStatement.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * ASTStatement.cpp - * - * Created on: Nov 4, 2012 - * Author: attero - */ - -#include "ASTStatement.h" - -ASTStatement::ASTStatement() { - // TODO Auto-generated constructor stub - -} - -ASTStatement::~ASTStatement() { - // TODO Auto-generated destructor stub -} - diff --git a/Sencha-lang/ASTStatement.h b/Sencha-lang/ASTStatement.h deleted file mode 100644 index b2bfd84..0000000 --- a/Sencha-lang/ASTStatement.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * ASTStatement.h - * - * Created on: Nov 4, 2012 - * Author: attero - */ - -#ifndef ASTSTATEMENT_H_ -#define ASTSTATEMENT_H_ -#include "ASTNode.h" - -class ASTStatement : public ASTNode { -public: - ASTStatement(); - virtual ~ASTStatement(); -}; - -#endif /* ASTSTATEMENT_H_ */ diff --git a/Sencha-lang/AllTypesOfASTNodes.h b/Sencha-lang/AllTypesOfASTNodes.h deleted file mode 100644 index 61051e6..0000000 --- a/Sencha-lang/AllTypesOfASTNodes.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * AllTypesOfASTNodes.h - * - * Created on: Nov 5, 2012 - * Author: attero - */ - -#ifndef ALLTYPESOFASTNODES_H_ -#define ALLTYPESOFASTNODES_H_ - -#include "ASTNode.h" -#include "ASTProgram.h" -#include "ASTStatement.h" -#include "ASTExpression.h" -#include "ASTPrimary.h" - -//And probably more -//TODO actualize it - -#endif /* ALLTYPESOFASTNODES_H_ */ diff --git a/Sencha-lang/Debug/.metadata/.plugins/org.eclipse.cdt.make.core/specs.o b/Sencha-lang/Debug/.metadata/.plugins/org.eclipse.cdt.make.core/specs.o Binary files differdeleted file mode 100644 index 548f9e2..0000000 --- a/Sencha-lang/Debug/.metadata/.plugins/org.eclipse.cdt.make.core/specs.o +++ /dev/null diff --git a/Sencha-lang/Debug/AST.d b/Sencha-lang/Debug/AST.d deleted file mode 100644 index cb5490b..0000000 --- a/Sencha-lang/Debug/AST.d +++ /dev/null @@ -1,16 +0,0 @@ -AST.d: ../AST.cpp ../AST.h ../ASTNode.h ../AllTypesOfASTNodes.h \ - ../ASTProgram.h ../ASTStatement.h ../ASTExpression.h ../ASTPrimary.h - -../AST.h: - -../ASTNode.h: - -../AllTypesOfASTNodes.h: - -../ASTProgram.h: - -../ASTStatement.h: - -../ASTExpression.h: - -../ASTPrimary.h: diff --git a/Sencha-lang/Debug/AST.o b/Sencha-lang/Debug/AST.o Binary files differdeleted file mode 100644 index 051e6e3..0000000 --- a/Sencha-lang/Debug/AST.o +++ /dev/null diff --git a/Sencha-lang/Debug/AST/AST.o b/Sencha-lang/Debug/AST/AST.o Binary files differdeleted file mode 100644 index 6d77979..0000000 --- a/Sencha-lang/Debug/AST/AST.o +++ /dev/null diff --git a/Sencha-lang/Debug/AST/ASTExpression.o b/Sencha-lang/Debug/AST/ASTExpression.o Binary files differdeleted file mode 100644 index 90cf013..0000000 --- a/Sencha-lang/Debug/AST/ASTExpression.o +++ /dev/null diff --git a/Sencha-lang/Debug/AST/ASTNode.o b/Sencha-lang/Debug/AST/ASTNode.o Binary files differdeleted file mode 100644 index e14cc90..0000000 --- a/Sencha-lang/Debug/AST/ASTNode.o +++ /dev/null diff --git a/Sencha-lang/Debug/AST/ASTPrimary.o b/Sencha-lang/Debug/AST/ASTPrimary.o Binary files differdeleted file mode 100644 index 5b43b4e..0000000 --- a/Sencha-lang/Debug/AST/ASTPrimary.o +++ /dev/null diff --git a/Sencha-lang/Debug/AST/ASTProgram.d b/Sencha-lang/Debug/AST/ASTProgram.d deleted file mode 100644 index 5225294..0000000 --- a/Sencha-lang/Debug/AST/ASTProgram.d +++ /dev/null @@ -1,8 +0,0 @@ -AST/ASTProgram.d: ../AST/ASTProgram.cpp ../AST/ASTProgram.h \ - ../AST/ASTNode.h ../AST/ASTStatement.h - -../AST/ASTProgram.h: - -../AST/ASTNode.h: - -../AST/ASTStatement.h: diff --git a/Sencha-lang/Debug/AST/ASTProgram.o b/Sencha-lang/Debug/AST/ASTProgram.o Binary files differdeleted file mode 100644 index cd1445e..0000000 --- a/Sencha-lang/Debug/AST/ASTProgram.o +++ /dev/null diff --git a/Sencha-lang/Debug/AST/ASTStatement.o b/Sencha-lang/Debug/AST/ASTStatement.o Binary files differdeleted file mode 100644 index 53e6248..0000000 --- a/Sencha-lang/Debug/AST/ASTStatement.o +++ /dev/null diff --git a/Sencha-lang/Debug/AST/IfNode.o b/Sencha-lang/Debug/AST/IfNode.o Binary files differdeleted file mode 100644 index 294a7bf..0000000 --- a/Sencha-lang/Debug/AST/IfNode.o +++ /dev/null diff --git a/Sencha-lang/Debug/AST/ProgramNode.o b/Sencha-lang/Debug/AST/ProgramNode.o Binary files differdeleted file mode 100644 index a0017ed..0000000 --- a/Sencha-lang/Debug/AST/ProgramNode.o +++ /dev/null diff --git a/Sencha-lang/Debug/ASTExpression.d b/Sencha-lang/Debug/ASTExpression.d deleted file mode 100644 index d99e999..0000000 --- a/Sencha-lang/Debug/ASTExpression.d +++ /dev/null @@ -1,5 +0,0 @@ -ASTExpression.d: ../ASTExpression.cpp ../ASTExpression.h ../ASTNode.h - -../ASTExpression.h: - -../ASTNode.h: diff --git a/Sencha-lang/Debug/ASTExpression.o b/Sencha-lang/Debug/ASTExpression.o Binary files differdeleted file mode 100644 index 646172e..0000000 --- a/Sencha-lang/Debug/ASTExpression.o +++ /dev/null diff --git a/Sencha-lang/Debug/ASTNode.d b/Sencha-lang/Debug/ASTNode.d deleted file mode 100644 index 67f81f1..0000000 --- a/Sencha-lang/Debug/ASTNode.d +++ /dev/null @@ -1,3 +0,0 @@ -ASTNode.d: ../ASTNode.cpp ../ASTNode.h - -../ASTNode.h: diff --git a/Sencha-lang/Debug/ASTNode.o b/Sencha-lang/Debug/ASTNode.o Binary files differdeleted file mode 100644 index cb58487..0000000 --- a/Sencha-lang/Debug/ASTNode.o +++ /dev/null diff --git a/Sencha-lang/Debug/ASTPrimary.d b/Sencha-lang/Debug/ASTPrimary.d deleted file mode 100644 index 896ae18..0000000 --- a/Sencha-lang/Debug/ASTPrimary.d +++ /dev/null @@ -1,5 +0,0 @@ -ASTPrimary.d: ../ASTPrimary.cpp ../ASTPrimary.h ../ASTNode.h - -../ASTPrimary.h: - -../ASTNode.h: diff --git a/Sencha-lang/Debug/ASTPrimary.o b/Sencha-lang/Debug/ASTPrimary.o Binary files differdeleted file mode 100644 index 9d12afe..0000000 --- a/Sencha-lang/Debug/ASTPrimary.o +++ /dev/null diff --git a/Sencha-lang/Debug/ASTProgram.d b/Sencha-lang/Debug/ASTProgram.d deleted file mode 100644 index b36e85a..0000000 --- a/Sencha-lang/Debug/ASTProgram.d +++ /dev/null @@ -1,8 +0,0 @@ -ASTProgram.d: ../ASTProgram.cpp ../ASTProgram.h ../ASTNode.h \ - ../ASTStatement.h - -../ASTProgram.h: - -../ASTNode.h: - -../ASTStatement.h: diff --git a/Sencha-lang/Debug/ASTProgram.o b/Sencha-lang/Debug/ASTProgram.o Binary files differdeleted file mode 100644 index e4c8a2b..0000000 --- a/Sencha-lang/Debug/ASTProgram.o +++ /dev/null diff --git a/Sencha-lang/Debug/ASTStatement.d b/Sencha-lang/Debug/ASTStatement.d deleted file mode 100644 index 683169b..0000000 --- a/Sencha-lang/Debug/ASTStatement.d +++ /dev/null @@ -1,5 +0,0 @@ -ASTStatement.d: ../ASTStatement.cpp ../ASTStatement.h ../ASTNode.h - -../ASTStatement.h: - -../ASTNode.h: diff --git a/Sencha-lang/Debug/ASTStatement.o b/Sencha-lang/Debug/ASTStatement.o Binary files differdeleted file mode 100644 index 4b6e6b9..0000000 --- a/Sencha-lang/Debug/ASTStatement.o +++ /dev/null diff --git a/Sencha-lang/Debug/Lexer.o b/Sencha-lang/Debug/Lexer.o Binary files differdeleted file mode 100644 index fa70233..0000000 --- a/Sencha-lang/Debug/Lexer.o +++ /dev/null diff --git a/Sencha-lang/Debug/Object.o b/Sencha-lang/Debug/Object.o Binary files differdeleted file mode 100644 index 93585e3..0000000 --- a/Sencha-lang/Debug/Object.o +++ /dev/null diff --git a/Sencha-lang/Debug/Parser.o b/Sencha-lang/Debug/Parser.o Binary files differdeleted file mode 100644 index 4648d1b..0000000 --- a/Sencha-lang/Debug/Parser.o +++ /dev/null diff --git a/Sencha-lang/Debug/Tests/TestLexer.o b/Sencha-lang/Debug/Tests/TestLexer.o Binary files differdeleted file mode 100644 index 740dd61..0000000 --- a/Sencha-lang/Debug/Tests/TestLexer.o +++ /dev/null diff --git a/Sencha-lang/Debug/Tests/TestSuite.o b/Sencha-lang/Debug/Tests/TestSuite.o Binary files differdeleted file mode 100644 index 0790906..0000000 --- a/Sencha-lang/Debug/Tests/TestSuite.o +++ /dev/null diff --git a/Sencha-lang/Debug/Token.o b/Sencha-lang/Debug/Token.o Binary files differdeleted file mode 100644 index 0052b0c..0000000 --- a/Sencha-lang/Debug/Token.o +++ /dev/null diff --git a/Sencha-lang/Debug/main.o b/Sencha-lang/Debug/main.o Binary files differdeleted file mode 100644 index c30e5d5..0000000 --- a/Sencha-lang/Debug/main.o +++ /dev/null diff --git a/Sencha-lang/Parser.h b/Sencha-lang/Parser.h index 944b053..aa0a8c1 100644 --- a/Sencha-lang/Parser.h +++ b/Sencha-lang/Parser.h @@ -37,15 +37,15 @@ class Parser void report(string s); //TODO change functions below to use AST nodes - void statement(); + ASTNode * statement(ASTNode * node); - void mul_expr(); - void add_expr(); - void prim_expr(); - void postfix_expr(); - void rel_expr(); - void eq_expr(); - void expr();
+ ASTNode * mul_expr(ASTNode * node); + ASTNode * add_expr(ASTNode * node); + ASTNode * prim_expr(ASTNode * node); + ASTNode * postfix_expr(ASTNode * node); + ASTNode * rel_expr(ASTNode * node); + ASTNode * eq_expr(ASTNode * node); + ASTNode * expr(ASTNode * node);
};
#endif // PARSER_H
diff --git a/Sencha-lang/Release/.metadata/.plugins/org.eclipse.cdt.make.core/specs.o b/Sencha-lang/Release/.metadata/.plugins/org.eclipse.cdt.make.core/specs.o Binary files differdeleted file mode 100644 index aee8cd8..0000000 --- a/Sencha-lang/Release/.metadata/.plugins/org.eclipse.cdt.make.core/specs.o +++ /dev/null diff --git a/Sencha-lang/Release/Lexer.o b/Sencha-lang/Release/Lexer.o Binary files differdeleted file mode 100644 index 443a7df..0000000 --- a/Sencha-lang/Release/Lexer.o +++ /dev/null diff --git a/Sencha-lang/Release/Object.o b/Sencha-lang/Release/Object.o Binary files differdeleted file mode 100644 index 9b29c4b..0000000 --- a/Sencha-lang/Release/Object.o +++ /dev/null diff --git a/Sencha-lang/Release/Parser.o b/Sencha-lang/Release/Parser.o Binary files differdeleted file mode 100644 index 5a327cc..0000000 --- a/Sencha-lang/Release/Parser.o +++ /dev/null diff --git a/Sencha-lang/Release/Tests/TestLexer.o b/Sencha-lang/Release/Tests/TestLexer.o Binary files differdeleted file mode 100644 index 2197c53..0000000 --- a/Sencha-lang/Release/Tests/TestLexer.o +++ /dev/null diff --git a/Sencha-lang/Release/Tests/TestSuite.o b/Sencha-lang/Release/Tests/TestSuite.o Binary files differdeleted file mode 100644 index 551b958..0000000 --- a/Sencha-lang/Release/Tests/TestSuite.o +++ /dev/null diff --git a/Sencha-lang/Release/Token.o b/Sencha-lang/Release/Token.o Binary files differdeleted file mode 100644 index 8c4995e..0000000 --- a/Sencha-lang/Release/Token.o +++ /dev/null diff --git a/Sencha-lang/Release/main.o b/Sencha-lang/Release/main.o Binary files differdeleted file mode 100644 index 0d5b8ef..0000000 --- a/Sencha-lang/Release/main.o +++ /dev/null diff --git a/sencha/obj/Debug/AppleTree.o b/sencha/obj/Debug/AppleTree.o Binary files differdeleted file mode 100644 index 09f8c83..0000000 --- a/sencha/obj/Debug/AppleTree.o +++ /dev/null diff --git a/sencha/obj/Debug/Fruit.o b/sencha/obj/Debug/Fruit.o Binary files differdeleted file mode 100644 index 06e5613..0000000 --- a/sencha/obj/Debug/Fruit.o +++ /dev/null diff --git a/sencha/obj/Debug/FruitBasket.o b/sencha/obj/Debug/FruitBasket.o Binary files differdeleted file mode 100644 index 3d30ad4..0000000 --- a/sencha/obj/Debug/FruitBasket.o +++ /dev/null diff --git a/sencha/obj/Debug/Lexer.o b/sencha/obj/Debug/Lexer.o Binary files differdeleted file mode 100644 index dd06414..0000000 --- a/sencha/obj/Debug/Lexer.o +++ /dev/null diff --git a/sencha/obj/Debug/Parser.o b/sencha/obj/Debug/Parser.o Binary files differdeleted file mode 100644 index d66f6f1..0000000 --- a/sencha/obj/Debug/Parser.o +++ /dev/null diff --git a/sencha/obj/Debug/Token.o b/sencha/obj/Debug/Token.o Binary files differdeleted file mode 100644 index 34612c7..0000000 --- a/sencha/obj/Debug/Token.o +++ /dev/null diff --git a/sencha/obj/Debug/main.o b/sencha/obj/Debug/main.o Binary files differdeleted file mode 100644 index 9283049..0000000 --- a/sencha/obj/Debug/main.o +++ /dev/null |