Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
c4c7fef1
Commit
c4c7fef1
authored
Mar 28, 1993
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated for recent change in c-parse.gperf.
From-SVN: r3897
parent
4752d3bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
58 deletions
+67
-58
gcc/c-lex.c
+67
-58
No files found.
gcc/c-lex.c
View file @
c4c7fef1
...
...
@@ -96,12 +96,12 @@ static int ignore_escape_flag = 0;
/* Command-line: gperf -p -j1 -i 1 -g -o -t -N is_reserved_word -k1,3,$ c-parse.gperf */
struct
resword
{
char
*
name
;
short
token
;
enum
rid
rid
;
};
#define TOTAL_KEYWORDS
57
#define TOTAL_KEYWORDS
61
#define MIN_WORD_LENGTH 2
#define MAX_WORD_LENGTH 13
#define MIN_HASH_VALUE
8
#define MAX_HASH_VALUE
76
/* maximum key range =
69
, duplicates = 0 */
#define MIN_HASH_VALUE
10
#define MAX_HASH_VALUE
95
/* maximum key range =
86
, duplicates = 0 */
#ifdef __GNUC__
__inline
...
...
@@ -113,19 +113,19 @@ hash (str, len)
{
static
unsigned
char
asso_values
[]
=
{
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
77
,
1
,
77
,
21
,
5
,
18
,
7
,
11
,
1
,
9
,
2
,
5
,
77
,
1
,
26
,
26
,
27
,
47
,
12
,
77
,
24
,
2
,
1
,
33
,
27
,
2
,
11
,
77
,
3
,
77
,
77
,
77
,
77
,
77
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
96
,
1
,
96
,
15
,
13
,
23
,
1
,
6
,
32
,
36
,
3
,
5
,
96
,
1
,
20
,
29
,
31
,
44
,
19
,
96
,
13
,
2
,
1
,
54
,
39
,
11
,
5
,
96
,
3
,
96
,
96
,
96
,
96
,
96
,
};
register
int
hval
=
len
;
...
...
@@ -151,73 +151,82 @@ is_reserved_word (str, len)
{
static
struct
resword
wordlist
[]
=
{
{
""
,},
{
""
,},
{
""
,},
{
""
,},
{
""
,},
{
""
,},
{
""
,},
{
""
,},
{
"if"
,
IF
,
NORID
},
{
""
,},
{
""
,},
{
""
,},
{
""
,},
{
""
,},
{
""
,},
{
""
,},
{
""
,},
{
""
,},
{
""
,},
{
"int"
,
TYPESPEC
,
RID_INT
},
{
"
__typeof"
,
TYPEOF
,
NORID
},
{
"
sizeof"
,
SIZEOF
,
NORI
D
},
{
"
"
,},
{
"
__signed"
,
TYPESPEC
,
RID_SIGNE
D
},
{
"__typeof__"
,
TYPEOF
,
NORID
},
{
"__signed__"
,
TYPESPEC
,
RID_SIGNED
},
{
"__imag__"
,
IMAGPART
,
NORID
},
{
"switch"
,
SWITCH
,
NORID
},
{
"default"
,
DEFAULT
,
NORID
},
{
"__inline__"
,
SCSPEC
,
RID_INLINE
},
{
"
__signed"
,
TYPESPEC
,
RID_SIGNE
D
},
{
"
else"
,
ELSE
,
NORI
D
},
{
"__iterator__"
,
SCSPEC
,
RID_ITERATOR
},
{
"typeof"
,
TYPEOF
,
NORID
},
{
"typedef"
,
SCSPEC
,
RID_TYPEDEF
},
{
"break"
,
BREAK
,
NORID
},
{
"while"
,
WHILE
,
NORID
},
{
"signed"
,
TYPESPEC
,
RID_SIGNED
},
{
"__inline"
,
SCSPEC
,
RID_INLINE
},
{
"__extension__"
,
EXTENSION
,
NORID
},
{
"__const"
,
TYPE_QUAL
,
RID_CONST
},
{
"else"
,
ELSE
,
NORID
},
{
"__const__"
,
TYPE_QUAL
,
RID_CONST
},
{
"__asm__"
,
ASM_KEYWORD
,
NORID
},
{
"__complex__"
,
TYPESPEC
,
RID_COMPLEX
},
{
"__alignof"
,
ALIGNOF
,
NORID
},
{
"struct"
,
STRUCT
,
NORID
},
{
"__real__"
,
REALPART
,
NORID
},
{
"__asm__"
,
ASM_KEYWORD
,
NORID
},
{
"break"
,
BREAK
,
NORID
},
{
""
,},
{
"while"
,
WHILE
,
NORID
},
{
"__alignof__"
,
ALIGNOF
,
NORID
},
{
"
case"
,
CASE
,
NORID
},
{
"
__iterator"
,
SCSPEC
,
RID_ITERATOR
},
{
"__attribute__"
,
ATTRIBUTE
,
NORID
},
{
"__label__"
,
LABEL
,
NORID
},
{
""
,},
{
"__complex"
,
TYPESPEC
,
RID_COMPLEX
},
{
"__iterator"
,
SCSPEC
,
RID_ITERATOR
},
{
"__volatile__"
,
TYPE_QUAL
,
RID_VOLATILE
},
{
""
,},
{
"void"
,
TYPESPEC
,
RID_VOID
},
{
"__const"
,
TYPE_QUAL
,
RID_CONST
},
{
"__attribute"
,
ATTRIBUTE
,
NORID
},
{
"__const__"
,
TYPE_QUAL
,
RID_CONST
},
{
"case"
,
CASE
,
NORID
},
{
"__complex__"
,
TYPESPEC
,
RID_COMPLEX
},
{
"inline"
,
SCSPEC
,
RID_INLINE
},
{
"__complex"
,
TYPESPEC
,
RID_COMPLEX
},
{
"if"
,
IF
,
NORID
},
{
"__real"
,
REALPART
,
NORID
},
{
"default"
,
DEFAULT
,
NORID
},
{
"__typeof"
,
TYPEOF
,
NORID
},
{
"sizeof"
,
SIZEOF
,
NORID
},
{
"extern"
,
SCSPEC
,
RID_EXTERN
},
{
"
"
,},
{
"
signed"
,
TYPESPEC
,
RID_SIGNED
},
{
"static"
,
SCSPEC
,
RID_STATIC
},
{
"inline"
,
SCSPEC
,
RID_INLINE
},
{
"do"
,
DO
,
NORID
},
{
"__imag"
,
IMAGPART
,
NORID
},
{
"void"
,
TYPESPEC
,
RID_VOID
},
{
"__asm"
,
ASM_KEYWORD
,
NORID
},
{
"return"
,
RETURN
,
NORID
},
{
"short"
,
TYPESPEC
,
RID_SHORT
},
{
"__volatile__"
,
TYPE_QUAL
,
RID_VOLATILE
},
{
""
,},
{
"char"
,
TYPESPEC
,
RID_CHAR
},
{
"__volatile"
,
TYPE_QUAL
,
RID_VOLATILE
},
{
"unsigned"
,
TYPESPEC
,
RID_UNSIGNED
},
{
"__alignof"
,
ALIGNOF
,
NORID
},
{
"typeof"
,
TYPEOF
,
NORID
},
{
"typedef"
,
SCSPEC
,
RID_TYPEDEF
},
{
"const"
,
TYPE_QUAL
,
RID_CONST
},
{
"for"
,
FOR
,
NORID
},
{
"__asm"
,
ASM_KEYWORD
,
NORID
},
{
"float"
,
TYPESPEC
,
RID_FLOAT
},
{
"short"
,
TYPESPEC
,
RID_SHORT
},
{
"do"
,
DO
,
NORID
},
{
"double"
,
TYPESPEC
,
RID_DOUBLE
},
{
"return"
,
RETURN
,
NORID
},
{
""
,},
{
""
,},
{
"goto"
,
GOTO
,
NORID
},
{
""
,},
{
""
,},
{
"auto"
,
SCSPEC
,
RID_AUTO
},
{
"unsigned"
,
TYPESPEC
,
RID_UNSIGNED
},
{
""
,},
{
"double"
,
TYPESPEC
,
RID_DOUBLE
},
{
"continue"
,
CONTINUE
,
NORID
},
{
""
,},
{
"register"
,
SCSPEC
,
RID_REGISTER
},
{
"long"
,
TYPESPEC
,
RID_LONG
},
{
"char"
,
TYPESPEC
,
RID_CHAR
},
{
""
,},
{
""
,},
{
"union"
,
UNION
,
NORID
},
{
""
,},
{
"volatile"
,
TYPE_QUAL
,
RID_VOLATILE
},
{
"auto"
,
SCSPEC
,
RID_AUTO
},
{
""
,},
{
""
,},
{
"asm"
,
ASM_KEYWORD
,
NORID
},
{
""
,},
{
""
,},
{
""
,},
{
""
,},
{
""
,},
{
"float"
,
TYPESPEC
,
RID_FLOAT
},
{
""
,},
{
""
,},
{
"goto"
,
GOTO
,
NORID
},
{
""
,},
{
""
,},
{
""
,},
{
""
,},
{
""
,},
{
"long"
,
TYPESPEC
,
RID_LONG
},
{
""
,},
{
"enum"
,
ENUM
,
NORID
},
{
""
,},
{
"
asm"
,
ASM_KEYWORD
,
NORID
},
{
"
union"
,
UNION
,
NORID
},
};
if
(
len
<=
MAX_WORD_LENGTH
&&
len
>=
MIN_WORD_LENGTH
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment