next up previous contents index
Next: The syntactic analyzer Up: The parser Previous: The parser   Contents   Index

The lexical analyzer

It is written directly in C because flex cannot generate C reentrant code43. That's why it is rather crude. Anyway, I was surprised to see that according to cachegrind, we do not lose much time in it.
The lexer entry point is the ``mylex'' function in nasl_grammar.y. The parser calls it; you are not supposed to do it. I mention it because that's where you can add ``tokens''.

Michel Arboi 2005-04-29