diff options
author | Adrian Thurston <thurston@colm.net> | 2018-07-04 13:23:21 +0700 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2018-07-04 13:23:21 +0700 |
commit | 00b1dd7777079036321afb8b3dcff0a229815517 (patch) | |
tree | 74f4d3acf8c043b03b1182e0453659cd8dca4f8a /src/pdabuild.cc | |
parent | e87efd2f55958dc4f915890091ecf436d33d8c4f (diff) | |
download | colm-00b1dd7777079036321afb8b3dcff0a229815517.tar.gz |
reusing stream impls when parsing from 'input'
To detect parsing from a top level input and to avoid appending it to a
parser's top level (thus creating a tree), added a new type for input so we can
replace the parser's top level. This change forces us to a two level structure
where stream seq is at the top and stream data underneath. Requires us to hack
the destructor so that we don't multiple delete the stream impl.
Diffstat (limited to 'src/pdabuild.cc')
-rw-r--r-- | src/pdabuild.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pdabuild.cc b/src/pdabuild.cc index 1760c9ba..ba4850df 100644 --- a/src/pdabuild.cc +++ b/src/pdabuild.cc @@ -250,6 +250,7 @@ void Compiler::makeStructElIds() sel->id = nextId++; structInbuiltId = nextId++; + structInputId = nextId++; structStreamId = nextId++; } @@ -1700,6 +1701,7 @@ void Compiler::makeRuntimeData() runtimeData->stds_el_id = stdsElSel->id; runtimeData->struct_inbuilt_id = structInbuiltId; runtimeData->struct_stream_id = structStreamId; + runtimeData->struct_input_id = structInputId; runtimeData->fsm_execute = &internalFsmExecute; runtimeData->send_named_lang_el = &internalSendNamedLangEl; |