parser: enable verbose error messages, add aliases to tokens

This commit is contained in:
Michael Stapelberg 2010-02-13 15:27:43 +01:00
parent e446747812
commit 79a4e30488
1 changed files with 27 additions and 26 deletions

View File

@ -161,6 +161,7 @@ void parse_file(const char *f) {
%} %}
%expect 1 %expect 1
%error-verbose
%union { %union {
int number; int number;
@ -170,36 +171,36 @@ void parse_file(const char *f) {
struct Binding *binding; struct Binding *binding;
} }
%token <number>NUMBER %token <number>NUMBER "<number>"
%token <string>WORD %token <string>WORD "<word>"
%token <string>STR %token <string>STR "<string>"
%token <string>STR_NG %token <string>STR_NG "<string (non-greedy)>"
%token <string>HEX %token <string>HEX "<hex>"
%token TOKBIND %token TOKBIND
%token TOKTERMINAL %token TOKTERMINAL
%token TOKCOMMENT %token TOKCOMMENT "<comment>"
%token TOKFONT %token TOKFONT "font"
%token TOKBINDSYM %token TOKBINDSYM "bindsym"
%token MODIFIER %token MODIFIER "<modifier>"
%token TOKCONTROL %token TOKCONTROL "control"
%token TOKSHIFT %token TOKSHIFT "shift"
%token WHITESPACE %token WHITESPACE "<whitespace>"
%token TOKFLOATING_MODIFIER %token TOKFLOATING_MODIFIER "floating_modifier"
%token QUOTEDSTRING %token QUOTEDSTRING "<quoted string>"
%token TOKWORKSPACE %token TOKWORKSPACE "workspace"
%token TOKSCREEN %token TOKSCREEN "screen"
%token TOKASSIGN %token TOKASSIGN "assign"
%token TOKSET %token TOKSET
%token TOKIPCSOCKET %token TOKIPCSOCKET "ipc_socket"
%token TOKEXEC %token TOKEXEC "exec"
%token TOKCOLOR %token TOKCOLOR
%token TOKARROW %token TOKARROW "→"
%token TOKMODE %token TOKMODE "mode"
%token TOKNEWCONTAINER %token TOKNEWCONTAINER "new_container"
%token TOKNEWWINDOW %token TOKNEWWINDOW "new_window"
%token TOKFOCUSFOLLOWSMOUSE %token TOKFOCUSFOLLOWSMOUSE "focus_follows_mouse"
%token TOKCONTAINERMODE %token TOKCONTAINERMODE "default/stacking/tabbed"
%token TOKSTACKLIMIT %token TOKSTACKLIMIT "stack-limit"
%% %%