diff options
author | Adrian Thurston <thurston@complang.org> | 2014-12-26 15:42:57 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2014-12-26 15:42:57 -0500 |
commit | 7709fdb5aa27cdc55dbe999b2ed5ba995648dc60 (patch) | |
tree | bbc0f10171db3eeae56c4a8f061830e15b9c05de /src/compiler.cc | |
parent | aa7f56241b5bc4ecc77cff606122ba51654e18a6 (diff) | |
download | colm-7709fdb5aa27cdc55dbe999b2ed5ba995648dc60.tar.gz |
started converting stream to object type
Diffstat (limited to 'src/compiler.cc')
-rw-r--r-- | src/compiler.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/compiler.cc b/src/compiler.cc index 7978f631..9f588853 100644 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -366,6 +366,9 @@ Compiler::Compiler( ) argv0(0), argvList(0), + stream(0), + streamSel(0), + uniqueTypeNil(0), uniqueTypePtr(0), uniqueTypeBool(0), @@ -968,13 +971,9 @@ PdaRun *Compiler::parsePattern( Program *prg, Tree **sp, const InputLoc &loc, PdaRun *pdaRun = new PdaRun; initPdaRun( prg, pdaRun, pdaTables, parserId, 0, false, 0 ); - Stream *res = streamAllocate( prg ); - res->id = LEL_ID_STREAM; - res->in = sourceStream; - - Tree *ptr = constructPointer( prg, (Tree*)res ); + Tree *stream = constructStream( prg ); - in->funcs->appendStream( in, ptr ); + in->funcs->appendStream( in, stream ); in->funcs->setEof( in ); long pcr = parseLoop( prg, sp, pdaRun, in, PcrStart ); @@ -998,7 +997,6 @@ PdaRun *Compiler::parsePattern( Program *prg, Tree **sp, const InputLoc &loc, return pdaRun; } - void Compiler::parsePatterns() { Program *prg = colm_new_program( runtimeData ); |