|
Canola
0.8.D001
|
Public Types | |
| typedef boost::shared_ptr< source > | pointer |
Public Member Functions | |
| ~source () | |
| int | getch (void) |
| void | ungetch (int c) |
| void | set_line_number (int n) |
| void | error (const char *fmt,...) |
| void | error_v (const char *fmt, va_list) |
| location::pointer | get_location (void) const |
Static Public Member Functions | |
| static pointer | create (const std::string &filename, calculator &subject) |
Private Member Functions | |
| source (const std::string &filename, calculator &subject) | |
| void | close (void) |
Private Attributes | |
| std::string | filename |
| calculator & | subject |
| FILE * | fp |
| int | line_number |
| bool | prev_was_newline |
| long | position |
| std::list< unsigned char > | pushback |
The source class is used to represent a source file. Because we may have include files, this is used as elements on a push-down stack of sources.
| typedef boost::shared_ptr<source> lexer::source::pointer |
| lexer::source::source | ( | const std::string & | filename, |
| calculator & | subject | ||
| ) | [private] |
| void lexer::source::close | ( | void | ) | [private] |
| lexer::source::pointer lexer::source::create | ( | const std::string & | filename, |
| calculator & | subject | ||
| ) | [static] |
| void lexer::source::error | ( | const char * | fmt, |
| ... | |||
| ) |
| void lexer::source::error_v | ( | const char * | fmt, |
| va_list | ap | ||
| ) |
| location::pointer lexer::source::get_location | ( | void | ) | const |
| int lexer::source::getch | ( | void | ) |
| void lexer::source::set_line_number | ( | int | n | ) |
| void lexer::source::ungetch | ( | int | c | ) |
std::string lexer::source::filename [private] |
FILE* lexer::source::fp [private] |
int lexer::source::line_number [private] |
long lexer::source::position [private] |
bool lexer::source::prev_was_newline [private] |
std::list<unsigned char> lexer::source::pushback [private] |
calculator& lexer::source::subject [private] |
1.7.6.1