Spellcheck comments throughout the code.

There are no non-comment changes.
This commit is contained in:
Stephen Heumann 2020-01-29 17:09:52 -06:00
parent d60104cc47
commit ffe6c4e924
15 changed files with 51 additions and 51 deletions

View File

@ -42,7 +42,7 @@
{ value of constant expressions in this variable }
{ expressionType - the type of the expression }
{ expressionTree - for non-constant initializers }
{ isConstant - is the initializer expression conastant? }
{ isConstant - is the initializer expression constant? }
{ typeSpec - type given by the last declaration specifiers, }
{ specifier-qualifier list, or type name evaluated }
{ }
@ -123,7 +123,7 @@ type
pString = packed array [0..maxLine] of char; {length string}
stringPtr = ^pString;
ptr = ^byte; {general purpose pointer}
handle = ^ptr; {gereral purpose handle}
handle = ^ptr; {general purpose handle}
gsosInString = record
size: integer;
@ -139,9 +139,9 @@ type
gsosOutStringPtr = ^gsosOutString;
{ The base types include two main categories. The values starting }
{ with cg are defined in the code generater, and may be passed to the }
{ with cg are defined in the code generator, and may be passed to the }
{ code generator for resolution. The cc types are used internally in }
{ the compiler. Any values whose type is cc must be resulved to one }
{ the compiler. Any values whose type is cc must be resolved to one }
{ of the cg types before the code generator is called. }
baseTypeEnum = (cgByte,cgUByte,cgWord,cgUWord,cgLong,cgULong,
@ -475,7 +475,7 @@ var
expressionValue: longint; {value of the last constant expression}
expressionType: typePtr; {the type of the expression}
initializerTree: tokenPtr; {for non-constant initializers}
isConstant: boolean; {is the initializer expression conastant?}
isConstant: boolean; {is the initializer expression constant?}
{type specifier results}
{----------------------}

View File

@ -38,8 +38,8 @@ type
end;
var
{msc}
{---}
{misc}
{----}
blkcnt: longint; {number of bytes in current segment}
{buffers}

View File

@ -5,7 +5,7 @@
{ }
{ This unit serves as the glue code attaching a compiler }
{ to the code generator. It provides subroutines in a }
{ format that is convinient for the compiler during }
{ format that is convenient for the compiler during }
{ semantic analysis, and produces intermediate code records }
{ as output. These intermediate code records are then }
{ passed on to the code generator for optimization and }
@ -327,7 +327,7 @@ var
stringsize: 0..maxstring; {amount of string space left}
stringspace: packed array[1..maxstring] of char; {string table}
symLength: integer; {length of debug symbol table}
toolParms: boolean; {generate tool format paramaters?}
toolParms: boolean; {generate tool format parameters?}
volatile: boolean; {has a volatile qualifier been used?}
hasVarargsCall: boolean; {does current function call any varargs fns?}
@ -769,7 +769,7 @@ profileFlag := false; {don't generate profiling code}
debugFlag := false; {don't generate debug code}
debugStrFlag := false; {don't generate gsbug debug strings}
traceBack := false; {don't generate traceback code}
volatile := false; {no volatile quialifiers found}
volatile := false; {no volatile qualifiers found}
registers := cLineOptimize; {don't do register optimizations}
peepHole := cLineOptimize; {not doing peephole optimization (yet)}
@ -799,7 +799,7 @@ if codeGeneration then begin
{ WriteCode(code); {debug}
DAG(code); {generate the code}
{initialize volitile variables for next intermediate code}
{initialize volatile variables for next intermediate code}
code := pointer(Calloc(sizeof(intermediate_code)));
{code^.lab := nil;}
code^.optype := cgWord;

View File

@ -64,7 +64,7 @@ function CodesMatch (op1, op2: icptr; exact: boolean): boolean;
function LongStrCmp (s1, s2: longStringPtr): boolean;
{ Are the strings s1 amd s2 equal? }
{ Are the strings s1 and s2 equal? }
{ }
{ parameters: }
{ s1, s2 - strings to compare }
@ -3815,7 +3815,7 @@ var
{ }
{ Returns: True if the store is valid, false if not. }
{ }
{ Notes: Specifically, these two rules are inforced: }
{ Notes: Specifically, these two rules are enforced: }
{ 1. No other stores to the same location appear in the }
{ loop. }
{ 2. All uses of the value in the loop can be reached }
@ -4083,7 +4083,7 @@ var
end; {if}
end {else if}
else if opcode in [pc_ldo,pc_lod] then begin
{invariant if there is an immediately preceeding invariant store}
{invariant if there is an immediately preceding invariant store}
if PreviousStore(op, lp2^.block^.code) then begin
op^.parents := icount;
icount := icount+1;

View File

@ -342,7 +342,7 @@ ml1 lda ans SYSS1*SYSS1+2+SYSS1+2 -> SYSS1,SYSS1+2
lda ans+6
adc num2+2
sta ans+6
ml2 ror ans+6 shift the interem result
ml2 ror ans+6 shift the interim result
ror ans+4
ror ans+2
ror ans

View File

@ -35,7 +35,7 @@
{ GenerateCode - generate code from a fully formed expression }
{ tree }
{ GetTemp - find a temporary work variable }
{ InitExpression - initlialize the expression handler }
{ InitExpression - initialize the expression handler }
{ UsualBinaryConversions - performs the usual binary }
{ conversions }
{ UsualUnaryConversions - performs the usual unary conversions }
@ -119,7 +119,7 @@ procedure DoSelection (lType: typePtr; tree: tokenPtr; var size: longint);
{ unsigned - is the bit field unsigned? }
{ isBitField - is the field a bit field? }
{ }
{ varaibles: }
{ variables: }
{ expressionType - set to the type of the field }
@ -835,7 +835,7 @@ var
Error(31);
errorFound := true;
end; {else}
end {if id = nill}
end {if id = nil}
else if id^.itype^.kind = enumConst then begin
stack^.token.class := intConstant;
stack^.token.kind := intconst;
@ -1402,7 +1402,7 @@ var
procedure Skip;
{ skip all tokens in the reminader of the expression }
{ skip all tokens in the remainder of the expression }
begin {Skip}
while not (token.kind in stopSym+[eofsy]) do
@ -1630,7 +1630,7 @@ if token.kind in startExpression then begin
dispose(op);
end {if}
else begin
done2 := false; {do operations with less precidence}
done2 := false; {do operations with less precedence}
repeat
if opStack = nil then
done2 := true
@ -1936,7 +1936,7 @@ procedure DoSelection {lType: typePtr; tree: tokenPtr; var size: longint};
{ unsigned - is the bit field unsigned? }
{ isBitField - is the field a bit field? }
{ }
{ varaibles: }
{ variables: }
{ expressionType - set to the type of the field }
label 1;
@ -2115,7 +2115,7 @@ var
{ returns the type of an expression }
{ }
{ This subroutine is used to see if + and - operarions }
{ This subroutine is used to see if + and - operations }
{ should do pointer addition. }
{ }
{ parameters: }
@ -2138,7 +2138,7 @@ var
expressionType := expressionType^.dType;
ExpressionKind := expressionType^.kind;
doDispose := ldoDispose; {resore the volitile variables}
doDispose := ldoDispose; {restore the volatile variables}
codeGeneration := lCodeGeneration and (numErrors = 0);
expressionType := lexpressionType;
end; {ExpressionKind}

View File

@ -52,7 +52,7 @@ const
type
{possible locations for 4 byte values}
longType = record {desciption of current four byte value}
longType = record {description of current four byte value}
preference: integer; {where you want the value}
where: integer; {where the value is at}
fixedDisp: boolean; {is the displacement a fixed value?}

View File

@ -174,7 +174,7 @@ type
var
codeStarted: boolean; {has code generation started?}
includeLevel: 0..maxint; {nexted include level}
includeLevel: 0..maxint; {nested include level}
includeMark: boolean; {has the mark field been written?}
savePragmas: set of pragmas; {pragmas to record}
saveSource: boolean; {save source streams?}

View File

@ -359,7 +359,7 @@ var
end;
count: integer; {number of constants to repeat}
i,j,k: integer; {loop variables}
lsegDisp: longint; {for backtracking while writting the }
lsegDisp: longint; {for backtracking while writing the }
{ debugger's symbol table }
lval: longint; {temp storage for long constant}
nptr: stringPtr; {pointer to a name}
@ -1437,7 +1437,7 @@ var
function SignExtension (ns: integer): boolean;
{ See if the pattern is a sugn extension }
{ See if the pattern is a sign extension }
{ }
{ Parameters: }
{ ns - start of suspected pattern }
@ -2074,7 +2074,7 @@ procedure InitFile {keepName: gsosOutStringPtr; keepFlag: integer; partial: bool
var
i: integer; {loop index}
lab: stringPtr; {for holdling names var pointers}
lab: stringPtr; {for holding names var pointers}
menuLen: integer; {length of the menu name string}

View File

@ -155,7 +155,7 @@ var
firstCompoundStatement: boolean; {are we doing a function level compound statement?}
fType: typePtr; {return type of the current function}
isForwardDeclared: boolean; {is the field list component }
{ referenceing a forward struct/union? }
{ referencing a forward struct/union? }
isFunction: boolean; {is the declaration a function?}
isPascal: boolean; {has the pascal modifier been used?}
{ (set by DoDeclaration)}
@ -236,7 +236,7 @@ procedure GotoLabel (op: pcodes);
{ does not already exist. Generate the label or a jump to it }
{ based on op. }
{ }
{ paremeters: }
{ parameters: }
{ op - operation code to create }
label 1;
@ -279,7 +279,7 @@ procedure CompoundStatement (makeSymbols: boolean);
{ }
{ Parameters: }
{ makeSymbols - create a symbol table? (False for a }
{ function's outer wrapper, true for imbeded statements) }
{ function's outer wrapper, true for imbedded statements) }
var
stPtr: statementPtr; {for creating a compound statement record}
@ -398,7 +398,7 @@ var
procedure AssignmentStatement;
{ handle an asignment statement }
{ handle an assignment statement }
begin {AssignmentStatement}
if token.kind in startExpression then begin
@ -1032,7 +1032,7 @@ if tl <> nil then begin
NextToken; {evaluate the expression}
Expression(normalExpression, [semicolonch]);
Gen0t(pc_pop, UsualUnaryConversions);
NextToken; {skip the seminolon}
NextToken; {skip the semicolon}
printMacroExpansions := lPrintMacroExpansions;
end; {if}
@ -1185,7 +1185,7 @@ type
var
i: integer; {loop variable}
lastWasIdentifier: boolean; {for deciding if the declarator is a fuction}
lastWasIdentifier: boolean; {for deciding if the declarator is a function}
lastWasPointer: boolean; {was the last type a pointer?}
newName: stringPtr; {new symbol name}
parameterStorage: boolean; {is the new symbol in a parm list?}
@ -2301,7 +2301,7 @@ var
procedure RecomputeSizes (tp: typePtr);
{ a size has been infered from an initializer - set the }
{ a size has been inferred from an initializer - set the }
{ appropriate type size values }
{ }
{ parameters: }
@ -2561,7 +2561,7 @@ procedure DeclarationSpecifiers (allowedTokens: tokenSet;
{ }
{ outputs: }
{ isForwardDeclared - is the field list component }
{ referenceing a forward struct/union? }
{ referencing a forward struct/union? }
{ skipDeclarator - for enum,struct,union with no }
{ declarator }
{ typespec - type specifier }
@ -3827,7 +3827,7 @@ var
{ nonempty-abstract-declarator: }
{ ( nonempty-abstract-declarator ) }
{ abstract-declarator ( ) }
{ abstract-declaraotr [ expression OPT ] }
{ abstract-declarator [ expression OPT ] }
{ * abstract-declarator }
var
@ -3858,7 +3858,7 @@ var
end {if}
else begin
{handle a perenthesized type}
{handle a parenthesized type}
if not (token.kind in [lparench,asteriskch,lbrackch]) then
begin
Error(82);
@ -4125,7 +4125,7 @@ var
{ parameters: }
{ elements - elements in the array }
{ itype - type of each array element }
{ count - remaining initializer repititions }
{ count - remaining initializer repetitions }
{ iPtr - initializer record }
begin {ZeroFill}
@ -4248,7 +4248,7 @@ var
endDisp := disp + itype^.size;
if iPtr^.isStructOrUnion then begin
LoadAddress; {load the destination address}
GenerateCode(iptr^.iTree); {load the stuct address}
GenerateCode(iptr^.iTree); {load the struct address}
{do the assignment}
AssignmentConversion(itype, expressionType, isConstant, val,
true, false);

View File

@ -55,7 +55,7 @@ lb2 iny next character
****************************************************************
*
* KeyPress - Has a key been presed?
* KeyPress - Has a key been pressed?
*
* If a key has not been pressed, this function returns
* false. If a key has been pressed, it clears the key

View File

@ -237,7 +237,7 @@ type
var
dateStr: longStringPtr; {macro date string}
doingPPExpression: boolean; {are we processing a preprocessor expression?}
doingstring: boolean; {used to supress comments in strings}
doingstring: boolean; {used to suppress comments in strings}
errors: array[1..maxErr] of errorType; {errors in this line}
eofPtr: ptr; {points one byte past the last char in the file}
fileList: filePtr; {include file list}
@ -268,7 +268,7 @@ var
ucnString: string[10]; {string of a UCN}
lintErrors: set of 1..maxLint; {lint error codes}
{-- External procedures; see expresssion evaluator for notes ---}
{-- External procedures; see expression evaluator for notes ----}
procedure EndInclude (chPtr: ptr); extern;
@ -406,7 +406,7 @@ end; {AddPath}
function Convertsl(var str: pString): longint; extern;
{ Return the integer equivalent of the string. Assumes a valid }
{ 4-byte integer string; supporst unsigned values. }
{ 4-byte integer string; supports unsigned values. }
procedure SetDateTime; extern;
@ -416,7 +416,7 @@ procedure SetDateTime; extern;
function KeyPress: boolean; extern;
{ Has a key been presed? }
{ Has a key been pressed? }
{ }
{ If a key has not been pressed, this function returns }
{ false. If a key has been pressed, it clears the key }
@ -3432,7 +3432,7 @@ var
lch: char; {next command line character}
cp: ptr; {character pointer}
i: 0..hashSize; {loop variable}
negative: boolean; {is a number nagative?}
negative: boolean; {is a number negative?}
mp: macroRecordPtr; {for building the predefined macros}
bp: ^macroRecordPtr;

View File

@ -40,7 +40,7 @@
{ voidPtrPtr - typeless pointer, for some type casting }
{ stringTypePtr - pointer to the base type for string }
{ constants }
{ defaultStruc - default for structures with errors }
{ defaultStruct - default for structures with errors }
{ }
{---------------------------------------------------------------}
@ -942,7 +942,7 @@ var
procedure WriteScalarType (tp: typePtr; modifiers, subscripts: integer);
{ Write a scalar type and subscipt field }
{ Write a scalar type and subscript field }
{ }
{ parameters: }
{ tp - type pointer }
@ -1539,7 +1539,7 @@ var
lPtr,tPtr: typePtr; {for tracing forward declared types}
begin {ResolveForwardReference}
iPtr^.isForwardDeclared := false; {we will succeeed or flag an error...}
iPtr^.isForwardDeclared := false; {we will succeed or flag an error...}
tPtr := iPtr^.itype; {skip to the struct/union type}
lPtr := nil;
while tPtr^.kind in [pointerType,arrayType,functionType,definedType] do begin

View File

@ -349,7 +349,7 @@ charSym start single character symbols
dc i'0,0,0,0,0,0,0,0' x-rub
end
icp start in comming priority for expression
icp start in-coming priority for expression
! assumes notAnOperation = 200
dc i1'200' ident
dc i1'200' intconst

View File

@ -35,7 +35,7 @@ var
{from EXPRESSION.PAS}
{-------------------}
icp: array[tokenEnum] of byte; {in-commong priorities}
icp: array[tokenEnum] of byte; {in-coming priorities}
isp: array[tokenEnum] of byte; {in-stack priorities}
{from Charset.pas}