First stab at modularizing (broken build)

This commit is contained in:
Keith Winstein
2011-01-27 01:17:26 -05:00
parent db5808fa1f
commit 82a18ce978
9 changed files with 295 additions and 226 deletions
+13
View File
@@ -1,8 +1,21 @@
#include <stdio.h>
#include <ctype.h>
#include "parseraction.hpp"
#include "terminal.hpp"
using namespace Parser;
std::string Parser::str( void )
{
char thechar[ 10 ] = { 0 };
if ( char_present ) {
snprintf( thechar, 10, isprint( ch ) ? "(%lc)" : "(0x%x)", act->ch );
}
return name() + std::string( thechar );
}
void Print::act_on_terminal( Terminal::Emulator *emu )
{
emu->print( this );