proj home

Files   Classes   Functions   Hierarchy  

outerinput Class Reference

#include <rawinterpreter.h>

Inheritance diagram for outerinput:
Collaboration diagram for outerinput:

List of all members.

Public Member Functions

void eval (string const &word)


Detailed Description

Definition at line 196 of file rawinterpreter.h.


Member Function Documentation

void outerinput::eval ( string const &  word  )  [virtual]

Implements inputstate.

Definition at line 426 of file rawinterpreter.cpp.

References fdatainterp::eval(), inputstatescope::fd, and inputstatescope::setinner().

00427 {
00428   if (word=="}")
00429   {
00430     if(rpnprogramstackstate().ps->size() == 2)
00431     {
00432       rpnprogramstackstate().pop();
00433       // Expecting a program on the data stack. 
00434 
00435       // Programs are not evaluated when placed on the stack.
00436 
00437       inputstatescope::cscope->setinner();
00438       return;
00439     }
00440 
00441     // Assume rpnprogramstackstate().ps->size() > 2.
00442     rpnprogramstackstate().pop();
00443     return;
00444   }
00445 
00446   if (word=="{")
00447   {
00448     rpnprogram* p = new rpnprogram();
00449     rpnprogramstackstate().ds().push_front(p);   
00450     rpnprogramstackstate().push( p );
00451 
00452     return;
00453   } 
00454 
00455   inputstatescope::cscope->fd.eval(word);
00456 }


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

Generated on Fri Mar 4 00:50:08 2011 for Chelton Evans Source by  doxygen 1.5.8