From: Michael Stapelberg Date: Sat, 13 Feb 2010 14:27:43 +0000 (+0100) Subject: parser: enable verbose error messages, add aliases to tokens X-Git-Tag: 3.e~6^2~148 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=79a4e304888f2ddaf84be34ff138cc571d057e38;p=i3%2Fi3 parser: enable verbose error messages, add aliases to tokens --- diff --git a/src/cfgparse.y b/src/cfgparse.y index 6b458e2c..1ce75724 100644 --- a/src/cfgparse.y +++ b/src/cfgparse.y @@ -161,6 +161,7 @@ void parse_file(const char *f) { %} %expect 1 +%error-verbose %union { int number; @@ -170,36 +171,36 @@ void parse_file(const char *f) { struct Binding *binding; } -%token NUMBER -%token WORD -%token STR -%token STR_NG -%token HEX +%token NUMBER "" +%token WORD "" +%token STR "" +%token STR_NG "" +%token HEX "" %token TOKBIND %token TOKTERMINAL -%token TOKCOMMENT -%token TOKFONT -%token TOKBINDSYM -%token MODIFIER -%token TOKCONTROL -%token TOKSHIFT -%token WHITESPACE -%token TOKFLOATING_MODIFIER -%token QUOTEDSTRING -%token TOKWORKSPACE -%token TOKSCREEN -%token TOKASSIGN +%token TOKCOMMENT "" +%token TOKFONT "font" +%token TOKBINDSYM "bindsym" +%token MODIFIER "" +%token TOKCONTROL "control" +%token TOKSHIFT "shift" +%token WHITESPACE "" +%token TOKFLOATING_MODIFIER "floating_modifier" +%token QUOTEDSTRING "" +%token TOKWORKSPACE "workspace" +%token TOKSCREEN "screen" +%token TOKASSIGN "assign" %token TOKSET -%token TOKIPCSOCKET -%token TOKEXEC +%token TOKIPCSOCKET "ipc_socket" +%token TOKEXEC "exec" %token TOKCOLOR -%token TOKARROW -%token TOKMODE -%token TOKNEWCONTAINER -%token TOKNEWWINDOW -%token TOKFOCUSFOLLOWSMOUSE -%token TOKCONTAINERMODE -%token TOKSTACKLIMIT +%token TOKARROW "→" +%token TOKMODE "mode" +%token TOKNEWCONTAINER "new_container" +%token TOKNEWWINDOW "new_window" +%token TOKFOCUSFOLLOWSMOUSE "focus_follows_mouse" +%token TOKCONTAINERMODE "default/stacking/tabbed" +%token TOKSTACKLIMIT "stack-limit" %%