Inferno  0.2
cpptree.hpp File Reference
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/TokenKinds.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/APFloat.h"
#include <string>
#include <deque>
#include "node/node.hpp"
#include "clang/Parse/DeclSpec.h"
#include "tree/type_db.hpp"
#include "operator_db.inc"
Include dependency graph for cpptree.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CPPTree::Property
 Property is the base class for property nodes. More...
struct  CPPTree::Initialiser
 Variable initialiser or function body. More...
struct  CPPTree::Uninitialised
 an uninitialised Instance. More...
struct  CPPTree::Statement
 Represents a statement as found inside a function body. More...
struct  CPPTree::Expression
 An expression that computes a result value. More...
struct  CPPTree::Type
 Any abstract data type. More...
struct  CPPTree::Declaration
 A declaration specifies the creation of a UserType or an Instance. More...
struct  CPPTree::Scope
 A scope is any space in a program where declarations may appear. Declarations. More...
struct  CPPTree::Program
 The top level of a program. More...
struct  CPPTree::Uncombable
 Indicates that the node cannot be combinationalised. More...
struct  CPPTree::Literal
 A property that can also be used as a literal in a program. More...
struct  CPPTree::String
 Intermediate property node that represents a string of any value. More...
struct  CPPTree::SpecificString
 A string with a specific value. More...
struct  CPPTree::Number
 Intermediate property node that represents a number of any value. More...
struct  CPPTree::Integer
 Intermediate property node that represents an integer of any value and signedness. More...
struct  CPPTree::SpecificInteger
 Property node for a specific integer value. More...
struct  CPPTree::Float
 Intermediate property node that represents a floating point number of any value. More...
struct  CPPTree::SpecificFloat
 Property node for a specific floating point value. More...
struct  CPPTree::Bool
 Intermediate property node that represents either boolean value. More...
struct  CPPTree::True
 Property node for boolean value true. More...
struct  CPPTree::False
 Property node for boolean value false. More...
struct  CPPTree::Identifier
 Property node for any identifier. More...
struct  CPPTree::SpecificIdentifier
 Property for a specific identifier, linked to by a particular Declaration. More...
struct  CPPTree::InstanceIdentifier
 Identifier for any Instance (variable or object or function) More...
struct  CPPTree::SpecificInstanceIdentifier
 Identifier for a specific Instance, linked to by a particular Declaration. More...
struct  CPPTree::TypeIdentifier
 Identifier for any user defined type. More...
struct  CPPTree::SpecificTypeIdentifier
 Identifier for a specific user defined type, linked to by a particular Declaration. More...
struct  CPPTree::Virtuality
 Property for a member function that may or may not be virtual. More...
struct  CPPTree::Virtual
 Property for a virtual member funciton. More...
struct  CPPTree::NonVirtual
 Property for a non-virtual member funciton. More...
struct  CPPTree::AccessSpec
 Property for any access spec. More...
struct  CPPTree::Public
 Property for public access. More...
struct  CPPTree::Private
 Property for private access. More...
struct  CPPTree::Protected
 Property for protected access. More...
struct  CPPTree::Constancy
 Property that indicates whether some Instance is constant. More...
struct  CPPTree::Const
 Property indicating the Instance is constant. More...
struct  CPPTree::NonConst
 Property indicating the Instance is not constant. More...
struct  CPPTree::Instance
 Declaration of a variable, object or function. More...
struct  CPPTree::Static
 A variable or function with one instance across the entire program. More...
struct  CPPTree::Field
 A non-static member Instance (function or variable) More...
struct  CPPTree::LocalVariable
 Any variable local to a Compound-statement. Cannot be a function. More...
struct  CPPTree::Automatic
 A local variable with automatic allocation. More...
struct  CPPTree::Temporary
 A local temp variable not preserved across function calls. More...
struct  CPPTree::Base
 Node for a base class within a class declaration, specifies another class from which to inherit. More...
struct  CPPTree::LabelIdentifier
 Identifier for a label that can be any label. More...
struct  CPPTree::SpecificLabelIdentifier
 Identifier for a specific label that has been declared somewhere. More...
struct  CPPTree::Label
 Declaration of a label for switch, goto etc. More...
struct  CPPTree::Callable
 Anything that can be called. More...
struct  CPPTree::CallableParams
 Anything that can be called and has parameters. More...
struct  CPPTree::CallableParamsReturn
 Anything that can be called and has parameters and return value. More...
struct  CPPTree::Subroutine
 Subroutine like in Basic, no params or return. More...
struct  CPPTree::Procedure
 A procedure like in pascal etc, params but no return value. More...
struct  CPPTree::Function
 A function like in C, Pascal; params and a single return value of the specified type. More...
struct  CPPTree::Constructor
 A C++ constructor. The init list is just zero or more calls to constructors in the body. More...
struct  CPPTree::Destructor
 A C++ destructor. More...
struct  CPPTree::Array
 This is the type of an array that contains the specified number of elements of the specified type. More...
struct  CPPTree::Indirection
 Intermediate for indirect access to some type as specified. More...
struct  CPPTree::Pointer
 A C/C++ pointer. More...
struct  CPPTree::Reference
 A C++ reference. More...
struct  CPPTree::Void
 The pseudo-type void, disallowed in some circumstances as per C. More...
struct  CPPTree::Boolean
 Boolean type. More...
struct  CPPTree::Numeric
 Intermediate for any type that represents a number that you can eg add and subtract. More...
struct  CPPTree::Integral
 Type represents an integral (singed or unsigned) type. More...
