URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 297 |
Rev 338 |
/* Copyright (C) 2000 Free Software Foundation.
|
/* Copyright (C) 2000 Free Software Foundation.
|
|
|
by Manfred Hollstein <manfredh@redhat.com> */
|
by Manfred Hollstein <manfredh@redhat.com> */
|
|
|
void *temporary_obstack;
|
void *temporary_obstack;
|
|
|
static int input (void);
|
static int input (void);
|
static int ISALNUM (int ch);
|
static int ISALNUM (int ch);
|
static void obstack_1grow (void **ptr, int ch);
|
static void obstack_1grow (void **ptr, int ch);
|
|
|
int yylex (void);
|
int yylex (void);
|
int main (void);
|
int main (void);
|
|
|
int main (void)
|
int main (void)
|
{
|
{
|
int ch = yylex ();
|
int ch = yylex ();
|
|
|
exit (0);
|
exit (0);
|
}
|
}
|
|
|
int yylex (void)
|
int yylex (void)
|
{
|
{
|
int ch;
|
int ch;
|
|
|
#ifndef WORK_AROUND
|
#ifndef WORK_AROUND
|
for (;;)
|
for (;;)
|
{
|
{
|
ch = input ();
|
ch = input ();
|
if (ISALNUM (ch))
|
if (ISALNUM (ch))
|
obstack_1grow (&temporary_obstack, ch);
|
obstack_1grow (&temporary_obstack, ch);
|
else if (ch != '_')
|
else if (ch != '_')
|
break;
|
break;
|
}
|
}
|
#else
|
#else
|
do
|
do
|
{
|
{
|
ch = input ();
|
ch = input ();
|
if (ISALNUM (ch))
|
if (ISALNUM (ch))
|
obstack_1grow (&temporary_obstack, ch);
|
obstack_1grow (&temporary_obstack, ch);
|
} while (ch == '_');
|
} while (ch == '_');
|
#endif
|
#endif
|
|
|
return ch;
|
return ch;
|
}
|
}
|
|
|
static int input (void)
|
static int input (void)
|
{
|
{
|
return 0;
|
return 0;
|
}
|
}
|
|
|
static int ISALNUM (int ch)
|
static int ISALNUM (int ch)
|
{
|
{
|
return ((ch >= 'A' && ch <= 'Z')
|
return ((ch >= 'A' && ch <= 'Z')
|
|| (ch >= 'a' && ch <= 'z')
|
|| (ch >= 'a' && ch <= 'z')
|
|| (ch >= '0' && ch <= '0'));
|
|| (ch >= '0' && ch <= '0'));
|
}
|
}
|
|
|
static void obstack_1grow (void **ptr, int ch)
|
static void obstack_1grow (void **ptr, int ch)
|
{
|
{
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.