Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Doctrine Lexer Use Case

Doctrine Lexer Use Case

PHPTour Lyon 2014 - 24/06/2014

Olivier Dolbeau

June 24, 2014
Tweet

More Decks by Olivier Dolbeau

Other Decks in Programming

Transcript

  1. What’s a Lexer ? In computer science, lexical analysis is

    the process of converting a sequence of characters into a sequence of tokens, i. e. meaningful character strings.
  2. From DQL to SQL SELECT t0.id AS id1, t0.name AS

    name3, t0. username AS username4, t0.email AS email5 FROM mos_users t0 WHERE t0.username = “foobar” SELECT u FROM MyProject\Model\User u WHERE u.username = ‘foobar’
  3. Example A trip OR A search FROM "Paris, France" OR

    TO "Paris, France" BETWEEN 12/01/2013 AND 26/05/2014 A trip OR A search FROM "Paris, France" OR TO "Paris, France" BETWEEN 12/01/2013 AND 26/05/2014