Resolve keysyms early in parser
authorRan Benita <ran234@gmail.com>
Wed, 27 Nov 2013 11:49:13 +0000 (13:49 +0200)
committerRan Benita <ran234@gmail.com>
Wed, 27 Nov 2013 11:52:54 +0000 (13:52 +0200)
commit9dc5b8cb6097c5bfd61dbe6a17b59aa8fe9638e5
treea5944d0ed8308e52dc89b0831efa3dc5b0f0f4d1
parentba7530fa90795e077e685346444ebe3a3c1595ee
Resolve keysyms early in parser

Instead of having the parser passing strings to the AST, and
symbols/compat etc. resolving them themselves. This simplifies the code
a bit, and makes it possible to print where exactly in the file the bad
keysym originates from.

The previous lazy approach had an advantage of not needlessly resolving
keysyms from unrelated maps. However, I think reporting these errors in
*any* map is better, and the parser is also a bit smarter then old
xkbcomp and doesn't parse many useless maps. So there's no discernible
speed/memory difference with this change.

Signed-off-by: Ran Benita <ran234@gmail.com>
src/xkbcomp/ast-build.c
src/xkbcomp/ast-build.h
src/xkbcomp/ast.h
src/xkbcomp/compat.c
src/xkbcomp/parser.y
src/xkbcomp/symbols.c
src/xkbcomp/xkbcomp-priv.h