cobol: Improve data-item validation.

Support Implicit PICTURE per ISO 13.16.2.  A data item F with VALUE
and no PICTURE is initially entered into the symbol table as invalid.
If item F+1 is entered and is not subordinate, and F meets the
conditions for an implicit PICTURE, mark it as valid.

Correct currency symbol validation, fixes RT 3681.

gcc/cobol/ChangeLog:

	* parse.y: Emit diagnostic if symbol_currency_add fails.
	* parse_ante.h (update_prior_invalid_field): New function.
	(field_add): Use update_prior_invalid_field to validate prior field.
	* scan.l: Document currency-symbol domain.
	* symbols.cc (symbols_update): Quell redundant diagnostic.
	(symbol_currency_symbol_ok): Validate currency symbol.
	(symbol_currency_add): Use symbol_currency_symbol_ok.
4 files changed