diff options
author | Jeff Law <law@redhat.com> | 1993-12-29 19:33:31 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1993-12-29 19:33:31 +0000 |
commit | 001581c7842a4ebf24cf0b6796d8b3f10d4c16f3 (patch) | |
tree | 9ec4dc6c48832908eb9d5c2d0e678298b7d0e623 /gas | |
parent | 4bfe9e81cd785d38a89c5396b268c19f911c2283 (diff) | |
download | gdb-001581c7842a4ebf24cf0b6796d8b3f10d4c16f3.zip gdb-001581c7842a4ebf24cf0b6796d8b3f10d4c16f3.tar.gz gdb-001581c7842a4ebf24cf0b6796d8b3f10d4c16f3.tar.bz2 |
* app.c (do_scrub_next_char): Fix more bugs dealing with
labels without colons (For HPPA and MRI).
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/app.c | 31 |
2 files changed, 30 insertions, 6 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 6020996..192d3ef 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +Wed Dec 29 11:31:44 1993 Jeffrey A. Law (law@snake.cs.utah.edu) + + * app.c (do_scrub_next_char): Fix more bugs dealing with + labels without colons (For HPPA and MRI). + Sun Dec 26 14:31:47 1993 Torbjorn Granlund (tege@adder.cygnus.com) * tc-hppa.c (pre_defined_registers): Convert to lower case. @@ -310,7 +310,7 @@ do_scrub_next_char (get, unget) if (ch == '"') { (*unget) (ch); - out_string = "\n.appfile "; + out_string = "\n\t.appfile "; old_state = 7; state = -1; return *out_string++; @@ -447,10 +447,6 @@ recycle: not_cpp_line = 1; goto recycle; } -#ifdef MRI - (*unget) (ch); /* Put back */ - return ' '; /* Always return one space at start of line */ -#endif /* If we're in state 2, we've seen a non-white character followed by whitespace. If the next @@ -462,6 +458,29 @@ recycle: return ch; } +#if defined (LABELS_WITHOUT_COLONS) || defined (MRI) + /* Like above, but handles case where labels are not + required to have colons (and therefore must be identified + by their *position* in the input stream.) For a testcase + see hppa/more.parse/labelbug.s. + + This also has the effect of sometimes leaving a whitespace + before a newline. Instead of trying to rework this horribly + broken and hairy code I'm just going to zap the extra space here. */ + if (state == 2 && lex[ch] == LEX_IS_SYMBOL_COMPONENT) + { + (*unget) (ch); + return ' '; + } + + /* Don't emit a space before a newline. */ + if (state == 2 && lex[ch] == LEX_IS_NEWLINE) + { + state = 0; + return ch; + } +#endif + switch (state) { case 0: @@ -640,7 +659,7 @@ recycle: (*unget) (ch); old_state = 4; state = -1; - out_string = ".appline "; + out_string = "\t.appline "; return *out_string++; } |