Changeset 606

Show
Ignore:
Timestamp:
07/22/08 14:10:11 (4 months ago)
Author:
moenicke
Message:

* replaced the QStack by a std::vector

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/rphp/compiler/parser/phplexer.cpp

    r605 r606  
    4848int Lexer::state(int deepness) const 
    4949{ 
    50     #ifdef PENDING_THOMAS 
    51     // TODO pending we need to look at other positions than top 
     50 
     51    // was: return m_state[ m_state.size() - deepness - 1 ]; size() 
    5252    return m_state[ m_state.size() - deepness - 1 ]; 
    53     #endif 
    5453} 
    5554void Lexer::printState() 
     
    8281void Lexer::pushState( int state ) 
    8382{ 
    84     m_state.push( state ); 
     83    m_state.push_back( state ); 
     84    //m_state.push( state ); which is a QVector::append() 
    8585} 
    8686 
    8787void Lexer::popState() 
    8888{ 
    89     m_state.pop(); 
     89    m_state.pop_back(); 
     90//    m_state.pop(); which is a QVector::data[ size() - 1 ] 
    9091} 
    9192 
  • trunk/rphp/compiler/parser/phplexer.h

    r581 r606  
    2323 
    2424#include "rphp_ast.h" 
    25 #include <stack> 
    26 //#include <string> 
     25#include <vector> 
    2726#include <unistr.h> 
    2827 
     
    6867    UChar32 lookAt( int pos ){ return m_content.char32At( m_curpos ); } 
    6968 
    70     std::stack<int> m_state; 
     69    std::vector<int> m_state; // was: QStack<int> 
    7170    enum State 
    7271    {