Pol  Revision:4b29d2b
Pol::Bscript::Expression Class Reference

#include <parser.h>

Public Types

typedef std::vector< Token * > Tokens
 

Public Member Functions

 ~Expression ()
 
void eat (Expression &expr)
 
void eat2 (Expression &expr)
 
int get_num_tokens (int idx) const
 
void optimize ()
 
void optimize_assignments ()
 
void optimize_binary_operations ()
 
bool optimize_token (int i)
 
void optimize_unary_operations ()
 

Public Attributes

std::queue< Token * > CA
 
Tokens tokens
 
std::stack< Token * > TX
 

Detailed Description

Definition at line 72 of file parser.h.

Member Typedef Documentation

typedef std::vector<Token*> Pol::Bscript::Expression::Tokens

Definition at line 86 of file parser.h.

Constructor & Destructor Documentation

Pol::Bscript::Expression::~Expression ( )

Definition at line 154 of file compiler.cpp.

Member Function Documentation

void Pol::Bscript::Expression::eat ( Expression expr)

Definition at line 180 of file compiler.cpp.

References CA.

Referenced by Pol::Bscript::Compiler::getUserArgs().

void Pol::Bscript::Expression::optimize ( )

Definition at line 764 of file compiler.cpp.

Referenced by Pol::Bscript::Compiler::readexpr().

void Pol::Bscript::Expression::optimize_assignments ( )

Definition at line 726 of file compiler.cpp.

bool Pol::Bscript::Expression::optimize_token ( int  i)

Definition at line 541 of file compiler.cpp.

References Pol::Bscript::compilercfg, Pol::Bscript::Token::copyStr(), Pol::Bscript::getKnownObjMember(), Pol::Bscript::Token::id, Pol::Bscript::ObjMember::id, Pol::Bscript::INS_ASSIGN_CONSUME, Pol::Bscript::INS_ASSIGN_GLOBALVAR, Pol::Bscript::INS_ASSIGN_LOCALVAR, Pol::Bscript::INS_GET_MEMBER, Pol::Bscript::INS_GET_MEMBER_ID, Pol::Bscript::INS_MULTISUBSCRIPT, Pol::Bscript::INS_MULTISUBSCRIPT_ASSIGN, Pol::Bscript::INS_SET_MEMBER, Pol::Bscript::INS_SET_MEMBER_CONSUME, Pol::Bscript::INS_SET_MEMBER_ID, Pol::Bscript::INS_SET_MEMBER_ID_CONSUME, Pol::Bscript::INS_SET_MEMBER_ID_CONSUME_DIVIDEEQUAL, Pol::Bscript::INS_SET_MEMBER_ID_CONSUME_MINUSEQUAL, Pol::Bscript::INS_SET_MEMBER_ID_CONSUME_MODULUSEQUAL, Pol::Bscript::INS_SET_MEMBER_ID_CONSUME_PLUSEQUAL, Pol::Bscript::INS_SET_MEMBER_ID_CONSUME_TIMESEQUAL, Pol::Bscript::INS_SUBSCRIPT_ASSIGN, Pol::Bscript::INS_SUBSCRIPT_ASSIGN_CONSUME, Pol::Bscript::Token::lval, Pol::Bscript::CompilerConfig::OptimizeObjectMembers, OSTRINGSTREAM, OSTRINGSTREAM_STR, Pol::Bscript::TOK_ARRAY_SUBSCRIPT, Pol::Bscript::TOK_ASSIGN, Pol::Bscript::TOK_CONSUMER, Pol::Bscript::TOK_DIVIDEEQUAL, Pol::Bscript::TOK_GLOBALVAR, Pol::Bscript::TOK_LOCALVAR, Pol::Bscript::TOK_MEMBER, Pol::Bscript::TOK_MINUSEQUAL, Pol::Bscript::TOK_MODULUSEQUAL, Pol::Bscript::TOK_PLUSEQUAL, Pol::Bscript::TOK_STRING, Pol::Bscript::TOK_TIMESEQUAL, Pol::Bscript::Token::tokval(), Pol::Clib::tostring(), Pol::Bscript::TYP_OPERATOR, Pol::Bscript::TYP_UNARY_OPERATOR, and Pol::Bscript::Token::type.

Member Data Documentation


The documentation for this class was generated from the following files: