Commit Graph

67 Commits

Author SHA1 Message Date
Per Bothner 5e54886116 * ch-exp.y: Replaced by ...
* ch-exp.c:  New file.  Use recursive-descent.
	Recognize labelled array tuples and powerset ranges.
	* Makefile.in:  Update for no longer using yacc for ch-exp.

	* c-lang.c:  Make various functions non-static.
	* c-lang.h:  Add bunches of prototypes.
	* cp-valprint.c (cp_print_value_fields):  Also take address.
	(cp_print_value):  Likewise.  Use baselcass_offset.
	* stabsread.c (current_symbol):  New static variable.
	(type_synonym_name):  Remove.
	(read_type):  If copying, make copy be a TYPE_CODE_TYPEDEF.
	(read_array_type):  Don't need to handle undefined element type here.
	(cleanup_undefined_types):  Ditto.
	(read_range_type):  Look for Chill ranges.
	* valops.c (value_assign):  Fix case lval_internalvar - don't try
	to assign into old value (which might be too small!).
	(value_coerce_array):  No longer need special VALUE_REPEATED handling.
	(value_arg_coerce):  Cleaner array->pointer decay mechanism.
	(search_struct_field):  Use baseclass_offset rather than
	baseclass_addr.
	(value_slice):  Use get_discrete_bounds.
	* value.h (COERCE_VARYING_ARRAY):  Take type argumnt as well.
	* values.c (baseclass_offset):  Change parameter interface.
	(baseclass_addr):  Removed.
	* c-typeprint.c, c-valprint.c, ch-valprint.c, values.c, valops.c:
	Add check_typedef/CHECK_TYPEDEF as needed.
1995-11-30 03:26:34 +00:00
Per Bothner 93f972b7de * ch-exp.y (yylex): Also look for '$' following '$'. 1995-10-09 01:00:09 +00:00
Michael Meissner d88c6a8a92 fix typo 1995-10-08 02:53:24 +00:00
Per Bothner c700638ca7 * parse.c (write_dollar_variable): New function.
* c-exp.y (yylex):  Replace code for recognizing '$' pseudo-variables
	with a call to write_dollar_variable.
	Simplify grammar correspondingly.
	* f-exp.y:  Likewise.
	* m2-exp.y:  Likewise.
	* ch-exp.y:  Likewise.  (Remove function match_dollar_tokens.)
	* scm-exp.c (scm_lreadr):  Call write_dollar_variable to handle '$'.
1995-10-05 22:15:49 +00:00
Fred Fish ef8e137ced * ch-exp.y (write_lower_upper_value): Add prototype so bison
generated parser will insert prototype before first func usage.
	Bison and byacc order the output sections differently.  Also
	make function static.
1995-08-05 01:13:26 +00:00
Fred Fish 6c9638b444 Update FSF address. 1995-08-02 03:41:12 +00:00
Per Bothner 0faa324790 * ch-exp.y: Remove lots of unsupported productions and names.
Add support for IF-expressions, ORIF, ANDID, NUM, and ADDR.
This makes progress for PR 5826.
1995-06-14 21:30:58 +00:00
Per Bothner 6137983598 * parser-defs.h (enum precedence): Added PREC_BUILTIN_FUNCTION.
* expression.h (enum exp_opcode):  Added UNOP_LOWER, UNOP_UPPER,
	UNUP_LENGTH.
	* expprint.c (dump_expression):  Handle the new exp_opcodes.
	(print_subexp):  Handle PREC_BUILTIN_FUNCTION.
	(print_simple_m2_func):  Removed.
	(print_subexp):  Remove support for Modula2 builtin functions.
	* m2-lang.c (m2_op_print_tab):  Add support for builtin functions.
	* ch-exp.y:  Parse LOWER, UPPER, and LENGTH builtins.
	(write_lower_upper_value):  Convenience function for LOWER and UPPER.
	(upper_lower_argument, length_argument):  Removed non-terminals.
	* ch-lang.c (chill_op_print_tab):  Entries for UPPER, LOWER, LENGTH.
	(type_lower_upper):  New function.  Calculate LOWER/UPPER of type.
	(value_chill_length):  New function.  Calcalate LENGTH of ARRAY/STRING.
	(evaluate_subexp_chill):  Handle UNOP_LOWER, UNOP_UPPER, UNOP_LENGTH.
This fixes PR 5015 (and 5826 which is a duplicate).
1995-06-14 19:59:35 +00:00
Per Bothner 3029162cdf * ch-exp.y: Handle <primitive_value> "->" <modename>.
This fixes PR chill/6932.
1995-06-08 00:49:10 +00:00
Michael Meissner ea082c0ac8 Add Linux yacc suport. 1995-03-01 17:23:41 +00:00
Per Bothner 835c255965 * ch-exp.y (expression_conversion): Recognize 'ARRAY () TYPE (EXPR)'
(same as C's '(TYPE[])EXPR')
1995-02-22 07:43:01 +00:00
Per Bothner 60438e8e3e * ch-exp.y (maybe_expression_list): New non-terminal.
(primitive_value):  Allow empty parameter list.
1995-02-12 19:18:00 +00:00
Per Bothner f91a9e05e0 * ch-exp.y (value_string_element, string_primitive_value,
start_element, left_element, right_element, slice_size,
	lower_element, upper_element, first_element):  Removed.
	(value_string_slice, value_array_slice):  Replaced by ...
	(slice):  New non-terminal, with working slice support.
	(primitive_value_lparen, rparen):  New non-terminals.
	(maybe_tuple_elements):  New non-terminal, to allow empty tuples.
	(idtokentab):  Added "up".

	* value.h (COERCE_VARYING_ARRAY):  New macro.
	* valarith.c (value_subscript):  Use it.
	* valops.c (value_cast):  Likewise.  Also, do nothing if already
	correct type, and allow converting from/to range to/from scalar.

	* valops.c, value.h (varying_to_slice, value_slice):  New functions.
	* eval.c (OP_ARRAY):  Add cast for array element.
	* expression.h (TERNOP_SLICE, TERNOP_SLICE_COUNT):  New exp_opcodes.
	* valops.c (chill_varying_type):  Moved function frp, here ...
	* gdbtypes.c (chill_varying_type), gdbtypes.h: ... to here.
	* parse.c (length_of_subexp, prefixify_subexp):  Add support
	for TERNOP_SLICE, TERNOP_SLICE_COUNT.
	* expprint.c (print_subexp, dump_expression):  Likewise.
	* eval.c (evaluate_subexp):  Likewise.

	* eval.c (evaluate_subexp case MULTI_SUBSCRIPT):  Don't call
	value_x_binop on a Chill varying string.
1995-02-01 21:02:51 +00:00
Per Bothner 6d34c23688 Add support for Chill bitstring literals (e.h. H'FF00').
* ch-exp.y (match_bitstring_literal):  Fix for proper endianness.
	* expprint.c (print_subexp):  Don't call error on OP_BITSTRING,
	just print B'<unimlemented>'.
	* gdbtypes.c (create_set_type):  Fix bug in length calculation.
	* valops.c, value.h (value_bitstring):  New function.
	* eval.c (evaluate_subexp):  Implement support for OP_BITSTRING.

	* ch-typeprint.c (chill_type_print_base): For TYPE_CODE_FUNC,
	check that return type is non-void, and print in proper Chill syntax.
1995-01-23 21:20:58 +00:00
Per Bothner dcda44a07a * expression.h (OP_LABELED): New operator, for Chill
labeled structre tuples.
	* ch-exp.y (tuple_element, named_record_element, tuple_elements):
	New non-terminals, to handle labeled structure tuples.
	(tuple):  Re-define using tuple_elements.
	* eval.c (evaluate_labeled_field_init):  New function, to handle
	initialization of structure fields, possibly using OP_LABELED.
	(evaluate_subexp):  Use it.
	* expprint.c (print_subexp case):  For OP_ARRAY, use Chill syntax
	for Chill.  Handled OP_LABELED.
	* parse.c (length_of_subexp, prefixify_subexp):  Handle OP_LABELED.

	* eval.c (evaluate_subexp):  Handle Chill Powerset tuples.
	* valarith.c (value_bit_index):  Just treat bitstring as represented
	by an array of bytes.  Alignment is handled by compiler.
1995-01-20 23:45:21 +00:00
Per Bothner 2d67c7e986 * ch-exp.y (literal): Recognize NULL.
(tuple):  Parse simple unlabelled tuples.
	* eval.c (evaluate_subexp case OP_ARRAY):  Use expect_type to
	evaluate brace-initializer-expressions depending on context.
	(evaluate_subexp case UNOP_CAST):  Pass the target type as
	expected type when evaluating the expression.
1995-01-04 01:07:15 +00:00
Jeff Law a30e208739 * ch-exp.y (yylex): Fix off-by-one error when converting string to
lowercase.  Null terminate new string.
1994-11-11 19:17:41 +00:00
Per Bothner bdef6b60f3 * ch-exp.y: Get rid of some extra non-terminals, and move
their rules into primitive_value.
	* ch-lang.c (chill_op_print_tab):  Add '->'.
	* expprint.c (print_subexp):  Recognize unary postfix operator.
1994-09-16 07:28:22 +00:00
Per Bothner ad86f71799 * ch-exp.y (match_simple_name_string): Don't lower-case here.
* ch-exp.y (yylex):  First try name lookup using exact name
	typed by user;  if that fails, try lower-cased name.
1994-07-07 03:27:48 +00:00
Stan Shebs 8db1a92291 Wed May 11 20:11:51 1994 Stan Shebs (shebs@andros.cygnus.com)
* c-exp.y (yyerror): Display a more informative error message.
	* ch-exp.y (yyerror): Ditto, don't use global yychar.
	* m2-exp.y (yyerror): Ditto.
1994-05-12 03:21:48 +00:00
Peter Schauer db2302cb93 * ch-exp.y (decode_integer_value, match_character_literal,
match_bitstring_literal):  Guard tolower calls with isupper,
	tolower on old BSD systems blindly subtracts a constant.
	* dbxread.c (read_ofile_symtab):  Check for __gnu_compiled_* as
	well when determining the producer of the object file.
	* mdebugread.c (has_opaque_xref):  New function to check for
	cross reference to an opaque aggregate.
	* mdebugread.c (parse_symbol, parse_partial_symbols):  Do not
	enter typedefs to opaque aggregates into the symbol tables.
	* mdebugread.c (parse_external):  Remove skip_procedures argument,
	it has always been 1.  Remove code that handled stProc symbols,
	it was never executed and was wrong, as the index of a
	stProc symbol points to the local symbol table and not to the
	auxiliary symbol info. Update caller.
	* mdebugread.c (parse_partial_symbols):  Do not enter external
	stProc symbols into the partial symbol table, they are already
	entered into the minimal symbol table.
	* config/i386/tm-symmetry.h:  Clean up, it is now only used for Dynix.
	Remove all conditionals and definitions for ptx.
	I386_REGNO_TO_SYMMETRY moved to here from symm-tdep.c.
	Fix addresses of floating point registers in REGISTER_U_ADDR.
	STORE_STRUCT_RETURN now handles cc and gcc conventions.
	FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC,
	IN_SIGTRAMP, SIGCONTEXT_PC_OFFSET defined to make backtracing through
	signal trampoline code work.
	* config/i386/xm-symmetry.h:  Clean up, it is now only used for Dynix.
	Remove all conditionals and definitions for ptx.
	Remove KDB definitions.
	* symm-nat.c (store_inferior_registers):  Fetch registers before
	storing them to obtain valid floating point control registers.
	Store fpu registers.
	* symm-nat.c (print_1167_control_word):  Dynix 3.1.1 defines
	FPA_PCR_CC_C0 and FPA_PCR_CC_C1, avoid duplicate case value.
	* symm-nat.c (fetch_inferior_registers, child_xfer_memory):
	Fix typos.
	* symm-nat.c (child_resume):  Update type of `signal' parameter.
	* symm-tdep.c (I386_REGNO_TO_SYMMETRY):  Moved to tm-symmetry.h.
1994-03-30 09:57:08 +00:00
Per Bothner 58cda66eeb * ch-exp.y: Implement SIZE(mode_name) and SIZE(expression). 1994-03-30 06:59:16 +00:00
Jim Kingdon 93dc341439 * ch-exp.y (match_simple_name_string): Accept '_' as well as an
alphabetic character as the start of a name.
1994-03-04 03:12:05 +00:00
Peter Schauer ba47c66add * README: Remove note about gcc warnings on alpha, these should be
gone now.
	* c-exp.y, ch-exp.y, core.c, corelow.c, eval.c, fork-child.c,
	m2-exp.y, minsyms.c, nlmread.c, parse.c, putenv.c, regex.c
	remote-utils.c, stabsread.c:  Include <string.h>.
	* regex.c:  Include "defs.h", change re_comp argument to const char *.
	* infptrace.c (fetch_register, store_inferior_registers):  Change
	regaddr to type CORE_ADDR.
	* config/alpha/alpha-nw.mt, config/alpha/alpha-osf1.mt (MT_CFLAGS):
	Remove, no longer necessary now that we use bfd_vma for a CORE_ADDR.
1994-02-08 09:01:03 +00:00
Per Bothner 96b6b765fc * ch-exp.y (match_string_literal): Allow a zero-length string.
* ch-lang.c (chill_printstr):  Don't print zero-length string funny.
1994-01-23 20:42:00 +00:00
Per Bothner cba009211a * ch-exp.y (match_dollar_tokens): Fix off-by-one bug.
* ch-lang.c (chill_is_varying_struct), ch-lang.h:  New function.
	* ch-lang.c (chill_printstr):  Use double quotes, not single quotes.
	* ch-typeprint.c (chill_type_print_base):  Handle TYPE_CODE_BITSTRING.
	Improve printing of TYPE_CODE_STRING, TYPE_CODE_SET, and
	TYPE_CODE_STRUCT (including checking chill_is_varying_struct).
	Print TYPE_DUMMY_RANGE by printing its TYPE_TARGET_TYPE.
	Handle TYPE_CODE_ENUM.
	* ch-valprint.c (chill_val_print):  Handle TYPE_CODE_BITSTRING.
	For TYPE_CODE_STRING, never print address.  Handle VARYING strings.
	* gdbtypes.c (force_to_range_type):  New.
	* gdbtypes.c (create_set_type):  Make work, following Chill layout.
	* gdbtypes.h (TYPE_LOW_BOUND, TYPE_HIGH_BOUND, TYPE_DUMMY_RANGE): New.
	* stabsread.c (read_type):  Distinguish string and bitstring from
	char-array and set.
	* valarith.c (value_subscript), valops.c (value_coerce_array):
	Handle STRINGs as well as ARRAYs.
	* valarith.c (value_bit_index):  Fix think.  Use new macros.
1993-12-21 22:18:51 +00:00
Per Bothner e909f287a8 Implement support for Chill POWERSETs.
* ch-exp.y (operand_2):  Implement 'Element IN PowerSet'.
	* ch-typeprint.c (chill_type_print_base):  Handle POWERSETs.
	* ch-valprint.c (chill_val_print):  Handle TYPE_CODE_SET.
	* eval.c (evaluate_subexp):  Implement BINOP_IN.
	* expression.h (enum exp_opcode):  Added BINOP_IN.
	* gdbtypes.c (create_set_type), gdbtypes.h:  New function.
	* stabsread.c (read_type):  If 'S', create a set type.
	* valarith.c (value_bit_index, value_in), value.h:  New functions,
	for indexing in SETs.
1993-12-14 04:32:51 +00:00
Thomas Lord 199b2450f6 Change the stream argument to _filtered to GDB_FILE *.
Change all references to stdout/stderr to gdb_stdout/gdb_stderr.

Replace all calls to stdio output functions with calls to
corresponding _unfiltered functions (`fprintf_unfiltered')

Replaced calls to fopen for output to gdb_fopen.

Added sufficient goo to utils.c and defs.h to make the above work.

The net effect is that stdio output functions are only directly used
in utils.c.  Elsewhere, the _unfiltered and _filtered functions and
GDB_FILE type are used.

In the near future, GDB_FILE will stop being equivalant to FILE.

The semantics of some commands has changed in a very subtle way:
called in the right context, they may cause new occurences of
prompt_for_continue() behavior.  The testsuite doesn't notice anything
like this, though.

Please respect this change by not reintroducing stdio output
dependencies in the main body of gdb code.  All output from commands
should go to a GDB_FILE.

Target-specific code can still use stdio directly to communicate with
targets.
1993-11-01 22:25:23 +00:00
Jim Kingdon 100f92e2de * Makefile.in (c-exp.tab.o): Remove notice about shift/reduce conflicts
which no longer occur.

	gcc -Wall lint:
	* findvar.c (symbol_read_needs_frame), corelow.c (ignore),
	inflow.c (gdb_has_a_terminal): Make sure to return a value.
	* regex.h: Declare re_set_syntax.
	* printcmd.c: Include valprint.h.
	* infcmd.c, exec.c, maint.c, core.c: Include language.h.
	* maint.c: Include expression.h.
	* infrun.c, fork-child.c, corelow.c, inflow.c: Include thread.h.
	* inftarg.c: Include command.h.
	* coredep.c: Include value.h.
	* c-exp.y, m2-exp.y, ch-exp.y: Include bfd.h, symfile.h and objfiles.h.
	* ch-typeprint.c: Include typeprint.h.
	* ch-valprint.c: Include c-lang.h.
	* nlmread.c: Include buildsym.h.
	* environ.c: Include gdbcore.h.  Only include defs.h once.
	(set_in_environ): Cast const char * to char * when passing to
	set_gnutarget.
	Remove unused variables:
	* printcmd.c (printf_command): args_to_vprintf.
	* coffread.c (coff_symfile_init): strsection.
	Move variables to within the #ifdefs where they are used:
	* symtab.c (gdb_mangle_name): opname.
	* inftarg.c (child_attach): pid and exec_file.
	* inftarg.c (child_detach): siggnal.
	* objfiles.c (allocate_objfile): mapto, md, and fd.
	* objfiles.c (free_objfile): mmfd.
	* infrun.c (wait_for_inferior): Include BPSTAT_WHAT_LAST in switch.
	* infrun.c (wait_for_inferior): Remove unused same_pid label.
	* inferior.h: Declare set_sigint_trap and clear_sigint_trap.
	* parser-defs.h: Declare write_exp_elt_block.
	* stabsread.h: Declare elfstab_offset_sections and
	coffstab_build_psymtabs.
1993-10-21 20:41:50 +00:00
Jim Kingdon 996ccb3043 * symtab.c, symfile.c, c-exp.y, ch-exp.y, m2-exp.y, buildsym.c,
symfile.h, stabsread.c, minsyms.c, solib.c, nlmread.c, dwarfread.c
	partial-stab.h, symmisc.c, gdbtypes.c: Lint.  Remove (or put
	inside #if) unused variables and labels.  Fix unclosed comment.
	Deal with enumeration values unhandled in switch statements.  Make
	sure non-void functions return values.  Include appropriate
	headers.
	* dbxread.c (elfstab_build_psymtabs): Don't check for unsigned
	value < 0.
1993-09-02 01:41:40 +00:00
Jim Kingdon a1c8d76ef8 * frame.h, symtab.h, findvar.c (read_var_value): Change basereg
support to use LOC_BASEREG rather than SYMBOL_BASEREG_VALID.
	* dwarfread.c: Use LOC_BASEREG where appropriate.
	* Various: Support LOC_BASEREG and LOC_BASEREG_ARG.
1993-08-24 21:38:24 +00:00
Jim Kingdon 479fdd26ee * blockframe.c (block_innermost_frame): Uncomment.
Return NULL if passed NULL.
	* frame.h: Declare it.
	* expression.h (union exp_element): Add field block.
	* parse.c (write_exp_elt_block): New function.
	* expression.h (OP_VAR_VALUE): Now takes additional struct block *.
	* *-exp.y: Write block for OP_VAR_VALUE.
	* eval.c, expprint.c, parse.c: Deal with block for OP_VAR_VALUE.
	* valops.c, value.h (value_of_variable), callers:
	Add second argument, for block.
1993-08-18 19:33:39 +00:00
Brendan Kehoe c3f6638e3e undo previous change 1993-07-24 02:47:55 +00:00
Brendan Kehoe 4015bfb977 * ch-exp.y (yycheck, yydefred, yydgoto, yygindex, yylen, yylhs,
yyrindex, yysccsid, yysindex, yyss, yyssp, yytable, yyvs, yyvss):
        Also define these to chill_{name}, for 386BSD's yacc.
        * m2-exp.y: Likewise.
1993-07-23 22:37:01 +00:00
John Gilmore 57ffffe3fe * ch-exp.y (MAX, MIN): Rename to MAX_TOKEN, MIN_TOKEN.
* target.c (MIN):  #undef before defining.
1993-05-11 02:49:40 +00:00
Fred Fish f39a2631d9 * ch-exp.y (start): Apply work-around to avoid bison warning. 1993-05-10 20:18:05 +00:00
Peter Schauer d8f233201b * ch-exp.y (yylex): Don't STREQ with simplename if it is NULL. 1993-04-28 20:36:48 +00:00
Per Bothner 32d8a6d3e4 * ch-exp.y: Removed unused structure_primitive_value and FIXME_23.
* Makefile.in:  Add $(YFLAGS) when using $(YACC).
	* Makefile.in:  Remove message to expect conflicts and unused
	rules in ch-exp.y, since there no longer are any such.
1993-04-21 21:29:03 +00:00
Per Bothner c9a9bf776c * ch-exp.y: Fix thinko that broke parsing of FALSE. 1993-04-14 21:04:50 +00:00
Per Bothner 5a7c9cceb7 * ch-exp.y: Clean up lexing of identifiers and
reserved words.  (E.g. don't recognize FALSEXXX as the
	keyword FALSE followed by the identifier XXX.)
	Also, convert identifiers to lower case.
1993-04-10 08:35:32 +00:00
Per Bothner 47f366bc62 * valarith.c (value_subscript): Add COERCE_REF.
* ch-exp.y (operand_5):  We can generalize the 2nd operand
	of a string repetition ot 'literal' without ambiguity.
1993-04-09 07:52:50 +00:00
Per Bothner 8a177da658 * ch-exp.y: Remove ambiguities. Fix or add support for
UNOP_IND, UNOP_CAST, UNOP_ADDR, STRUCOP_STRUCT, OP_TYPE.
	* ch-typeprint.c (chill_print_type):  Move support
	for TYPE_CODE_ARRAY and TYPE_CODE_STRING from here ...
	* ch-typeprint.c (chill_type_print_base): ... here.
	* ch-typeprint.c (chill_type_print_base):  Improve
	support for PTR, REF, and FUNC types.
	* ch-valprint.c:  Prefer H'%x format to 0x%s.
	* ch-valprint.c (chill_val_print):  Add support for printing
	TYPE_CODE_REF (return for LOC parameters and variables).
	Use c_val_print to print random types (including ENUM).
	* ch-valprint,c (chill_print_value_fields):  Make
	output look more like Chill tuples.
	* stabsread.c (read_struct_type):  Factor common code.
1993-04-07 22:15:48 +00:00
Jim Kingdon 0848ad1c4d * stabsread.c (patch_block_stabs): If stab & no symbol, make
a LOC_OPTIMIZED_OUT symbol.
	symtab.h (enum address_class): Add LOC_OPTIMIZED_OUT.
	findvar.c (read_var_value), printcmd.c (address_info),
	symmisc.c (print_{,partial_}symbol), c-exp.y (variable),
	m2-exp.y (yylex): Deal with it.
1993-04-02 19:35:30 +00:00
Per Bothner 00cea52f92 * ieee-float.c: Moved to ../libiberty.
* ieee-float.h: Moved to ../include.
	* Makefile.in:  Update accordingly.
	* i386-pinsn.c (print_insn), m68k-pinsn.c (print_insn):
	Convert to stubs that call disassemblers in ../opcodes/*-dis.c.
	* m68k-tdep.c:  Removed definition of ext_format ext_format_68881;
	it is now in ../opcodes/m68881-ext.c.
	* mips-tdep.c (mips_skip_prologue):  Try to skip more of the
	prologue (some callers _do_ care).
	* mips-pinsn.c (print_insn), z8k-tdep.c (print_insn):  Convert to
	new interface of ../opcodes/*-dis.c.
	* ch-exp.y:  Add #include <ctype.h>.
1993-03-19 00:18:55 +00:00
Fred Fish 9da75ad32e * c-exp.y (lcurly, rcurly): New nonterminals.
* c-exp.y (exp):  Use lcurly and rcurly for arrays and UNOP_MEMVAL
	constructs.
	* parse.c (free_funcalls):  Moved prototype from parser-defs.h,
	made function static.
	* parse.c (struct funcall):  Moved struct def from parser-defs.h.
	* parse.c (funcall_chain):  Moved from parser-defs.h, made static.
	* parse.c (start_arglist):
	* parser-defs.h (free_funcalls):  Moved prototype to parse.c.
	* parser-defs.h (struct funcall):  Moved struct def to parse.c.
	* parser-defs.h (funcall_chain):  Moved to parse.c.
	* printcmd.c (print_frame_nameless_args): Fix prototype.
	* tm-mips.h (setup_arbitrary_frame):  Fix prototype.
	* tm-sparc.h (setup_arbitrary_frame):  Fix prototype.
	* valops.c (typecmp):  Moved prototype from values.h.
	* value.h (typecmp):  Moved prototype to valops.c, made static.
	**** start-sanitize-chill ****
	* ch-exp.y (yylex):  Change way control sequences are disabled.
	**** end-sanitize-chill ****
1993-02-03 00:28:54 +00:00
Fred Fish 2fcc38b81f * expression.h (BINOP_CONCAT): Document use for self concatenation
an integral number of times.
	* language.c (binop_type_check):  Extend BINOP_CONCAT for self
	concatenation case.
	* valarith.c (value_concat):  Rewrite to support self
	concatenation an integral number of times.
	**** start-sanitize-chill ****
	* Makefile.in (ch-exp.tab.c):  Change "expect" message.
	* ch-exp.y (FIXME's):  Make all FIXME tokens distinct, to
	eliminate hundreds of spurious shift/reduce and reduce/reduce
	conflicts that mask the 5 real ones.
	* ch-exp.y (STRING, CONSTANT, SC):  Remove unused tokens.
	* ch-exp.y (integer_literal_expression):  Remove production,
	no longer used.
	**** end-sanitize-chill ****
1993-01-28 05:47:42 +00:00
Fred Fish fcbadaee94 * eval.c (evaluate_subexp): Fix OP_ARRAY, remove code that
implied that "no side effects" was nonfunctional.
	* eval.c (evaluate_subexp):  Add BINOP_CONCAT case to deal with
	character string and bitstring concatenation.
	* expprint.c (dump_expression):  Add case for BINOP_CONCAT.
	* expression.h (exp_opcode):  Add BINOP_CONCAT.
	* gdbtypes.h (type_code):  Add TYPE_CODE_BITSTRING.
	* language.c (string_type):  Add function to determine if a type
	is a string type.
	* language.c (binop_type_check):  Add case for BINOP_CONCAT.
	* valarith.c (value_concat):  New function to concatenate two
	values, such as character strings or bitstrings.
	* valops.c (value_string):  Remove error stub and implement
	function body.
	* value.h (value_concat):  Add prototype.
	**** start-sanitize-chill ****
	* ch-exp.y (operand_3):  Add actions for SLASH_SLASH (//).
	* ch-exp.y (yylex):  Recognize SLASH_SLASH.
	* ch-lang.c (chill_op_print_tab):  Add SLASH_SLASH (//) as
	BINOP_CONCAT.
	**** end-sanitize-chill ****
1993-01-21 18:13:55 +00:00
Fred Fish c4413e2c9b * c-exp.y (exp:STRING): Convert C strings into array-of-char
constants with an explicit null byte terminator.  OP_STRING is
	now used for real string types.
	* c-lang.c (builtin_type_*):  Move declarations to lang.c since
	they are used by all languages.
	* c-lang.c (_initialize_c_language):  Move initializations of
	builtin_type_* to lang.c.
	* c-typeprint.c (c_type_print_varspec_prefix,
	c_type_print_varspec_suffix):  TYPE_CODE_PASCAL_ARRAY renamed
	to TYPE_CODE_STRING.
	* c-valprint.c (c_val_print):  Change the way character arrays
	are printed as strings to be consistent with the way strings
	are printed when pointer-to-char types are dereferenced.
	Remove test of print_max before calling val_print_string, which
	now does it's own test.
	* eval.c (evaluate_subexp):  Add case for OP_ARRAY.
	* expprint.c (print_subexp, dump_expression):  Add case for OP_ARRAY.
	* expression.h (enum exp_opcode):  Add OP_ARRAY and document.
	* gdbtypes.c (builtin_type_*):  Add declarations moved from
	c-lang.c.
	* gdbtypes.c (create_string_type):  New function to create real
	string types.
	* gdbtypes.c (recursive_dump_type):  TYPE_CODE_PASCAL_ARRAY
	renamed to TYPE_CODE_STRING.
	* gdbtypes.c (_initialize_gdbtypes):  Add initializations of
	builtin_type_* types moved from c-lang.c.
	* gdbtypes.h (enum type_code):  TYPE_CODE_PASCAL_ARRAY renamed
	to TYPE_CODE_STRING.
	* gdbtypes.h (builtin_type_string):  Add extern declaration.
	* gdbtypes.h (create_string_type):  Add prototype.
	* m2-lang.c (m2_create_fundamental_type):  TYPE_CODE_PASCAL_ARRAY
	renamed to TYPE_CODE_STRING.
	* m88k-tdep.c (pushed_size):  TYPE_CODE_PASCAL_ARRAY renamed to
	TYPE_CODE_STRING.
	* mipsread.c (_initialize_mipsread):  TYPE_CODE_PASCAL_ARRAY
	renamed to TYPE_CODE_STRING.
	* parse.c (length_of_subexp, prefixify_subexp):  Add case for
	OP_ARRAY.
	* printcmd.c (print_formatted):  Recognize TYPE_CODE_STRING.
	* typeprint.c (print_type_scalar):  TYPE_CODE_PASCAL_ARRAY renamed
	to TYPE_CODE_STRING.
	* valops.c (allocate_space_in_inferior):  New function and
	prototype, using code ripped out of value_string.
	* valops.c (value_string):  Rewritten to use new function
	allocate_space_in_inferior, but temporarily disabled until some
	other support is in place.
	* valops.c (value_array):  New function to create array constants.
	* valprint.c (val_print_string):  Add comment to document use,
	complete rewrite to fix several small buglets.
	* value.h (value_array):  Add prototype.
	* value.h (val_print_string):  Change prototype to match rewrite.
	**** start-sanitize-chill ****
	* ch-valprint.c (chill_val_print):  Add case for TYPE_CODE_STRING.
	* ch-exp.y (match_character_literal):  Disable recognition of
	control sequence form of character literals and document why.
	**** end-sanitize-chill ****
1993-01-16 05:15:58 +00:00
Fred Fish c7da3ed3cd * c-valprint.c (cp_print_class_member): Add extern decl.
* c-valprint.c (c_val_print):  Extract code for printing methods
	and move it to cp_print_class_method in cp-valprint.c.
	* c-valprint.c (c_val_print):  Extract code to print strings and
	move it to val_print_string in valprint.c.
	* cp-valprint.c (cp_print_class_method):  New function using
	code extracted from c_val_print.
	* valprint.c (val_print_string):  New function using code
	extracted from c_val_print.
	* value.h (val_print_string):  Add prototype.
	**** start-sanitize-chill ****
	* ch-exp.y (CHARACTER_STRING_LITERAL):  Set correct token type.
	* ch-exp.y (literal):  Add action for CHARACTER_STRING_LITERAL.
	* ch-exp.y (tempbuf, tempbufsize, tempbufindex, GROWBY_MIN_SIZE,
	CHECKBUF, growbuf_by_size):  New variables, macros, and support
	functions for implementing a dynamically expandable temp buffer.
	* ch-exp.y (match_string_literal):  New lexer function.
	* ch-exp.y (match_bitstring_literal):  Dynamic buffer code
	removed and replaced with new CHECKBUF macro.
	* ch-exp.y (yylex):  Call match_string_literal when appropriate.
	* ch-valprint.c (ch_val_print):  Add code for TYPE_CODE_PTR.
	**** end-sanitize-chill ****
1993-01-14 05:10:12 +00:00
Fred Fish 81028ab0e7 * defs.h (HOST_CHAR_BIT): New macro, defaults to either CHAR_BIT
from a configuration file (typically including <limits.h>), or to
	TARGET_CHAR_BIT if CHAR_BIT is not defined.
	* eval.c (evaluate_subexp):  Use new BYTES_TO_EXP_ELEM macro.
	* eval.c (evaluate_subexp):  Add case for OP_BITSTRING.
	* expprint.c (print_subexp):  Use new BYTES_TO_EXP_ELEM macro.
	* exppritn.c (print_subexp, dump_expression):  Add case for
	OP_BITSTRING.
	* expression.h (OP_BITSTRING):  New expression element type for
	packed bitstrings.
	* expression.h (EXP_ELEM_TO_BYTES, BYTES_TO_EXP_ELEM):  New
	macros to convert between number of expression elements and bytes
	to store that many elements.
	* i960-tdep.c (leafproc_return):  Use new macros to access
	minimal symbol name and address fields.
	* m88k-pinsn.c (sprint_address):  Use new macros to access
	minimal symbol name and address fields.
	* nindy-tdep.c (nindy_frame_chain_valid):  Use new macro to access
	minimal symbol address field.
	* parse.c (write_exp_elt, write_exp_string, prefixify_expression,
	parse_exp_1):  Use new EXP_ELEM_TO_BYTES macro.
	* parse.c (write_exp_string, length_of_subexp, prefixify_expression):
	Use new BYTES_TO_EXP_ELEM macro.
	* parse.c (write_exp_bitstring):  New function to write packed
	bitstrings into the expression element vector.
	* parse.c (length_of_subexp, prefixify_subexp):  Add case for
	OP_BITSTRING.
	* parser-defs.h (struct stoken):  Document that it is used for
	OP_BITSTRING as well as OP_STRING.
	* parser-defs.h (write_exp_bitstring):  Add prototype.
	**** start-sanitize-chill ****
	* ch-exp.y (BIT_STRING_LITERAL):  Change token type to sval.
	* ch-exp.y (NUM, PRED, SUCC, ABS, CARD, MAX, MIN, SIZE, UPPER,
	LOWER, LENGTH):  New tokens for keywords.
	* ch-exp.y (chill_value_built_in_routine_call, mode_argument,
	upper_lower_argument, length_argument, array_mode_name,
	string_mode_name, variant_structure_mode_name):  New non-terminals
	and productions.
	* ch-exp.y (literal):  Useful production for BIT_STRING_LITERAL.
	* ch-exp.y (match_bitstring_literal):  New lexer support function
	to recognize bitstring literals.
	* ch-exp.y (tokentab6):  New token table for 6 character keywords.
	* ch-exp.y (tokentab5):  Add LOWER, UPPER.
	* ch-exp.y (tokentab4):  Add PRED, SUCC, CARD, SIZE.
	* ch-exp.y (tokentab3):  Add NUM, ABS, MIN, MAX.
	* ch-exp.y (yylex):  Check tokentab6.
	* ch-exp.y (yylex):  Call match_bitstring_literal.
	**** end-sanitize-chill ****
1993-01-06 16:52:10 +00:00