Doctrine Lexer Use Case

Doctrine Lexer Use Case

PHPTour Lyon 2014 - 24/06/2014

418997665c4a3368515ecf9c3d746b95?s=128

Olivier Dolbeau

June 24, 2014
Tweet

Transcript

  1. 2.
  2. 7.
  3. 9.
  4. 10.
  5. 11.
  6. 12.
  7. 14.
  8. 15.
  9. 16.
  10. 17.
  11. 18.
  12. 19.
  13. 22.
  14. 23.
  15. 24.
  16. 25.
  17. 26.
  18. 31.
  19. 32.

    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.
  20. 34.
  21. 35.
  22. 36.
  23. 37.
  24. 40.
  25. 41.
  26. 42.
  27. 43.
  28. 44.
  29. 45.
  30. 46.
  31. 47.
  32. 48.
  33. 49.

    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’
  34. 54.
  35. 55.
  36. 56.
  37. 57.

    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