parser: untabify

Run vim's :%retab and some resulting indention fixes.

Signed-off-by: Ran Benita <ran234@gmail.com>
master
Ran Benita 2012-07-25 21:37:20 +03:00
parent 724f62c8e3
commit 01c81fa61e
2 changed files with 694 additions and 733 deletions

File diff suppressed because it is too large Load Diff

View File

@ -66,15 +66,15 @@ scanner_error_extra(struct YYLTYPE *loc, struct scanner_extra *extra,
"//"[^\n]* "//"[^\n]*
"#"[^\n]* "#"[^\n]*
\" yyextra->s = yyextra->scanBuf; BEGIN(S_STR); \" yyextra->s = yyextra->scanBuf; BEGIN(S_STR);
\< yyextra->s = yyextra->scanBuf; BEGIN(S_KEY); \< yyextra->s = yyextra->scanBuf; BEGIN(S_KEY);
<S_STR>\" { <S_STR>\" {
BEGIN(INITIAL); BEGIN(INITIAL);
*yyextra->s = '\0'; *yyextra->s = '\0';
yylval->str = strdup(yyextra->scanBuf); yylval->str = strdup(yyextra->scanBuf);
return STRING; return STRING;
} }
<S_KEY>\> { <S_KEY>\> {
BEGIN(INITIAL); BEGIN(INITIAL);
@ -90,120 +90,120 @@ scanner_error_extra(struct YYLTYPE *loc, struct scanner_extra *extra,
} }
<S_STR,S_KEY>\\[0-7]{1,3} { <S_STR,S_KEY>\\[0-7]{1,3} {
/* octal escape sequence */ /* octal escape sequence */
unsigned int result; unsigned int result;
(void) sscanf( yytext + 1, "%o", &result ); (void) sscanf( yytext + 1, "%o", &result );
if (result > 0xff) { if (result > 0xff) {
scanner_error_extra(yylloc, yyextra, scanner_error_extra(yylloc, yyextra,
"Illegal octal escape"); "Illegal octal escape");
return ERROR_TOK; return ERROR_TOK;
} }
APPEND_S(result); APPEND_S(result);
} }
<S_STR,S_KEY>\\[0-9]+ { <S_STR,S_KEY>\\[0-9]+ {
scanner_error_extra(yylloc, yyextra, scanner_error_extra(yylloc, yyextra,
"Illegal octal escape"); "Illegal octal escape");
return ERROR_TOK; return ERROR_TOK;
} }
<S_STR,S_KEY>\\n APPEND_S('\n'); <S_STR,S_KEY>\\n APPEND_S('\n');
<S_STR,S_KEY>\\t APPEND_S('\t'); <S_STR,S_KEY>\\t APPEND_S('\t');
<S_STR,S_KEY>\\r APPEND_S('\r'); <S_STR,S_KEY>\\r APPEND_S('\r');
<S_STR,S_KEY>\\b APPEND_S('\b'); <S_STR,S_KEY>\\b APPEND_S('\b');
<S_STR,S_KEY>\\f APPEND_S('\f'); <S_STR,S_KEY>\\f APPEND_S('\f');
<S_STR,S_KEY>\\v APPEND_S('\v'); <S_STR,S_KEY>\\v APPEND_S('\v');
<S_STR,S_KEY>\\e APPEND_S('\033'); <S_STR,S_KEY>\\e APPEND_S('\033');
<S_STR,S_KEY>. APPEND_S(yytext[0]); <S_STR,S_KEY>. APPEND_S(yytext[0]);
xkb_keymap return XKB_KEYMAP; xkb_keymap return XKB_KEYMAP;
xkb_keycodes return XKB_KEYCODES; xkb_keycodes return XKB_KEYCODES;
xkb_types return XKB_TYPES; xkb_types return XKB_TYPES;
xkb_symbols return XKB_SYMBOLS; xkb_symbols return XKB_SYMBOLS;
xkb_compat return XKB_COMPATMAP; xkb_compat return XKB_COMPATMAP;
xkb_compat_map return XKB_COMPATMAP; xkb_compat_map return XKB_COMPATMAP;
xkb_compatibility return XKB_COMPATMAP; xkb_compatibility return XKB_COMPATMAP;
xkb_compatibility_map return XKB_COMPATMAP; xkb_compatibility_map return XKB_COMPATMAP;
xkb_geometry return XKB_GEOMETRY; xkb_geometry return XKB_GEOMETRY;
xkb_semantics return XKB_SEMANTICS; xkb_semantics return XKB_SEMANTICS;
xkb_layout return XKB_LAYOUT; xkb_layout return XKB_LAYOUT;
include return INCLUDE; include return INCLUDE;
override return OVERRIDE; override return OVERRIDE;
augment return AUGMENT; augment return AUGMENT;
replace return REPLACE; replace return REPLACE;
alternate return ALTERNATE; alternate return ALTERNATE;
partial return PARTIAL; partial return PARTIAL;
default return DEFAULT; default return DEFAULT;
hidden return HIDDEN; hidden return HIDDEN;
virtual_modifiers return VIRTUAL_MODS; virtual_modifiers return VIRTUAL_MODS;
type return TYPE; type return TYPE;
interpret return INTERPRET; interpret return INTERPRET;
action return ACTION_TOK; action return ACTION_TOK;
key return KEY; key return KEY;
alias return ALIAS; alias return ALIAS;
group return GROUP; group return GROUP;
modmap return MODIFIER_MAP; modmap return MODIFIER_MAP;
mod_map return MODIFIER_MAP; mod_map return MODIFIER_MAP;
modifier_map return MODIFIER_MAP; modifier_map return MODIFIER_MAP;
indicator return INDICATOR; indicator return INDICATOR;
shape return SHAPE; shape return SHAPE;
row return ROW; row return ROW;
keys return KEYS; keys return KEYS;
section return SECTION; section return SECTION;
overlay return OVERLAY; overlay return OVERLAY;
text return TEXT; text return TEXT;
outline return OUTLINE; outline return OUTLINE;
solid return SOLID; solid return SOLID;
logo return LOGO; logo return LOGO;
virtual return VIRTUAL; virtual return VIRTUAL;
alphanumeric_keys return ALPHANUMERIC_KEYS; alphanumeric_keys return ALPHANUMERIC_KEYS;
modifier_keys return MODIFIER_KEYS; modifier_keys return MODIFIER_KEYS;
keypad_keys return KEYPAD_KEYS; keypad_keys return KEYPAD_KEYS;
function_keys return FUNCTION_KEYS; function_keys return FUNCTION_KEYS;
alternate_group return ALTERNATE_GROUP; alternate_group return ALTERNATE_GROUP;
[a-zA-Z_][a-zA-Z_0-9]* yylval->str = strdup(yytext); return IDENT; [a-zA-Z_][a-zA-Z_0-9]* yylval->str = strdup(yytext); return IDENT;
0x[a-fA-F0-9]+ | 0x[a-fA-F0-9]+ |
[0-9]+ { [0-9]+ {
char *end; char *end;
yylval->num = strtoul(yytext, &end, 0); yylval->num = strtoul(yytext, &end, 0);
return INTEGER; return INTEGER;
} }
[0-9]+\.[0-9]+ { [0-9]+\.[0-9]+ {
char *end; char *end;
yylval->num = strtod(yytext, &end) * XkbGeomPtsPerMM; yylval->num = strtod(yytext, &end) * XkbGeomPtsPerMM;
return FLOAT; return FLOAT;
} }
"=" return EQUALS; "=" return EQUALS;
"+" return PLUS; "+" return PLUS;
"-" return MINUS; "-" return MINUS;
"/" return DIVIDE; "/" return DIVIDE;
"*" return TIMES; "*" return TIMES;
"{" return OBRACE; "{" return OBRACE;
"}" return CBRACE; "}" return CBRACE;
"(" return OPAREN; "(" return OPAREN;
")" return CPAREN; ")" return CPAREN;
"[" return OBRACKET; "[" return OBRACKET;
"]" return CBRACKET; "]" return CBRACKET;
"." return DOT; "." return DOT;
"," return COMMA; "," return COMMA;
";" return SEMI; ";" return SEMI;
"!" return EXCLAM; "!" return EXCLAM;
"~" return INVERT; "~" return INVERT;
[ \t\r\n\v]+ [ \t\r\n\v]+
<<EOF>> return END_OF_FILE; <<EOF>> return END_OF_FILE;
. return ERROR_TOK; . return ERROR_TOK;
%% %%