• Poul-Henning Kamp's avatar
    Rewrite of the "if (foo)" code in VCC to actually build expressions · 9299780d
    Poul-Henning Kamp authored
    the way we learned to do it back in the 1950'ies.
    
    Until now, VCC has used sort of a massaged C-expression and with
    the introduction of things like regexp matching and ACLs that turned
    sort of ugly.
    
    This code is classic recursive expression parsing with a couple of
    twists:
    
    1. We don't build a tree, because we are not going to optimize stuff,
       we leave that to the C compiler.
    
    2. Instead of the tree we build a string with magic markers that
       let us get the indentation of the produced C code right anyway.
    
    3. We do type-hinted parsing, in an attempt to produce intelligent
       error messages and sensible semantics.
    
    This code passes all testcases with a single change:  We can now
    compile "if (2 == 3)".  This is probably a good thing (?)
    
    Beware of bugs...
    
    
    
    
    git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5130 d4fa192b-c00b-0410-8231-f00ffab90ce4
    9299780d
Name
Last commit
Last update
..
Makefile.am Loading commit data...
flint.lnt Loading commit data...
flint.sh Loading commit data...
generate.py Loading commit data...
vcc_acl.c Loading commit data...
vcc_action.c Loading commit data...
vcc_backend.c Loading commit data...
vcc_backend_util.c Loading commit data...
vcc_compile.c Loading commit data...
vcc_compile.h Loading commit data...
vcc_dir_dns.c Loading commit data...
vcc_dir_random.c Loading commit data...
vcc_dir_round_robin.c Loading commit data...
vcc_expr.c Loading commit data...
vcc_parse.c Loading commit data...
vcc_priv.h Loading commit data...
vcc_string.c Loading commit data...
vcc_symb.c Loading commit data...
vcc_token.c Loading commit data...
vcc_types.h Loading commit data...
vcc_var.c Loading commit data...
vcc_xref.c Loading commit data...