Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Program Class Reference

#include <buffer.h>

Inheritance diagram for Program:

Inheritance graph
[legend]
Collaboration diagram for Program:

Collaboration graph
[legend]
List of all members.

Public Methods

 Program (char *name)
virtual ~Program ()
void Rewind ()
void Rewind (uint i)
uint GetSize ()
void Unget ()
char Ref (uint position)
void Set (char c, uint position)
uint GetCurPos ()
uint GetNextPos ()
const char * Read (uint p)
virtual char Get ()
void Subst (Ptree *newtext, Ptree *oldtext)
void Insert (Ptree *pos, Ptree *before_text, Ptree *after_text)
void Replace (char *, char *, Ptree *)
void MinimumSubst (Ptree *newtext, Ptree *oldtext)
uint LineNumber (char *, char *&, int &)
void Write (ostream &, const char *)
sint ReadLineDirective (uint, sint, uint &, int &)

Protected Attributes

char * buf
uint size
uint index
char * defaultname

Private Methods

bool MinimumSubst2 (Ptree *newtext, Ptree *oldtext)

Private Attributes

Replacementreplacement

Constructor & Destructor Documentation

Program::Program char *    name [inline]
 

Definition at line 46 of file buffer.h.

References defaultname, nil, and replacement.

virtual Program::~Program   [inline, virtual]
 

Definition at line 51 of file buffer.h.


Member Function Documentation

char Program::Get   [virtual]
 

Reimplemented in ProgramFromStdin.

Definition at line 47 of file buffer.cc.

References buf, and index.

Referenced by Lex::GetNextNonWhiteChar(), Lex::ReadCharConst(), Lex::ReadComment(), Lex::ReadFloat(), Lex::ReadIdentifier(), Lex::ReadLine(), Lex::ReadLineDirective(), Lex::ReadNumber(), Lex::ReadSeparator(), Lex::ReadStrConst(), Lex::SkipAttributeToken(), and Lex::SkipExtensionToken().

uint Program::GetCurPos   [inline]
 

Definition at line 62 of file buffer.h.

References index, and uint.

Referenced by Lex::ReadCharConst(), Lex::ReadComment(), Lex::ReadFloat(), Lex::ReadIdentifier(), Lex::ReadLine(), Lex::ReadNumber(), and Lex::ReadStrConst().

uint Program::GetNextPos   [inline]
 

Definition at line 65 of file buffer.h.

References index, and uint.

uint Program::GetSize   [inline]
 

Definition at line 55 of file buffer.h.

References size, and uint.

Referenced by ReadLineDirective().

void Program::Insert Ptree   pos,
Ptree   before_text,
Ptree   after_text
 

Definition at line 60 of file buffer.cc.

References Ptree::LeftMost(), nil, Replace(), and Ptree::RightMost().

Referenced by MinimumSubst2(), and ParseOpencxx().

uint Program::LineNumber char *   ,
char *&   ,
int &   
 

Definition at line 160 of file buffer.cc.

References buf, defaultname, Read(), ReadLineDirective(), Ref(), sint, size, and uint.

Referenced by find_leaf(), and Lex::LineNumber().

void Program::MinimumSubst Ptree   newtext,
Ptree   oldtext
 

Definition at line 75 of file buffer.cc.

References MinimumSubst2(), and Subst().

Referenced by ParseOpencxx().

bool Program::MinimumSubst2 Ptree   newtext,
Ptree   oldtext
[private]
 

Definition at line 81 of file buffer.cc.

References Ptree::Car(), Ptree::Cdr(), FALSE, Insert(), Ptree::IsLeaf(), Ptree::ListTail(), nil, ntExprStatement, ntTypedef, Ptree::Second(), Subst(), TRUE, and Ptree::What().

Referenced by MinimumSubst().

const char* Program::Read uint    p [inline]
 

Definition at line 68 of file buffer.h.

References buf, and uint.

Referenced by LineNumber(), QuoteClass::ProcessBackQuote(), Lex::ReadComment(), Lex::ReadIdentifier(), ReadLineDirective(), Lex::Rewind(), Lex::TokenPosition(), and Ptree::ToString().

