[OpenSIPS/opensips] 55e874: DEV-1: Avoid printing the include trace multiple t...

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[OpenSIPS/opensips] 55e874: DEV-1: Avoid printing the include trace multiple t...

Bogdan Andrei IANCU
  Branch: refs/heads/feature/pluggable-preprocessor
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 55e874ff3ddea54b54ecfe8561836f9331871102
      https://github.com/OpenSIPS/opensips/commit/55e874ff3ddea54b54ecfe8561836f9331871102
  Author: Liviu Chircu <[hidden email]>
  Date:   2019-02-22 (Fri, 22 Feb 2019)

  Changed paths:
    M cfg_pp.c

  Log Message:
  -----------
  DEV-1: Avoid printing the include trace multiple times


  Commit: 134424deabb8fecaa4863a952d8149d8d4db675a
      https://github.com/OpenSIPS/opensips/commit/134424deabb8fecaa4863a952d8149d8d4db675a
  Author: Liviu Chircu <[hidden email]>
  Date:   2019-02-22 (Fri, 22 Feb 2019)

  Changed paths:
    M cfg.lex
    M cfg.y
    M cfg_pp.c
    M cfg_pp.h

  Log Message:
  -----------
  DEV-1: Digest the pp tokens within lexer, not parser!

Using the lexer to consume the preprocessor tokens makes life so much
easier, as otherwise the complexity of the scripting language grammer
would skyrocket.  Example problem which is avoided by this:

if
<pp_token may go here>
(
<pp_token may go here>
condition
<pp_token may go here>
)
<pp_token may go here>
{
<pp_token may go here>
$var(x) = 5;
<pp_token may go here>
}

Although the coding style is horrible, this is still valid script
syntax, but, all of a sudden, the grammar must be extended in order to
support random tokens on any possible line of this "if" statement.
Nope, not going there.  Just use the lexer to eat the tokens and be done
with the problem!


Compare: https://github.com/OpenSIPS/opensips/compare/46491c764cdb...134424deabb8

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel