aboutsummaryrefslogtreecommitdiff
path: root/binutils/sysinfo.y
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-08-12 04:42:37 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-08-12 04:42:37 -0700
commit3aade68889268c7d15e121d6d63cb1b753ec12fa (patch)
tree9fe7a6ce752b4a79bbdaa9bed60c5044c2a3f80c /binutils/sysinfo.y
parent3739860c11a9cfcdaa4d5d204ea3536784de7bb3 (diff)
downloadgdb-3aade68889268c7d15e121d6d63cb1b753ec12fa.zip
gdb-3aade68889268c7d15e121d6d63cb1b753ec12fa.tar.gz
gdb-3aade68889268c7d15e121d6d63cb1b753ec12fa.tar.bz2
Remove trailing spaces in binutils
Diffstat (limited to 'binutils/sysinfo.y')
-rw-r--r--binutils/sysinfo.y88
1 files changed, 44 insertions, 44 deletions
diff --git a/binutils/sysinfo.y b/binutils/sysinfo.y
index 4d0ec24..558c144 100644
--- a/binutils/sysinfo.y
+++ b/binutils/sysinfo.y
@@ -40,14 +40,14 @@ extern int yylex (void);
%union {
int i;
char *s;
-}
+}
%token COND
%token REPEAT
%token '(' ')'
%token <s> TYPE
%token <s> NAME
%token <i> NUMBER UNIT
-%type <i> attr_size
+%type <i> attr_size
%type <s> attr_desc attr_id attr_type
%%
@@ -56,10 +56,10 @@ top: {
{
case 'i':
printf("#ifdef SYSROFF_SWAP_IN\n");
- break;
+ break;
case 'p':
printf("#ifdef SYSROFF_p\n");
- break;
+ break;
case 'd':
break;
case 'g':
@@ -72,7 +72,7 @@ top: {
printf("#include <ansidecl.h>\n");
break;
}
- }
+ }
it_list {
switch (writecode) {
case 'i':
@@ -80,7 +80,7 @@ it_list {
case 'g':
case 'c':
printf("#endif\n");
- break;
+ break;
case 'd':
break;
}
@@ -94,10 +94,10 @@ it_list: it it_list
;
it:
- '(' NAME NUMBER
+ '(' NAME NUMBER
{
it = $2; code = $3;
- switch (writecode)
+ switch (writecode)
{
case 'd':
printf("\n\n\n#define IT_%s_CODE 0x%x\n", it,code);
@@ -116,7 +116,7 @@ it:
printf("\tunsigned char raw[255];\n");
printf("\tint idx = 0;\n");
printf("\tint size;\n");
- printf("\tmemset(raw,0,255);\n");
+ printf("\tmemset(raw,0,255);\n");
printf("\tmemset(ptr,0,sizeof(*ptr));\n");
printf("\tsize = fillup(raw);\n");
break;
@@ -143,17 +143,17 @@ it:
break;
}
- }
- it_field_list
+ }
+ it_field_list
')'
{
switch (writecode) {
- case 'd':
+ case 'd':
printf("};\n");
break;
case 'g':
printf("\tchecksum(ffile,raw, idx, IT_%s_CODE);\n", it);
-
+
case 'i':
case 'o':
@@ -167,7 +167,7 @@ it:
it_field_list:
it_field it_field_list
- | cond_it_field it_field_list
+ | cond_it_field it_field_list
| repeat_it_field it_field_list
|
;
@@ -175,7 +175,7 @@ it_field_list:
repeat_it_field: '(' REPEAT NAME
{
rdepth++;
- switch (writecode)
+ switch (writecode)
{
case 'c':
if (rdepth==1)
@@ -186,13 +186,13 @@ repeat_it_field: '(' REPEAT NAME
case 'g':
case 'o':
- if (rdepth==1)
+ if (rdepth==1)
{
printf("\t{ int n; for (n = 0; n < %s; n++) {\n", $3);
}
if (rdepth == 2) {
printf("\t{ int m; for (m = 0; m < %s[n]; m++) {\n", $3);
- }
+ }
break;
}
@@ -201,7 +201,7 @@ repeat_it_field: '(' REPEAT NAME
repeat = $3;
}
- it_field_list ')'
+ it_field_list ')'
{
repeat = oldrepeat;
@@ -221,7 +221,7 @@ repeat_it_field: '(' REPEAT NAME
cond_it_field: '(' COND NAME
{
- switch (writecode)
+ switch (writecode)
{
case 'i':
case 'g':
@@ -232,7 +232,7 @@ cond_it_field: '(' COND NAME
}
}
- it_field_list ')'
+ it_field_list ')'
{
switch (writecode)
{
@@ -246,8 +246,8 @@ cond_it_field: '(' COND NAME
;
it_field:
- '(' attr_desc '(' attr_type attr_size ')' attr_id
- {name = $7; }
+ '(' attr_desc '(' attr_type attr_size ')' attr_id
+ {name = $7; }
enums ')'
{
char *desc = $2;
@@ -256,12 +256,12 @@ it_field:
char *id = $7;
char *p = names[rdepth];
char *ptr = pnames[rdepth];
- switch (writecode)
+ switch (writecode)
{
case 'g':
- if (size % 8)
+ if (size % 8)
{
-
+
printf("\twriteBITS(ptr->%s%s,raw,&idx,%d);\n",
id,
names[rdepth], size);
@@ -273,15 +273,15 @@ char *ptr = pnames[rdepth];
id,
names[rdepth],size/8);
}
- break;
+ break;
case 'i':
{
if (rdepth >= 1)
{
- printf("if (!ptr->%s) ptr->%s = (%s*)xcalloc(%s, sizeof(ptr->%s[0]));\n",
- id,
+ printf("if (!ptr->%s) ptr->%s = (%s*)xcalloc(%s, sizeof(ptr->%s[0]));\n",
+ id,
id,
type,
repeat,
@@ -290,8 +290,8 @@ char *ptr = pnames[rdepth];
if (rdepth == 2)
{
- printf("if (!ptr->%s[n]) ptr->%s[n] = (%s**)xcalloc(%s[n], sizeof(ptr->%s[n][0]));\n",
- id,
+ printf("if (!ptr->%s[n]) ptr->%s[n] = (%s**)xcalloc(%s[n], sizeof(ptr->%s[n][0]));\n",
+ id,
id,
type,
repeat,
@@ -300,11 +300,11 @@ char *ptr = pnames[rdepth];
}
- if (size % 8)
+ if (size % 8)
{
printf("\tptr->%s%s = getBITS(raw,&idx, %d,size);\n",
id,
- names[rdepth],
+ names[rdepth],
size);
}
else {
@@ -319,7 +319,7 @@ char *ptr = pnames[rdepth];
printf("\tput%s(raw,%d,%d,&idx,ptr->%s%s);\n", type,size/8,size%8,id,names[rdepth]);
break;
case 'd':
- if (repeat)
+ if (repeat)
printf("\t/* repeat %s */\n", repeat);
if (type[0] == 'I') {
@@ -341,7 +341,7 @@ char *ptr = pnames[rdepth];
else if (type[0] == 'C')
printf("\tprintf(\"%%s\\n\",ptr->%s%s);\n", id,p);
- else if (type[0] == 'B')
+ else if (type[0] == 'B')
{
printf("\tpbarray(&ptr->%s%s);\n", id,p);
}
@@ -353,18 +353,18 @@ char *ptr = pnames[rdepth];
;
-attr_type:
+attr_type:
TYPE { $$ = $1; }
| { $$ = "INT";}
;
-attr_desc:
- '(' NAME ')'
+attr_desc:
+ '(' NAME ')'
{ $$ = $2; }
;
attr_size:
- NUMBER UNIT
+ NUMBER UNIT
{ $$ = $1 * $2; }
;
@@ -372,15 +372,15 @@ attr_size:
attr_id:
'(' NAME ')' { $$ = $2; }
| { $$ = "dummy";}
- ;
-
-enums:
+ ;
+
+enums:
| '(' enum_list ')' ;
enum_list:
|
- enum_list '(' NAME NAME ')' {
- switch (writecode)
+ enum_list '(' NAME NAME ')' {
+ switch (writecode)
{
case 'd':
printf("#define %s %s\n", $3,$4);
@@ -404,7 +404,7 @@ enum_list:
int yydebug;
-int
+int
main (int ac, char **av)
{
yydebug=0;