Continued work on parsing...
This commit is contained in:
parent
b5652e26cc
commit
d79697775b
@ -9,7 +9,7 @@ namespace coreutils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int LineParser::parse() {
|
int LineParser::parse() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@ namespace coreutils {
|
|||||||
public:
|
public:
|
||||||
LineParser(StreamReader &reader);
|
LineParser(StreamReader &reader);
|
||||||
|
|
||||||
virtual int parse();
|
int parse() override;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -7,15 +7,15 @@ namespace coreutils {
|
|||||||
|
|
||||||
Parser::~Parser() {}
|
Parser::~Parser() {}
|
||||||
|
|
||||||
int Parser::doParse() {
|
Status Parser::doParse() {
|
||||||
buffer << reader.unparsed();
|
buffer << reader.unparsed();
|
||||||
reader.setParsed();
|
reader.setParsed();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Parser::checkParse(Parser &parser);
|
bool Parser::checkParse(Parser &parser);
|
||||||
|
|
||||||
int Parser::Parse() {
|
Status Parser::parse() {
|
||||||
|
return Status::COMPLETE;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
9
Parser.h
9
Parser.h
@ -26,8 +26,9 @@ namespace coreutils {
|
|||||||
///
|
///
|
||||||
///
|
///
|
||||||
|
|
||||||
enum class Status : int {
|
enum class Status {
|
||||||
|
COMPLETE,
|
||||||
|
INCOMPLETE
|
||||||
};
|
};
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -40,7 +41,7 @@ namespace coreutils {
|
|||||||
/// doParse is the entry and re-entry point method to continue the parsing process.
|
/// doParse is the entry and re-entry point method to continue the parsing process.
|
||||||
///
|
///
|
||||||
|
|
||||||
int doParse();
|
Status doParse();
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Inside of parse() you can call another parser object with the checkParse method to
|
/// Inside of parse() you can call another parser object with the checkParse method to
|
||||||
@ -53,7 +54,7 @@ namespace coreutils {
|
|||||||
///
|
///
|
||||||
///
|
///
|
||||||
|
|
||||||
virtual int parse();
|
virtual Status parse();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
MString buffer;
|
MString buffer;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user