List:Internals« Previous MessageNext Message »
From:Hartmut Holzgraefe Date:November 17 2010 6:46am
Subject:Re: mysql grammatical and semantic souce code
View as plain text  
On 11/17/2010 06:33 AM, tc yang wrote:
> 在 2010年11月17日 上午11:22,tc yang<yangtc.sub@stripped>写道:
>>
>> hi:
>>      I recently study mysql source code,  grammatical and semantic
> analysis,mysql source version 5.57
>>      but I can't find .l file for lex and .y for yacc in mysql level,innbase
> dictonary have /pars0lex.l, why mysql don't have lex source?
>>      in sql directory only have sql_lex.cc,this is generated from lex source ?
> and where is the lex source(".l" file), and how is generated?

mysql does not use lex/flex for tokenizing, it uses a self made scanner
instead, which consists of sql_lex.cc and the lex_hash.h header
generated by the bundled gen_lex_hash tool

the lex and yacc files in the innobase stem back from the time when
InnoDB was meant to be a standalone SQL database, most of this parser
is not in use anymore, parts of it are still needed to parse foreign
key constraint definitions though as far as i remember.

-- 
hartmut
Thread
Re: mysql grammatical and semantic souce codetc yang17 Nov
  • Re: mysql grammatical and semantic souce codeHartmut Holzgraefe17 Nov
    • Re: mysql grammatical and semantic souce codetc yang17 Nov
      • Re: mysql grammatical and semantic souce codeHartmut Holzgraefe17 Nov
        • Re: mysql grammatical and semantic souce codeRick James17 Nov
          • Re: mysql grammatical and semantic souce codeSergei Golubchik17 Nov
      • Re: mysql grammatical and semantic souce codeWeldon Whipple17 Nov
        • Re: mysql grammatical and semantic souce codetc yang18 Nov