Example #1
0
void HumanInterface::Banner(){
	system("clear");
	WhiteSpace(102,'=');
	WhiteSpace(45,' ');
	cout<<systemName<<endl;       
	WhiteSpace(102,'=');
	cout<<endl;
       
};
Example #2
0
void DialogReaderWriter::ManageLine(TagCls* aTag)
{
	string wToken = "";
	string wValue = "";
	getline(m_Input, wToken, '=');
	getline(m_Input, wValue);
	WhiteSpace(wToken);
	aTag->setValue(wValue);
	aTag->setToken(wToken);
}
Example #3
0
// parses the next token
// returns false if done
void opScanner::ScanTokens(const inputtype& Input) {
    // if we've reached the end of the Input stream,
    // add an EOF token and return false

    int size = Input.Size();
    int current = 0;

    // TODO: the input list of chars is really a bad idea
    //		Input should be a vector, and we should not alter it,
    //		instead we should iterate over it (maybe w/ an iterator we pass
    //		around.

    while (current != size) {
        // scan for the next token
        // (with the correct precedence)
        if (current != size && Newline(Input, current))
            ;
        else if (current != size && CComment(Input, current))
            ;
        else if (current != size && Comment(Input, current))
            ;
        else if (current != size && String(Input, current))
            ;
        else if (current != size && WhiteSpace(Input, current))
            ;
        else if (current != size && Operator(Input, current))
            ;
        else if (current != size && Hexadecimals(Input, current))
            ;
        else if (current != size && Number(Input, current))
            ;
        else if (current != size && GetId(Input, current))
            ;
        else if (current != size) {
            opToken newToken(T_ANYCHAR, Input[current], CurrentLine);

            Tokens.PushBack(newToken);
            ++current;
        }
    }

    Tokens.PushBack(opToken(T_EOF, "", CurrentLine));
}