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

Function PAR_parse

src/jrd/par.cpp:673–710  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

671}
672
673CompilerScratch* PAR_parse(thread_db* tdbb, const UCHAR* blr, ULONG blr_length,
674 bool internal_flag, ULONG dbginfo_length, const UCHAR* dbginfo)
675{
676/**************************************
677 *
678 * P A R _ p a r s e
679 *
680 **************************************
681 *
682 * Functional description
683 * Parse blr, returning a compiler scratch block with the results.
684 *
685 **************************************/
686 SET_TDBB(tdbb);
687
688 MemoryPool& pool = *tdbb->getDefaultPool();
689 AutoPtr<CompilerScratch> csb(FB_NEW_POOL(pool) CompilerScratch(pool));
690
691 csb->csb_blr_reader = BlrReader(blr, blr_length);
692
693 if (internal_flag)
694 csb->csb_g_flags |= csb_internal;
695
696 getBlrVersion(csb);
697
698 if (dbginfo_length > 0)
699 DBG_parse_debug_info(dbginfo_length, dbginfo, *csb->csb_dbg_info);
700
701 DmlNode* node = PAR_parse_node(tdbb, csb);
702 csb->csb_node = node;
703
704 if (csb->csb_blr_reader.getByte() != (UCHAR) blr_eoc)
705 PAR_syntax_error(csb, "end_of_command");
706
707 parseSubRoutines(tdbb, csb);
708
709 return csb.release();
710}
711
712
713SLONG PAR_symbol_to_gdscode(const Firebird::string& name)

Callers 2

transactRequestMethod · 0.85
CMP_compileFunction · 0.85

Calls 11

SET_TDBBFunction · 0.85
BlrReaderClass · 0.85
getBlrVersionFunction · 0.85
DBG_parse_debug_infoFunction · 0.85
PAR_parse_nodeFunction · 0.85
PAR_syntax_errorFunction · 0.85
parseSubRoutinesFunction · 0.85
CompilerScratchClass · 0.70
getDefaultPoolMethod · 0.45
getByteMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected