* app.c (do_scrub_chars): Handle '||' in two states.

This commit is contained in:
Alan Modra 2003-02-19 10:46:52 +00:00
parent ee3fd32958
commit b1ac4c66ea
2 changed files with 49 additions and 30 deletions

View File

@ -1,3 +1,7 @@
2003-02-19 Jie Zhang <zhangjie@magima.com.cn>
* app.c (do_scrub_chars): Handle '||' in two states.
2003-02-13 Alan Modra <amodra@bigpond.net.au>
* write.c (TC_FORCE_RELOCATION_SUB_SAME): Revert last change.

View File

@ -1,6 +1,6 @@
/* This is the Assembler Pre-Processor
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2002
1999, 2000, 2002, 2003
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -377,10 +377,12 @@ do_scrub_chars (get, tostart, tolen)
-1: output string in out_string and go to the state in old_state
-2: flush text until a '*' '/' is seen, then go to state old_state
#ifdef TC_V850
12: After seeing a dash, looking for a second dash as a start of comment.
12: After seeing a dash, looking for a second dash as a start
of comment.
#endif
#ifdef DOUBLEBAR_PARALLEL
13: After seeing a vertical bar, looking for a second vertical bar as a parallel expression seperator.
13: After seeing a vertical bar, looking for a second
vertical bar as a parallel expression separator.
#endif
*/
@ -663,6 +665,19 @@ do_scrub_chars (get, tostart, tolen)
state = 0;
PUT (ch);
continue;
#ifdef DOUBLEBAR_PARALLEL
case 13:
ch = GET ();
if (ch != '|')
abort ();
/* Reset back to state 1 and pretend that we are parsing a
line from just after the first white space. */
state = 1;
PUT ('|');
continue;
#endif
}
/* OK, we are somewhere in states 0 through 4 or 9 through 11 */
@ -1078,15 +1093,15 @@ do_scrub_chars (get, tostart, tolen)
#ifdef DOUBLEBAR_PARALLEL
case LEX_IS_DOUBLEBAR_1ST:
ch2 = GET ();
UNGET (ch2);
if (ch2 != '|')
{
UNGET (ch2);
goto de_fault;
}
/* Reset back to state 1 and pretend that we are parsing a line from
just after the first white space. */
state = 1;
PUT ('|');
/* Handle '||' in two states as invoking PUT twice might
result in the first one jumping out of this loop. We'd
then lose track of the state and one '|' char. */
state = 13;
PUT ('|');
break;
#endif