summaryrefslogtreecommitdiff
path: root/gcc/cexp.y
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1997-02-16 12:43:33 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>1997-02-16 12:43:33 +0000
commit0d344634e053fbd998acc89cf022bebd21780a4d (patch)
tree0ffdfca52b1134a283f27c85e210731a3c7942c3 /gcc/cexp.y
parent7800abea31640c5d2c225157fefd39feff018c3a (diff)
downloadgcc-0d344634e053fbd998acc89cf022bebd21780a4d.tar.gz
(yylex): Use is_space, not is_hor_space, to find keyword end.
(is_space): New decl. (is_hor_space): Removed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13654 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cexp.y')
-rw-r--r--gcc/cexp.y18
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/cexp.y b/gcc/cexp.y
index 7155207946c..dd4d16495f0 100644
--- a/gcc/cexp.y
+++ b/gcc/cexp.y
@@ -153,7 +153,7 @@ static int keyword_parsing = 0;
static int skip_evaluation;
/* some external tables of character types */
-extern unsigned char is_idstart[], is_idchar[], is_hor_space[];
+extern unsigned char is_idstart[], is_idchar[], is_space[];
/* Flag for -pedantic. */
extern int pedantic;
@@ -846,7 +846,7 @@ yylex ()
if (keyword_parsing) {
for (namelen = 0;; namelen++) {
- if (is_hor_space[tokstart[namelen]])
+ if (is_space[tokstart[namelen]])
break;
if (tokstart[namelen] == '(' || tokstart[namelen] == ')')
break;
@@ -1108,9 +1108,8 @@ main (argc, argv)
unsigned char is_idchar[256];
/* table to tell if char can be first char of a c identifier. */
unsigned char is_idstart[256];
-/* table to tell if c is horizontal space. isspace () thinks that
- newline is space; this is not a good idea for this program. */
-unsigned char is_hor_space[256];
+/* table to tell if c is horizontal or vertical space. */
+unsigned char is_space[256];
/*
* initialize random junk in the hash table and maybe other places
@@ -1139,9 +1138,12 @@ initialize_random_junk ()
++is_idchar['$'];
++is_idstart['$'];
- /* horizontal space table */
- ++is_hor_space[' '];
- ++is_hor_space['\t'];
+ ++is_space[' '];
+ ++is_space['\t'];
+ ++is_space['\v'];
+ ++is_space['\f'];
+ ++is_space['\n'];
+ ++is_space['\r'];
}
void