[opengtl-commits] [422] rename CoumpoundExpression as ConstantCoumpoundExpression

[ Thread Index | Date Index | More lists.tuxfamily.org/opengtl-commits Archives ]


Revision: 422
Author:   cyrille
Date:     2008-10-02 08:52:50 +0200 (Thu, 02 Oct 2008)

Log Message:
-----------
rename CoumpoundExpression as ConstantCoumpoundExpression

Modified Paths:
--------------
    trunk/OpenGTL/OpenCTL/OpenCTL/compiler/ParserNG.cpp
    trunk/OpenGTL/OpenGTL/GTLCore/AST/CoumpoundExpression.cpp
    trunk/OpenGTL/OpenGTL/GTLCore/AST/CoumpoundExpression.h
    trunk/OpenGTL/OpenGTL/GTLCore/ParserBase_p.cpp
    trunk/OpenGTL/OpenGTL/GTLCore/ParserBase_p.h
    trunk/OpenGTL/OpenGTL/GTLCore/Type.h


Modified: trunk/OpenGTL/OpenCTL/OpenCTL/compiler/ParserNG.cpp
===================================================================
--- trunk/OpenGTL/OpenCTL/OpenCTL/compiler/ParserNG.cpp	2008-10-01 18:36:59 UTC (rev 421)
+++ trunk/OpenGTL/OpenCTL/OpenCTL/compiler/ParserNG.cpp	2008-10-02 06:52:50 UTC (rev 422)
@@ -31,7 +31,6 @@
 
 #include "GTLCore/AST/BinaryExpression.h"
 #include "GTLCore/AST/Expression.h"
-#include "GTLCore/AST/CoumpoundExpression.h"
 #include "GTLCore/AST/FunctionDeclaration.h"
 #include "GTLCore/AST/Tree.h"
 #include "GTLCore/AST/UnaryExpression.h"

Modified: trunk/OpenGTL/OpenGTL/GTLCore/AST/CoumpoundExpression.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/AST/CoumpoundExpression.cpp	2008-10-01 18:36:59 UTC (rev 421)
+++ trunk/OpenGTL/OpenGTL/GTLCore/AST/CoumpoundExpression.cpp	2008-10-02 06:52:50 UTC (rev 422)
@@ -32,12 +32,12 @@
 
 using namespace GTLCore::AST;
 
-CoumpoundExpression::CoumpoundExpression( const GTLCore::Type* _type, const std::vector<Expression*>& _expressions) : m_expressions(_expressions), m_type(_type)
+ConstantCoumpoundExpression::ConstantCoumpoundExpression( const GTLCore::Type* _type, const std::vector<Expression*>& _expressions) : m_expressions(_expressions), m_type(_type)
 {
   GTL_ASSERT(_type);
 }
 
-CoumpoundExpression::~CoumpoundExpression( )
+ConstantCoumpoundExpression::~ConstantCoumpoundExpression( )
 {
   for( std::vector<Expression*>::iterator it = m_expressions.begin();
        it != m_expressions.end(); ++it)
@@ -46,17 +46,17 @@
   }
 }
 
-const GTLCore::Type* CoumpoundExpression::type() const
+const GTLCore::Type* ConstantCoumpoundExpression::type() const
 {
   return m_type;
 }
 
-bool CoumpoundExpression::isConstant() const
+bool ConstantCoumpoundExpression::isConstant() const
 {
   return m_constant;
 }
 
-GTLCore::ExpressionResult CoumpoundExpression::generateValue( GenerationContext& _gc, llvm::BasicBlock* _bb ) const
+GTLCore::ExpressionResult ConstantCoumpoundExpression::generateValue( GenerationContext& _gc, llvm::BasicBlock* _bb ) const
 {
   GTL_DEBUG( m_type->dataType() << " " << Type::ARRAY << " " << Type::STRUCTURE );
   if( m_type->dataType() == Type::ARRAY or m_type->dataType() == Type::VECTOR)
@@ -112,7 +112,7 @@
   return GTLCore::ExpressionResult();
 }
 
-void CoumpoundExpression::markAsReturnExpression()
+void ConstantCoumpoundExpression::markAsReturnExpression()
 {
-  GTL_ABORT("CoumpoundExpression can't be in a return statement");
+  GTL_ABORT("ConstantCoumpoundExpression can't be in a return statement");
 }

Modified: trunk/OpenGTL/OpenGTL/GTLCore/AST/CoumpoundExpression.h
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/AST/CoumpoundExpression.h	2008-10-01 18:36:59 UTC (rev 421)
+++ trunk/OpenGTL/OpenGTL/GTLCore/AST/CoumpoundExpression.h	2008-10-02 06:52:50 UTC (rev 422)
@@ -29,10 +29,10 @@
      * @internal
      * @ingroup GTLCore_AST
      */
-    class CoumpoundExpression : public Expression {
+    class ConstantCoumpoundExpression : public Expression {
       public:
-        CoumpoundExpression( const GTLCore::Type* _type, const std::vector<Expression*>& _expressions);
-        ~CoumpoundExpression( );
+        ConstantCoumpoundExpression( const GTLCore::Type* _type, const std::vector<Expression*>& _expressions);
+        ~ConstantCoumpoundExpression( );
         virtual const GTLCore::Type* type() const;
         virtual bool isConstant() const;
         virtual GTLCore::ExpressionResult generateValue( GenerationContext& _gc, llvm::BasicBlock* _bb ) const;

Modified: trunk/OpenGTL/OpenGTL/GTLCore/ParserBase_p.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/ParserBase_p.cpp	2008-10-01 18:36:59 UTC (rev 421)
+++ trunk/OpenGTL/OpenGTL/GTLCore/ParserBase_p.cpp	2008-10-02 06:52:50 UTC (rev 422)
@@ -105,7 +105,7 @@
       // Check if it's a coumpound expression
       if( currentToken().type == GTLCore::Token::STARTBRACE )
       {
-        GTLCore::AST::CoumpoundExpression* coumpoundExpression = parseCoumpoundExpression( type, true );
+        GTLCore::AST::Expression* coumpoundExpression = parseCoumpoundExpression( type, true );
       /* if( coumpoundExpression->size() != *memberArraySize.begin()) // TODO: recurisvely check other sizes
         {
           GTL_DEBUG( memberArraySize.size() << " " << coumpoundExpression->size() );
@@ -301,7 +301,7 @@
   return list_;
 }
 
-AST::CoumpoundExpression* ParserBase::parseCoumpoundExpression( const Type* _type, bool _constantExpression )
+AST::Expression* ParserBase::parseCoumpoundExpression( const Type* _type, bool _constantExpression )
 {
   GTL_ASSERT( _type );
   GTL_ASSERT( d->currentToken.type == Token::STARTBRACE );
@@ -341,7 +341,7 @@
     } else if( d->currentToken.type == Token::ENDBRACE )
     {
       getNextToken();
-      return new AST::CoumpoundExpression(_type, expressions_);
+      return new AST::ConstantCoumpoundExpression(_type, expressions_);
     }
     ++index;
   }
@@ -398,7 +398,7 @@
     }
   } else if( currentToken().type == Token::STARTBRACE )
   {
-    AST::CoumpoundExpression* coumpoundExpression = parseCoumpoundExpression( _type, true );
+    AST::Expression* coumpoundExpression = parseCoumpoundExpression( _type, true );
     if( coumpoundExpression )
     {
       return new AST::GlobalDataExpression( coumpoundExpression );
@@ -469,7 +469,7 @@
       } else if( d->currentToken.isUnaryOperator() ) {
         expr = parseUnaryOperator(_constantExpression);
       } else if( currentToken().type == Token::STARTBRACE ) {
-        AST::CoumpoundExpression* coumpoundExpression = parseCoumpoundExpression( _lhs->type() , true );
+        AST::Expression* coumpoundExpression = parseCoumpoundExpression( _lhs->type() , true );
         if( coumpoundExpression )
         {
           return new AST::GlobalDataExpression( coumpoundExpression );

Modified: trunk/OpenGTL/OpenGTL/GTLCore/ParserBase_p.h
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/ParserBase_p.h	2008-10-01 18:36:59 UTC (rev 421)
+++ trunk/OpenGTL/OpenGTL/GTLCore/ParserBase_p.h	2008-10-02 06:52:50 UTC (rev 422)
@@ -40,7 +40,7 @@
   namespace AST {
     class Tree;
     class Expression;
-    class CoumpoundExpression;
+    class ConstantCoumpoundExpression;
     class Statement;
     class AccessorExpression;
     class StatementsList;
@@ -124,7 +124,7 @@
       /**
        * Parse coumpound expression ( { 1, 2, { 4, 5, 6 } } )
        */
-      AST::CoumpoundExpression* parseCoumpoundExpression( const Type* _type, bool _constantExpression );
+      AST::Expression* parseCoumpoundExpression( const Type* _type, bool _constantExpression );
       /**
        * Get the constant expression out of the current token. Also positionate the
        * token flow on the token after the constant.

Modified: trunk/OpenGTL/OpenGTL/GTLCore/Type.h
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/Type.h	2008-10-01 18:36:59 UTC (rev 421)
+++ trunk/OpenGTL/OpenGTL/GTLCore/Type.h	2008-10-02 06:52:50 UTC (rev 422)
@@ -43,7 +43,7 @@
 namespace GTLCore {
   class Parameter;
   namespace AST {
-    class CoumpoundExpression;
+    class ConstantCoumpoundExpression;
     class FunctionCallExpression;
     class FunctionDeclaration;
   }
@@ -54,7 +54,7 @@
   class Type {
     friend class ArrayAccessor;
     friend class ArrayVisitor;
-    friend class AST::CoumpoundExpression;
+    friend class AST::ConstantCoumpoundExpression;
     friend class AST::FunctionCallExpression;
     friend class AST::FunctionDeclaration;
     friend class OpenCTL::Compiler;


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/