[TYPO3-50-general] TypoScript 2.0 EBNF

Christian Welzel gawain at camlann.de
Tue Jun 12 09:24:37 CEST 2007

Robert Lemke wrote:

> Yes, you're right. However, I decided to not program a lexer because
> after
> starting with it I realized it would only complicate things if we worked
> with tokens and even tokenize ourselves. Instead of writing my own
> FSM [1]
> I just used regular expressions.

I do not think, that it complicates things. It even simplifies them.
There are three big advanteges for using a lexer in a compiler
(additionally to the better readability agains regexps):
1) you can implement the ebnf really straight forward if you
   have not to hassle with pattern matching in the parser.
2) a lexer+parser combo is faster than regexps.
3) things like
blabla.value = "text 'text'"
blabla.value ='small \'text'
   are handled by the lexer. you dont have to deal with it in the

 MfG, Christian Welzel

  GPG-Key:     http://www.camlann.de/key.asc
  Fingerprint: 4F50 19BF 3346 36A6 CFA9 DBDC C268 6D24 70A1 AD15

More information about the TYPO3-project-5_0-general mailing list