sint Program::ReadLineDirective uint   ,
sint   ,
uint  ,
int &   
 

Definition at line 320 of file buffer.cc.

References GetSize(), is_blank, is_digit(), Read(), Ref(), sint, and uint.

Referenced by LineNumber(), and Write().

char Program::Ref uint    position [inline]
 

Definition at line 58 of file buffer.h.

References buf, and uint.

Referenced by LineNumber(), ReadLineDirective(), Lex::Ref(), and Write().

void Program::Replace char *   ,
char *   ,
Ptree  
 

Definition at line 134 of file buffer.cc.

References buf, Program::Replacement::next, nil, replacement, Program::Replacement::startpos, and uint.

Referenced by Insert(), and Subst().

void Program::Rewind uint    i [inline]
 

Definition at line 54 of file buffer.h.

References index, and uint.

void Program::Rewind   [inline]
 

Definition at line 53 of file buffer.h.

References index.

Referenced by Lex::Lex(), Lex::ReadFloat(), Lex::ReadLine(), Lex::ReadStrConst(), and Lex::Rewind().

void Program::Set char    c,
uint    position
[inline]
 

Definition at line 59 of file buffer.h.

References buf, and uint.

void Program::Subst Ptree   newtext,
Ptree   oldtext
 

Definition at line 55 of file buffer.cc.

References Ptree::LeftMost(), Replace(), and Ptree::RightMost().

Referenced by MinimumSubst(), and MinimumSubst2().

void Program::Unget   [inline]
 

Definition at line 56 of file buffer.h.

References index.

Referenced by Lex::GetNextNonWhiteChar(), Lex::ReadComment(), Lex::ReadFloat(), Lex::ReadIdentifier(), Lex::ReadLine(), Lex::ReadNumber(), Lex::ReadSeparator(), and Lex::SkipExtensionToken().

void Program::Write ostream &   ,
const char *   
 

Definition at line 218 of file buffer.cc.

References defaultname, Program::Replacement::endpos, opcxx_ListOfMetaclass::FinalizeAll(), Class::FinalizeAll(), Program::Replacement::next, nil, ReadLineDirective(), Ref(), replacement, sint, Program::Replacement::startpos, Program::Replacement::text, uint, and Ptree::Write().

Referenced by ReadStdin(), and RunOpencxx().


Member Data Documentation

char* Program::buf [protected]
 

Definition at line 86 of file buffer.h.

Referenced by ProgramString::Clear(), ProgramFromStdin::Get(), Get(), LineNumber(), ProgramString::operator<<(), Program_from_fd::Program_from_fd(), ProgramFile::ProgramFile(), ProgramFromStdin::ProgramFromStdin(), ProgramString::ProgramString(), Read(), Ref(), Replace(), Set(), Program_from_fd::~Program_from_fd(), ProgramFile::~ProgramFile(), ProgramFromStdin::~ProgramFromStdin(), and ProgramString::~ProgramString().

char* Program::defaultname [protected]
 

Definition at line 88 of file buffer.h.

Referenced by LineNumber(), Program(), and Write().

uint Program::index [protected]
 

Definition at line 87 of file buffer.h.

Referenced by ProgramFromStdin::Get(), Get(), GetCurPos(), GetNextPos(), ProgramFile::ProgramFile(), ProgramFromStdin::ProgramFromStdin(), ProgramString::ProgramString(), Rewind(), and Unget().

Replacement* Program::replacement [private]
 

Definition at line 100 of file buffer.h.

Referenced by Program(), Replace(), and Write().

uint Program::size [protected]
 

Definition at line 87 of file buffer.h.

Referenced by ProgramFromStdin::Get(), GetSize(), LineNumber(), ProgramString::operator<<(), ProgramFile::ProgramFile(), ProgramFromStdin::ProgramFromStdin(), and ProgramString::ProgramString().


The documentation for this class was generated from the following files:
Generated on Mon Feb 10 17:36:04 2003 for VFiasco Semantics Compiler by doxygen1.2.15