gcobol.clean:
# This is intended for non-general use. It is a last-ditch effort to flush
-# out all oject files and executable code for gcobol and libgcobol, causing
+# out all object files and executable code for gcobol and libgcobol, causing
# a complete rebuild of all executable code.
rm -fr gcobol cobol1 cobol/* \
../*/libgcobol/*
{
// They are the same size, and neither is national or display. This is
// highly weird. The only thing I can think causing it would be two
- // files with different speci fied encodings. Just have the left side
+ // files with different specified encodings. Just have the left side
// win.
do_it = true;
}
ec_cmp(ec, elem.ec); } )) ) {
erase(p);
}
- // Keep the EC as an override if a higher-level would othewise apply.
+ // Keep the EC as an override if a higher-level would otherwise apply.
p = std::find_if( begin(), end(),
[ec = type]( const auto& elem ) {
return
ec_cmp(ec, elem.ec); } )) ) {
erase(p);
}
- // Keep the EC as an override if a higher-level would othewise apply.
+ // Keep the EC as an override if a higher-level would otherwise apply.
p = std::find_if( begin(), end(),
[ec = type, file]( const auto& elem ) {
return
#define MAX_AFTERS 8
-// These variables contol a little state machine. When a simple -main is in
+// These variables control a little state machine. When a simple -main is in
// effect, the first program in the module becomes the target of a main()
// that we synthesize function. When -main=module:progid is in effect, we
// create a main() that calls progid. When active, progid is kept in
}
/* Creates a function for program-id 'funcname_'. Returns 1 when funcname_ is
- "main" and the -main compiler switch is active for this moudle symbol_table
+ "main" and the -main compiler switch is active for this module symbol_table
has been initialized, and the current program has been entered into it. For
a top-level program, the program's program is 0, else it is the symbol
table index of the containing program. */
// Arriving here means that either the search ran out without finding
// anything, (see the test up at TOP:), or else we just fell through from
// the statements that executed after all the WHEN/AFTER clauses were
- // satisifed by equality (meaning there were no jumps to TOO_SMALL: or
+ // satisfied by equality (meaning there were no jumps to TOO_SMALL: or
// TOO_LARGE). In other words: we're done.
gg_append_statement(bsearch->bottom.label);
if( tgts[i].addr_of )
{
// When SET ADDRESS OF TARGET TO ..., the library call sets
- // tgts[i].field->data. We need to propogate the data+offset
+ // tgts[i].field->data. We need to propagate the data+offset
// through the level01 variable's children:
propogate_linkage_offsets(tgts[i].field,
member(tgts[i].field->var_decl_node, "data"));
Cases 3. and 4. turn out to require the same flags. Here are the combinations of
flags that are required for each flavor of function_decl. This was empirically
- determind by compiling a C++ program with sample code for each type.
+ determined by compiling a C++ program with sample code for each type.
| addressable | used | nothrow | static | external | public | no_instrument
main | | | | X | | X | X
// Flow control inside a function
extern void gg_return(tree operand = NULL_TREE);
-// These routines are the preample and postamble that bracket everything else
+// These routines are the preamble and postamble that bracket everything else
extern tree gg_build_fn_decl(const char *funcname, tree fndecl_type);
extern tree gg_peek_fn_decl(const char *funcname);
extern tree gg_define_function( tree return_type,
// passes us a refer for an optional parameter that has been omitted, for
// example.
- // It is also the case that a FldLiteralN will never have suscripts, or the
+ // It is also the case that a FldLiteralN will never have subscripts, or the
// like.
return true;
}
}
/*
- * When setting the indicator column explicity:
+ * When setting the indicator column explicitly:
* To get strict fixed 72-column lines, use a negative column number.
* When setting back to 0 (free), the right margin is also reset to 0.
*/
* directive. For the current line, apply patterns that begins on the
* line. (It may match input extending beyond the current eol.)
*
- * As each replacement is identified, append it to the passsed list of
+ * As each replacement is identified, append it to the passed list of
* pending replacements. For these elements:
*
* before is a span in mfile
/*
- * As of now, every diagnositc has one id, one message, one kind, and is
+ * As of now, every diagnostic has one id, one message, one kind, and is
* associated with "one" dialect. The dialect could be ORed. If it is, that
* means among the dialects it belongs to, it is always of the same kind.
*
parser_label_label(tini_label);
if( current.program()->initial ) {
- // We perform the section we just layed down when IS INITIAL
+ // We perform the section we just laid down when IS INITIAL
parser_perform(init_label);
}
return true;
size_t occurs_upper; // non-zero for a table
uint64_t attr; // See cbl_field_attr_t
signed char type; // A one-byte copy of cbl_field_type_t
- signed char level; // This variable's level in the naming heirarchy
+ signed char level; // This variable's level in the naming hierarchy
signed char digits; // Digits specified in PIC string; e.g. 5 for 99v999
signed char rdigits; // Digits to the right of the decimal point. 3 for 99v999
cbl_encoding_t encoding; // Same as cbl_field_t::codeset::encoding
*
* A qualified reference is denoted LblParagraph with a section, and
* with line = 0. A qualified reference updates an unqualified
- * declaration; the declation is upgraded to LblParagraph with the
+ * declaration; the declaration is upgraded to LblParagraph with the
* section as its parent, but still with no line (because it's still
* undefined).
*
symbol_table_t table = symbol_table_extend();
- // Insert known contants at the top of an empty table.
+ // Insert known constants at the top of an empty table.
// Constants are signified by their attribute
// Be warned that ZEROS plays for both sides. It is defined here as
// quoted, but in context it can be the value zero at run-time. Yes, it
/*
* Under ISO (and not IBM) Declaratives are followed by a Section name. If
* Declaratives were used, when the first statement is parsed verify that it
- * was preceeded by a Section name.
+ * was preceded by a Section name.
*/
bool
symbol_label_section_exists( size_t eval_label_index ) {
auto n = real_to_integer(r);
REAL_VALUE_TYPE r2;
real_from_integer (&r2, VOIDmode, n, SIGNED);
- // If the orginal value r is equal to r2, derived from its integer
+ // If the original value r is equal to r2, derived from its integer
// part n, then the fractional component is zero.
if( real_identical (r, &r2) ) {
return std::make_pair( int64_t(n), true );
/*
- * Development suppport
+ * Development support
*/
#pragma GCC diagnostic push
/*
* This function is called from the scanner, usually when a copybook is on top
* of the input stack, before the parser retrieves the token and resets the
- * current filename. For that reason, we normaly want to line number of the
+ * current filename. For that reason, we normally want to line number of the
* file that is about to become the current one, which is the one behind top().
*
* If somehow we arrive here when there is nothing underneath, we return the
- * current line nubmer, or zero if there's no input. The only consequence is
+ * current line number, or zero if there's no input. The only consequence is
* that the reported line number might be wrong.
*/
int
The libgcobol is intended for use entirely and solely by executables created
from COBOL source code by the GCOBOL "COBOL for GCC" front end.
-libgcobol.a can be staticly linked in, but it makes for very large binaries. We
+libgcobol.a can be statically linked in, but it makes for very large binaries. We
tend to use that for debugging the GCOBOL compiler, and not much else
Many of the functions in the library are called by the executable code generated
};
/*
- * Because this variable is static, the contructor runs before main and is
- * guaranted to run.
+ * Because this variable is static, the constructor runs before main and is
+ * guaranteed to run.
*/
static class rt_encoding_t
{
// When the caller supplies iconv_retval_p, we only try to convert once,
// because they are telling us they will handle errors.
- // Otherwise, we just keep trying to convert, replacing unconvertable
+ // Otherwise, we just keep trying to convert, replacing unconvertible
// characters with a replacement.
iconv_retval = 1; // This primes the pump:
encoded_e = 0x0020000000, // data.initial matches codeset.encoding
bool_encoded_e = 0x0040000000, // data.initial is a boolean string
hex_encoded_e = 0x0080000000, // data.initial is a hex-encoded string
- depends_on_e = 0x0100000000, // A group hierachy contains a DEPENDING_ON
+ depends_on_e = 0x0100000000, // A group hierarchy contains a DEPENDING_ON
initialized_e = 0x0200000000, // Don't call parser_initialize from parser_symbol_add
has_value_e = 0x0400000000, // Flag to hierarchical descendents to ignore .initial
ieeedec_e = 0x0800000000, // Indicates a FldFloat is IEEE 754 decimal, rather than binary
size_t occurs_upper; // non-zero for a table
unsigned long long attr; // See cbl_field_attr_t
signed char type; // A one-byte copy of cbl_field_type_t
- signed char level; // This variable's level in the naming heirarchy
+ signed char level; // This variable's level in the naming hierarchy
signed char digits; // Digits specified in PIC string; e.g. 5 for 99v999
signed char rdigits; // Digits to the right of the decimal point. 3 for 99v999
cbl_encoding_t encoding; //
* cblc_file_t is defined, and where the valid file status values
* (and relops) are enumerated.
*
- * The library contructs the class, providing its own pointers,
+ * The library constructs the class, providing its own pointers,
* and supplies a known function, gcobol_fileops, to return
* it. gcobol-compiled programs call the functions, or others
* supplied by a different implementation, through the pointers.
* GnuCOBOL. One difference is that the file status is captured
* in the cblc_file_t, whereas in GnuCOBOL it is the return value.
*
- * There is no provision for using more than one implemetation at
+ * There is no provision for using more than one implementation at
* a time in the same program, as would be needed for CODE-SET
* support. To achieve that in C++ without dynamic linking, there
* would have to be a set of known implementations, each with its
*compute_error |= compute_error_exp_minus_by_frac;
// This kind of error doesn't overwrite the target, so the returned
// value is not relevant. Make it zero to avoid overheating the
- // converstion routine
+ // conversion routine
tgt_value = 0;
}
}
}
default:
{
- // We have some number of identifer-3 values,
+ // We have some number of identifier-3 values,
// each with possible PHRASE1 modifiers.
size_t pair_count = integers[int_index++];
}
default:
{
- // We have some number of identifer-3 values,
+ // We have some number of identifier-3 values,
// each with possible PHRASE1 modifiers.
size_t pair_count = integers[int_index++];
}
default:
{
- // We have some number of identifer-3/identifier-5 pairs,
+ // We have some number of identifier-3/identifier-5 pairs,
// each with possible PHRASE1 modifiers.
size_t pair_count = integers[int_index++];
charmap_t *charmap = __gg__get_charmap(id1->encoding);
// Wastefully prefill id_1 with spaces in case the processing resulted in a
- // string shorter than the original. (There is always the possiblity that
+ // string shorter than the original. (There is always the possibility that
// a UTF-8 or UTF-16 codeset pair got replaced with a single character.) Do
// this before calling __gg__converter, because both mapped_character and
// __gg__iconverter use the same static buffer.
}
default:
{
- // We have some number of identifer-3/identifier-5 pairs,
+ // We have some number of identifier-3/identifier-5 pairs,
// each with possible PHRASE1 modifiers.
size_t pair_count = integers[int_index++];
charmap_t *charmap = __gg__get_charmap(id1->encoding);
// Wastefully prefill id_1 with spaces in case the processing resulted in a
- // string shorter than the original. (There is always the possiblity that
+ // string shorter than the original. (There is always the possibility that
// a UTF-8 or UTF-16 codeset pair got replaced with a single character.) Do
// this before calling __gg__converter, because both mapped_character and
// __gg__iconverter use the same static buffer.
default:
{
- // We have some number of identifer-3 values,
+ // We have some number of identifier-3 values,
// each with possible PHRASE1 modifiers.
size_t pair_count = integers[int_index++];
}
else if( MM > 12 )
{
- // We are betweem 13 and 19, so it was the second digit
+ // We are between 13 and 19, so it was the second digit
retval = 2;
}
ctm.MM = MM;
how gettimeofday() gets used, instead. But without the ability to
compile on a MacOS system, I am fumbling along as best I can.
- I decided to simply replace clock_gettime() with getttimeofday() when
+ I decided to simply replace clock_gettime() with gettimeofday() when
clock_gettime() isn't available, even though gcc/timevar.cc handles
the situation differently.
if( right_side->type == FldLiteralN)
{
right_value = get_float128(right_side, right_location);
- // In order to do the comparision, we need the value from the
+ // In order to do the comparison, we need the value from the
// literal to be the same flavor as the left side:
switch(left_side->capacity)
{
cbl_encoding_t encout = __gg__console_encoding;
// It can be the case in COBOL programs that a variable set to HIGH-VALUE is
- // displayed. In CP1252, the result for 0xFF is a y-with diaresis.
+ // displayed. In CP1252, the result for 0xFF is a y-with diaeresis.
// In EBCDIC CP1140, however, the 0xFF character is non-printing. It's my
// opinion that's protentially confusing, especially when debugging.
// There are valid arguments against doing this. But when I was doing some
// debugging, I found the EBCDIC behavior of displaying nothing for
- // HIGH-VALUE to be more astonishing than printing a y-with-diaresis. There
- // is, of course, the potential for confusing a real y-with-diaresis with a
+ // HIGH-VALUE to be more astonishing than printing a y-with-diaeresis. There
+ // is, of course, the potential for confusing a real y-with-diaeresis with a
// a HIGH-VALUE character. But it is my opinion that those will be resolved
// by examining the context.
if( retval == 1 )
{
- // Could't find that environment variable
+ // Couldn't find that environment variable
exception_raise(ec_argument_imp_environment_e);
}
// This is SET ADDRESS OF target TO ....
// We know it has to be an unqualified LINKAGE level 01 or level 77
target->data = reinterpret_cast<unsigned char *>(source_address);
- // The caller will propogate data + offset to their children.
+ // The caller will propagate data + offset to their children.
}
else
{
};
/*
- * Compare the raised exception, cbl_exception_t, to the USE critera
+ * Compare the raised exception, cbl_exception_t, to the USE criteria
* of a declarative, cbl_declarative_t.
*/
static bool
/*
* To reach the default handler, an EC must have effect and not have been
* handled by program logic. To have effect, it must have been enabled
- * explictly, or be of type EC-I-O. An EC may be handled by the statement or
+ * explicitly, or be of type EC-I-O. An EC may be handled by the statement or
* by a Declarative.
*
* Any EC handled by statement's conditional clause (e.g. ON SIZE ERROR)
size_t input_s,
size_t *nbytes)
{
- // iconverter takes care of untranslateable characters.
+ // iconverter takes care of untranslatable characters.
char *retval = __gg__miconverter(input->encoding,
dest_enc,
input->data + input_o,
{ ec_argument_imp_command_e, uc_category_implementor_e,
"EC-ARGUMENT-IMP-COMMAND", "COMMAND-LINE Subscript out of bounds" },
{ ec_argument_imp_environment_e, uc_category_implementor_e,
- "EC-ARGUMENT-IMP-ENVIRONMENT", "Envrionment Variable is not defined" },
+ "EC-ARGUMENT-IMP-ENVIRONMENT", "Environment Variable is not defined" },
{ ec_bound_e, ec_category_none_e,
"EC-BOUND", "Boundary violation" },
{ 148, "missing '=' after 'encoding' in XML declaration" },
{ 149, "missing XML encoding declaration value" },
{ 150, "invalid XML encoding declaration value" },
- { 151, "invalid character afer XML declaration" },
+ { 151, "invalid character after XML declaration" },
{ 152, "invalid attribute XML declaration" },
{ 153, "missing '=' after standalone XML declaration" },
{ 154, "missing standalone XML declaration value" },