From ffe6c4e924263cdc730b06edeb6766604081d903 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Wed, 29 Jan 2020 17:09:52 -0600 Subject: [PATCH] Spellcheck comments throughout the code. There are no non-comment changes. --- CCommon.pas | 10 +++++----- CGC.pas | 4 ++-- CGI.pas | 8 ++++---- DAG.pas | 6 +++--- Expression.asm | 2 +- Expression.pas | 16 ++++++++-------- Gen.pas | 2 +- Header.pas | 2 +- Native.pas | 6 +++--- Parser.pas | 24 ++++++++++++------------ Scanner.asm | 2 +- Scanner.pas | 10 +++++----- Symbol.pas | 6 +++--- Table.asm | 2 +- Table.pas | 2 +- 15 files changed, 51 insertions(+), 51 deletions(-) diff --git a/CCommon.pas b/CCommon.pas index 746fe6e..0c23aac 100644 --- a/CCommon.pas +++ b/CCommon.pas @@ -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} {----------------------} diff --git a/CGC.pas b/CGC.pas index 3dd33d9..cd0a2e8 100644 --- a/CGC.pas +++ b/CGC.pas @@ -38,8 +38,8 @@ type end; var - {msc} - {---} + {misc} + {----} blkcnt: longint; {number of bytes in current segment} {buffers} diff --git a/CGI.pas b/CGI.pas index 262e671..3a4b295 100644 --- a/CGI.pas +++ b/CGI.pas @@ -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; diff --git a/DAG.pas b/DAG.pas index 791efe2..ff89f46 100644 --- a/DAG.pas +++ b/DAG.pas @@ -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; diff --git a/Expression.asm b/Expression.asm index 21e0d07..378ff8d 100644 --- a/Expression.asm +++ b/Expression.asm @@ -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 diff --git a/Expression.pas b/Expression.pas index 8d52ea5..8adf5f5 100644 --- a/Expression.pas +++ b/Expression.pas @@ -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} diff --git a/Gen.pas b/Gen.pas index c5ee45f..4d808ef 100644 --- a/Gen.pas +++ b/Gen.pas @@ -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?} diff --git a/Header.pas b/Header.pas index 409635b..29f7197 100644 --- a/Header.pas +++ b/Header.pas @@ -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?} diff --git a/Native.pas b/Native.pas index a31e985..f79848f 100644 --- a/Native.pas +++ b/Native.pas @@ -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} diff --git a/Parser.pas b/Parser.pas index c60a5f7..6f3d3b5 100644 --- a/Parser.pas +++ b/Parser.pas @@ -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); diff --git a/Scanner.asm b/Scanner.asm index 757249e..61d8b2b 100644 --- a/Scanner.asm +++ b/Scanner.asm @@ -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 diff --git a/Scanner.pas b/Scanner.pas index c444a5c..d46c620 100644 --- a/Scanner.pas +++ b/Scanner.pas @@ -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; diff --git a/Symbol.pas b/Symbol.pas index c01fc69..6ab2321 100644 --- a/Symbol.pas +++ b/Symbol.pas @@ -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 diff --git a/Table.asm b/Table.asm index 635f9e5..e154d9f 100644 --- a/Table.asm +++ b/Table.asm @@ -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 diff --git a/Table.pas b/Table.pas index e590bdb..5c1b256 100644 --- a/Table.pas +++ b/Table.pas @@ -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}