MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / PAR_blr

Function PAR_blr

src/jrd/par.cpp:171–198  ·  view source on GitHub ↗

Parse blr, returning a compiler scratch block with the results. Caller must do pool handling.

Source from the content-addressed store, hash-verified

169// Parse blr, returning a compiler scratch block with the results.
170// Caller must do pool handling.
171DmlNode* PAR_blr(thread_db* tdbb, jrd_rel* relation, const UCHAR* blr, ULONG blr_length,
172 CompilerScratch* view_csb, CompilerScratch** csb_ptr, Statement** statementPtr,
173 const bool trigger, USHORT flags)
174{
175#ifdef CMP_DEBUG
176 cmp_trace("BLR code given for JRD parsing:");
177 // CVC: Couldn't find isc_trace_printer, so changed it to gds__trace_printer.
178 fb_print_blr(blr, blr_length, gds__trace_printer, 0, 0);
179#endif
180
181 BlrParseWrapper csb(*tdbb->getDefaultPool(), relation, view_csb, csb_ptr, trigger, flags);
182
183 csb->csb_blr_reader = BlrReader(blr, blr_length);
184
185 getBlrVersion(csb);
186
187 csb->csb_node = PAR_parse_node(tdbb, csb);
188
189 if (csb->csb_blr_reader.getByte() != (UCHAR) blr_eoc)
190 PAR_syntax_error(csb, "end_of_command");
191
192 parseSubRoutines(tdbb, csb);
193
194 if (statementPtr)
195 *statementPtr = Statement::makeStatement(tdbb, csb, false);
196
197 return csb->csb_node;
198}
199
200
201// Finish parse of memory nodes, returning a compiler scratch block with the results.

Callers 3

compileMethod · 0.85
parseSubRoutinesFunction · 0.85
parseBlrMethod · 0.85

Calls 7

BlrReaderClass · 0.85
getBlrVersionFunction · 0.85
PAR_parse_nodeFunction · 0.85
PAR_syntax_errorFunction · 0.85
parseSubRoutinesFunction · 0.85
getDefaultPoolMethod · 0.45
getByteMethod · 0.45

Tested by

no test coverage detected