summaryrefslogtreecommitdiff
path: root/colm/pdacodegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'colm/pdacodegen.cpp')
-rw-r--r--colm/pdacodegen.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/colm/pdacodegen.cpp b/colm/pdacodegen.cpp
index 34d79061..04a980ba 100644
--- a/colm/pdacodegen.cpp
+++ b/colm/pdacodegen.cpp
@@ -193,7 +193,11 @@ void PdaCodeGen::writeRuntimeData( RuntimeData *runtimeData, PdaTables *pdaTable
out << runtimeData->lelInfo[i].genericId << ", ";
- out << runtimeData->lelInfo[i].markId;
+ out << runtimeData->lelInfo[i].markId << ", ";
+
+ out << runtimeData->lelInfo[i].captureAttr << ", ";
+
+ out << runtimeData->lelInfo[i].numCaptureAttr;
out << " }";
@@ -370,6 +374,16 @@ void PdaCodeGen::writeRuntimeData( RuntimeData *runtimeData, PdaTables *pdaTable
}
out << "};\n\n";
+ out << "CaptureAttr captureAttr[] = {\n";
+ for ( long i = 0; i < runtimeData->numCapturedAttr; i++ ) {
+ out << "\t{ " <<
+ runtimeData->captureAttr[i].mark_enter << ", " <<
+ runtimeData->captureAttr[i].mark_leave << ", " <<
+ runtimeData->captureAttr[i].offset << " },\n";
+ }
+
+ out << "};\n\n";
+
out <<
"RuntimeData main_runtimeData = \n"
"{\n"
@@ -405,6 +419,9 @@ void PdaCodeGen::writeRuntimeData( RuntimeData *runtimeData, PdaTables *pdaTable
" " << literals() << ",\n"
" " << runtimeData->numLiterals << ",\n"
"\n"
+ " captureAttr,\n"
+ " " << runtimeData->numCapturedAttr << ",\n"
+ "\n"
" &fsmTables_start,\n"
" &pid_0_pdaTables,\n"
" startStates, eofLelIds, " << runtimeData->numParsers << ",\n"