struct  CPPTree::Signed
 Type of a signed integer number (2's complement). More...
struct  CPPTree::Unsigned
 Type of an unsigned integer number. More...
struct  CPPTree::FloatSemantics
 Property for the details of any floating point behaviour. More...
struct  CPPTree::SpecificFloatSemantics
 Property for the details of a specific floating point behaviour. More...
struct  CPPTree::Floating
 Type of a floating point number. More...
struct  CPPTree::Labeley
struct  CPPTree::UserType
 Intermediate declaration of a user defined type of any kind (struct, typedef etc). More...
struct  CPPTree::Typedef
 Represents a typedef. More...
struct  CPPTree::Record
 Intermediate for declaration of a struct, class, union or enum. More...
struct  CPPTree::Union
 A union, as per Record. More...
struct  CPPTree::Enum
 An Enum, as per record. More...
struct  CPPTree::InheritanceRecord
 A record that can inherit from other records and be inherited from. More...
struct  CPPTree::Struct
 Struct as per InheritanceRecord. More...
struct  CPPTree::Class
 Class as per InheritanceRecord. More...
struct  CPPTree::Operator
 An operator. More...
struct  CPPTree::NonCommutativeOperator
 An operator with operands whose order is defined. More...
struct  CPPTree::CommutativeOperator
 An operator with operands whose order does not matter. More...
struct  CPPTree::Unop
 An operator with a single operand. More...
struct  CPPTree::Binop
 An operator with two operands. More...
struct  CPPTree::Ternop
 An operator with three operands. More...
struct  CPPTree::CommutativeBinop
 An operator with two interchangable operands. More...
struct  CPPTree::AssignmentOperator
 An operator with two operands, that writes its result back to the first operand. More...
struct  CPPTree::Globality
 Property indicating whether a New/Delete is global. More...
struct  CPPTree::Global
 Property indicating ::new/::delete was used. More...
struct  CPPTree::NonGlobal
 Property indicating just new/delete, no :: was used. More...
struct  CPPTree::DeleteArrayness
 Property indicating whether a delete should delete an array. More...
struct  CPPTree::DeleteArray
 Property indicating delete[] was used. More...
struct  CPPTree::DeleteNonArray
 Property indicating delete, no []. More...
struct  CPPTree::New
 Node for the C++ new operator. More...
struct  CPPTree::Delete
 Node for C++ delete operator. More...
struct  CPPTree::Lookup
 Node for accessing an element in a record as in base.member. More...
struct  CPPTree::Cast
 Node for a c-style cast. More...
struct  CPPTree::MapOperand
 Associates an Expression with an InstanceIdentifier. More...
struct  CPPTree::MapOperator
 An operator with operands whose order is established by mapping. More...
struct  CPPTree::Call
 A function call to specified function passing in specified arguments. More...
struct  CPPTree::MakeRecord
 Initialiser for a record. More...
struct  CPPTree::TypeOperator
 Operator that operates on data types as parameters. More...
struct  CPPTree::SizeOf
 sizeof() a type More...
struct  CPPTree::AlignOf
 alignof() a type More...
struct  CPPTree::SequentialScope
 A sequence of statements in a scope that shall execute in sequence. More...
struct  CPPTree::Compound
 Declarations and Statements inside {} or begin/end. More...
struct  CPPTree::CompoundExpression
 GCC extension for compound statements that return a value. More...
struct  CPPTree::Return
 The return statement of a function. More...
struct  CPPTree::Goto
 A goto statement. More...
struct  CPPTree::If
 If statement. More...
struct  CPPTree::Breakable
 Designate a statement that may be broken out of. More...
struct  CPPTree::Loop
 Any loop. More...
struct  CPPTree::While
 While loop. More...
struct  CPPTree::Do
 Do loop (first iteration always runs) More...
struct  CPPTree::For
 C-style for loop. More...
struct  CPPTree::Switch
 Switch statement. More...
struct  CPPTree::SwitchTarget
 Intermediate for labels in a switch statement. More...
struct  CPPTree::RangeCase
 Case label, supporting range extension in case useful for optimisation. More...
struct  CPPTree::Case
 Case label. More...
struct  CPPTree::Default
 Default label in a switch statement. More...
struct  CPPTree::Continue
 Continue (to innermost Loop) More...
struct  CPPTree::Break
 Break (from innermost Breakable) More...
struct  CPPTree::Nop
 Do nothing; these get optimised out where possible. More...

Namespaces

namespace  CPPTree
 

CPPTree namespace contains node definitions that represent elements of the C++ language.


Defines

#define INTEGER_DEFAULT_WIDTH   32
#define PREFIX(TOK, TEXT, NODE, BASE, CAT)   struct NODE : BASE { NODE_FUNCTIONS_FINAL };
#define POSTFIX(TOK, TEXT, NODE, BASE, CAT)   struct NODE : BASE { NODE_FUNCTIONS_FINAL };
#define INFIX(TOK, TEXT, NODE, BASE, CAT)   struct NODE : BASE { NODE_FUNCTIONS_FINAL };
#define OTHER(TOK, TEXT, NODE, BASE, CAT)   struct NODE : BASE { NODE_FUNCTIONS_FINAL };

Functions

 CPPTree::PREFIX (plusplus,"++", PreIncrement, AssignmentOperator, ARITHMETIC) POSTFIX(plusplus
ARITHMETIC CPPTree::PREFIX (minusminus,"--", PreDecrement, AssignmentOperator, ARITHMETIC) POSTFIX(minusminus
ARITHMETIC ARITHMETIC CPPTree::OTHER (0,"", Multiplexor, Ternop, SPECIAL) OTHER(0
ARITHMETIC ARITHMETIC SPECIAL CPPTree::OTHER (0,"", MakeArray, NonCommutativeOperator, SPECIAL) OTHER(0

Variables

 CPPTree::PostIncrement
 CPPTree::AssignmentOperator
ARITHMETIC CPPTree::PostDecrement
ARITHMETIC ARITHMETIC CPPTree::Subscript
ARITHMETIC ARITHMETIC CPPTree::Binop
ARITHMETIC ARITHMETIC SPECIAL CPPTree::This
ARITHMETIC ARITHMETIC SPECIAL CPPTree::Operator

Define Documentation

#define INFIX (   TOK,
  TEXT,
  NODE,
  BASE,
  CAT 
)    struct NODE : BASE { NODE_FUNCTIONS_FINAL };

Definition at line 678 of file cpptree.hpp.

#define INTEGER_DEFAULT_WIDTH   32

Definition at line 124 of file cpptree.hpp.

#define OTHER (   TOK,
  TEXT,
  NODE,
  BASE,
  CAT 
)    struct NODE : BASE { NODE_FUNCTIONS_FINAL };

Definition at line 679 of file cpptree.hpp.

#define POSTFIX (   TOK,
  TEXT,
  NODE,
  BASE,
  CAT 
)    struct NODE : BASE { NODE_FUNCTIONS_FINAL };

Definition at line 677 of file cpptree.hpp.

#define PREFIX (   TOK,
  TEXT,
  NODE,
  BASE,
  CAT 
)    struct NODE : BASE { NODE_FUNCTIONS_FINAL };

Definition at line 676 of file cpptree.hpp.