diff --git a/include/xo/reader2/DExprSeqState.hpp b/include/xo/reader2/DExprSeqState.hpp index 83448b5e..150303c6 100644 --- a/include/xo/reader2/DExprSeqState.hpp +++ b/include/xo/reader2/DExprSeqState.hpp @@ -41,16 +41,17 @@ namespace xo { using Super = DSyntaxStateMachine; using TypeDescr = xo::reflect::TypeDescr; using AAllocator = xo::mm::AAllocator; + using DArena = xo::mm::DArena; using ppindentinfo = xo::print::ppindentinfo; public: explicit DExprSeqState(exprseqtype ty); /** start interactive top-level session **/ - static void establish_interactive(obj mm, + static void establish_interactive(DArena & mm, ParserStateMachine * p_psm); /** start non-interactive top-level session **/ - static void establish_batch(obj mm, + static void establish_batch(DArena & mm, ParserStateMachine * p_psm); public: diff --git a/src/reader2/DExprSeqState.cpp b/src/reader2/DExprSeqState.cpp index 1d9b38a3..8261b506 100644 --- a/src/reader2/DExprSeqState.cpp +++ b/src/reader2/DExprSeqState.cpp @@ -35,6 +35,7 @@ namespace xo { using xo::scm::DFloat; using xo::mm::AGCObject; using xo::mm::AAllocator; + using xo::mm::DArena; using xo::facet::with_facet; using xo::reflect::typeseq; @@ -59,7 +60,7 @@ namespace xo { namespace { obj - make_exprseq_ssm(obj mm, + make_exprseq_ssm(DArena & mm, exprseqtype seqtype) { void * mem = mm.alloc(typeseq::id(), @@ -67,12 +68,12 @@ namespace xo { DExprSeqState * ssm = new (mem) DExprSeqState(seqtype); - return with_facet::mkobj(ssm); + return obj(ssm); } } void - DExprSeqState::establish_interactive(obj mm, + DExprSeqState::establish_interactive(DArena & mm, ParserStateMachine * p_psm) { p_psm->establish_toplevel_ssm(make_exprseq_ssm @@ -81,7 +82,7 @@ namespace xo { } void - DExprSeqState::establish_batch(obj mm, + DExprSeqState::establish_batch(DArena & mm, ParserStateMachine * p_psm) { p_psm->establish_toplevel_ssm(make_exprseq_ssm diff --git a/src/reader2/SchematikaParser.cpp b/src/reader2/SchematikaParser.cpp index 37ebdd05..3a30b18a 100644 --- a/src/reader2/SchematikaParser.cpp +++ b/src/reader2/SchematikaParser.cpp @@ -65,14 +65,14 @@ namespace xo { void SchematikaParser::begin_interactive_session() { - DExprSeqState::establish_interactive(psm_.expr_alloc(), &psm_); + DExprSeqState::establish_interactive(psm_.parser_alloc(), &psm_); } void SchematikaParser::begin_batch_session() { - DExprSeqState::establish_batch(psm_.expr_alloc(), &psm_); + DExprSeqState::establish_batch(psm_.parser_alloc(), &psm_); } const ParserResult &