Posts

Showing posts with the label LGetToken

Disassembling the SQL Server parser. The LGetToken procedure - part 1

Image
Happy Sunday my dear friends and welcome back to this blog! Today we will talk about the parser component of SQL Server. We keep disassemble the parser as we already done here: SQL Server, inside the parser: the Get_Gen_Lex procedure   SQL Server, A bit of reverse engineering inside the parser: the Parser and the GetChar procedure. (attention contains news published for the first time)   I don't think it has ever been done before and I don't even know if I will end up ...maybe I could probably write a book about it, who knows!  ...but today I want to show you a few interesting things. So start your management studio enter a simple select command, start a debugger like WINDBG ...and of course "happy reading"! The LGetToken procedure The LGetToken procedure is so defined: void LGetToken(uint **param_1,uint *param_2,ushort **param_3) The param_2 contain the pointer to the sql command. This procedure is called by the yylex procedure in order to parse the T-SQL commands...