mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-09 21:53:40 +00:00
Try some things: (a) fewer allocations - parse context pool; lexer string pool (b) SWAR process multiple chars at once in keywords/enums/strs/stc.
This commit is contained in:
@@ -48,9 +48,10 @@ extern const char *IFCOPENSHELL_VERSION;
|
||||
namespace IfcParse {
|
||||
|
||||
/// A stream of tokens to be read from a FileReader.
|
||||
template <typename Reader>
|
||||
class IFC_PARSE_API IfcSpfLexer {
|
||||
private:
|
||||
IfcCharacterDecoder* decoder_;
|
||||
IfcCharacterDecoder<Reader>* decoder_;
|
||||
size_t skipWhitespace() const;
|
||||
size_t skipComment() const;
|
||||
|
||||
@@ -68,9 +69,9 @@ class IFC_PARSE_API IfcSpfLexer {
|
||||
}
|
||||
}
|
||||
|
||||
FileReader* stream;
|
||||
Reader* stream;
|
||||
// IfcFile* file;
|
||||
IfcSpfLexer(FileReader* stream);
|
||||
IfcSpfLexer(Reader* stream);
|
||||
Token Next();
|
||||
~IfcSpfLexer();
|
||||
// void TokenString(size_t offset, std::string& result);
|
||||
|
||||
Reference in New Issue
Block a user