C<8؎      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Code generator state already generated code (declared variables (not used currently) current contexts stack quote (word declaration) mode Type checker state !Compiler context (where we are?) -In the named function (returning named type) AIn the for loop (started on nth instruction, with named counter) In the program body "Outside program body or functions $unknown context (== internal error) Compiler error !"#$%Supported binary operations &'()*+,-./0 Expressions 1binary operation (x+y etc) 2functionName(arguments) 3literal value 4 record field 5 array item 6named variable value 7Literal values 89:;Program statements <for i := start to end do ... = if expression then ... else ... >exit (procedure or program) ?contnune (for loop) @break (for loop) Areturn expression; BprocedureName(arguments); Clvalue := expression; D-Assignment LHS value: variable or array item EFGHSupported data types I'formal arguments types and return type J#record field: field index and type Krecord Larray of some type Many value (dynamic typing) Nuser defined type OPQRS A symbol TUVW%Source line where symbol was defined XSource column Y Symbol table ZFunction (or procedure) [\function name ]formal arguments ^.return type (if TVoid then this is procedure) _local variables `function body statements aProgram bc constants duser defined types eglobal variables f functions gprogram body statements hRecursive annotated type iNode type info jklmn$Position of node in the source code opqrAttach annotation to node stuvType for symbol identifiers wAttach type info to node xy$Change annotation of annotated node z{|}~Make symbol from it's name and type 5Context ID, for labels and variable names generation Starting code generator state   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~vrstunopqijklmhwxyabcdefgZ[\]^_`YSTUVWXz{|}~HRQPONMLKJIDGFE;CBA@?>=<7:980654321%/.-,+*)('& !"#$       !"#$ !"#$% /.-,+*)('&&'()*+,-./06543211234567:9889:;CBA@?>=<<=>?@ABCDGFEEFGH RQPONMLKJIIJKLMNOPQRSTUVWXTUVWXYZ[\]^_`[\]^_`abcdefgbcdefghijklmjklmnopqopqrstustuvwxyz{|}~Add any stack item to the code Generate instruction Generate PUSH instruction List of builtin functions %If named symbol is builtin, return it' s definition Look up for named symbol  Symbol table of builtin symbols Starting type checker state Run code generator !Get full name of current context -Get label which is at end of current context  (program or function) )Get full name of variable (with context) Put a label and return it' s full name +Return full name of label in the for loop. * fail if current context is not for loop. *Get name of counter variable of for loop. * fail if current context is not for loop. Generate full label name Put label here         !""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUUVWXYZ[[\]^_`aabcdefghhijkllmnoopqrstuvwxyz{|}~simple-pascal-0.1Language.Pascal.TypesLanguage.Pascal.ParserLanguage.Pascal.BuiltinLanguage.Pascal.TypeCheckLanguage.Pascal.CodeGenChecker enterContext dropContext failCheckCheckrunCheckGenerate runGenerate CodeGenStateCGState constants variablescurrentContext quoteMode generated CheckState userTypes userConsts symbolTablecontextsckLineckColumnContext InFunctionForLoop ProgramBodyOutsideUnknownTErrorerrLine errColumn errContext errMessageBinOpIsNEIsEQIsLTIsGTPowModDivMulSubAdd ExpressionOpCallLiteral RecordField ArrayItemVariableLitLBoolLStringLInteger StatementFor IfThenElseExitContinueBreakReturn ProcedureAssignLValueLFieldLArray LVariableType TFunctionTFieldTRecordTArrayTAnyTUserTVoidTBoolTStringTIntegerSymbol symbolName symbolType symbolDefLine symbolDefCol SymbolTableFunctionfnName fnFormalArgs fnResultTypefnVarsfnBodyProgram progConsts progTypes progVariables progFunctionsprogBody:~TypeAnnsrcPostypeOf localSymbolsSrcPossrcLine srcColumnAnnotatecontent annotationIdwithTypesetTypeannotate showSymbol symbolNameC symbolTypeCtypeOfA# contextId emptyGState inContextpProgram parseSourceipushbuiltinFunctions lookupBuiltinbuiltinSymbols checkTypes checkSourceCodeGengenerate runCodeGenParserwithAnnotationpVarspTypespConsts pVarsListpType pNameType pFunction pProcedure pStatementpAssignpLValuepReturn pIfThenElse pExpression pVariable pArrayItem pRecordFieldpCallputItemwritewritelnreadlnTyped typeCheck lookupSymbol isSubtypeOf areSubtypesOf emptyStateisForreturnTsetPoserrorOnUserTypeSymbol checkType checkSymbol getSymbol addSymboladdSymbolTabledropSymbolTablewithSymbolTableaddType evalConstlitTypeaddConstmakeSymbolTable findFieldgetContextString setQuoteMode getEndLabelvariable getFullNamelabel forLoopLabel getForCounter labelFromHere putLabelHeregotojumpWithassignToreadFromfindFieldIndex