parseconfig: initialize yylineno in lexer

Some flex builds do not seem to initialize yylineno correctly resulting
in warnings from valgrind. Which ones and why is unknown. We can work
around it by just setting it to zero ourselves. It's a trivial change,
so we'll always do so to be sure.

Signed-off-by: Andreas Bofjall <andreas@gazonk.org>
common: move stringtree letter handling to stringtree

The capital_to_lower[] array was only used in stringtree so it doesn't
make sense to keep it in common. Move it to the only user instead.

Signed-off-by: Andreas Bofjall <andreas@gazonk.org>
crunch: add

Add routines for converting ascii characters to six bit "crunched"
representations. Represented characters are ' ' through '_' (0x20
through 0x5f), lower case are replaced by their upper case
representations, all others outside the range are replaced by
underscores. After replacement, they are mapped onto the range 0x00
through 0x3f (i.e. the lower six bits).

Signed-off-by: Andreas Bofjall <andreas@gazonk.org>
stringtree: crunch characters

Prevously, stringtree turned characters into their lowercase
representations and invalid characters into underscores before insertion
into the tree. Use the new crunched representations instead, in
preparation for moving to the new stringtrie algorithm instead.

Signed-off-by: Andreas Bofjall <andreas@gazonk.org>
stringtrie: add

A new way of storing strings in a trie, the stringtrie looks up every
character in two arrays: one for storing the three most significant bits
and one for the three least ones.

The stringtrie can therefore only store 64 different characters, but
this is enough for our purposes.

Signed-off-by: Andreas Bofjall <andreas@gazonk.org>
stringtrie: use instead of stringtree

The stringtrie is about twice as fast (but uses about twice the memory)
as measured on a Core i7. The performance gains outweigh the increased
memory usage.

Signed-off-by: Andreas Bofjall <andreas@gazonk.org>
cli: break long line

Just a small coding style fixup.

Signed-off-by: Andreas Bofjall <andreas@gazonk.org>
stringtree: remove

As there are no users of the stringtree data structure left, remove the
code. We don't want to keep dead code around.

Signed-off-by: Andreas Bofjall <andreas@gazonk.org>
crunch: remove and move to stringtrie

As stringtrie is the only user of the crunch framework, move it into
stringtrie. This makes it substantially faster as measured by perf on a
Core i7 since the crunch functions can be inlined in the stringtrie
code.

Signed-off-by: Andreas Bofjall <andreas@gazonk.org>