📄 symtab.h
字号:
BIPOPENF, BIPCLOSEF, BIPEOFF, BIPEOLF, BIPWRITEF, BIPREADF, BIPWRITEC, BIPREADC, BIPREADB, BIPREADW, BIPWRITEB, BIPWRITEW, BIPREADS, BIPWRITES, BIPLONGFLOAT, BIPNEWPROCESS, BIPTRANSFER, BIPVLIST, BIPMIN, BIPMAX, BIPASSERT, BIPNUMBER, BIPFIRST, BIPLAST, BIPBITAND, BIPBITOR, BIPBITNOT, BIPBITXOR, BIPBITSHIFTLEFT, BIPBITSHIFTRIGHT, BIPBITINSERT, BIPBITEXTRACT, BIPCONVERT, BIPCOERCE, BIPCPUTIME, BIPALLOCATE, BIPDEALLOCATE); ProcNodeRec = record next : ProcNode; fileName : String; lineNumber : integer; name : String; globalName : String; builtin : BuiltinProcType; procType : TypeNode; block : BlockNumber; scope : Scope; displayLevel : DisplayLevel; enclosing : ProcNode; enclosingModule : ModuleNode; body : StmtList; code : CodeList; mem : AllocationNode; tempMap : TempMapNode; initFlagVar : VarNode; containsProcs : boolean; internalProc : boolean; extern : boolean; tailRecursion : boolean; tailRecursionEntry : LabelNumber; doesUpLevel, containsUpLevel : set of DisplayLevel; varList : VarList; end; ProcListRec = record next : ProcList; first, last : ProcNode; end; ExprKind = (EXPRBAD, EXPRNAME, EXPRSYM, EXPRCONST, EXPRUNOP, EXPRBINOP, EXPRSUBSCR, EXPRDOT, EXPRDEREF, EXPRFUNC, EXPRVAR, EXPRSET, EXPRVAL, EXPRCHECK); ExprNodeRec = record next : ExprNode; fileName : String; lineNumber : integer; exprType : TypeNode; baseVar : VarNode; basePtrType : TypeNode; opt : OptIndex; case kind : ExprKind of EXPRNAME : (exprName : IdentList); EXPRSYM : (exprSym : Symbol); EXPRCONST : (exprConst : ConstNode; constType : TypeNode); EXPRVAR : (exprVar : VarNode); EXPRUNOP : (exprUnOp : Token; opnd : ExprNode; unOperType : TypeNode); EXPRBINOP : (exprBinOp : Token; opnd1, opnd2 : ExprNode; operType : TypeNode); EXPRSUBSCR : (arr : ExprNode; subsExpr : ExprNode; subsOffset : cardinal; subscripts : ExprList); EXPRDOT : (rec : ExprNode; fieldName : String; field : FieldNode); EXPRDEREF : (realPtr : boolean; ptr : ExprNode); EXPRFUNC : (func : ExprNode; params : ExprList); EXPRSET : (setTypeName : IdentList; setValue : ExprSetList); EXPRVAL : (exprVal : ExprNode; dependVar : VarNode; dependPtrType : TypeNode); EXPRCHECK : (exprCheck : CheckKind; checkVar : VarNode; checkExpr : ExprNode; checkField : FieldNode; checkType : TypeNode; checkLower, checkUpper : cardinal); end; ExprListRec = record next : ExprList; first, last : ExprNode; end; StmtKind = (STMTBAD, STMTASSIGN, STMTPROC, STMTIF, STMTCASE, STMTWHILE, STMTREPEAT, STMTLOOP, STMTFOR, STMTWITH, STMTEXIT, STMTRETURN); StmtNodeRec = record next : StmtNode; fileName : String; lineNumber : integer; bad : boolean; case kind : StmtKind of STMTASSIGN : (lhs, rhs : ExprNode; lhsType : TypeNode; assignOp : Token); STMTPROC : (proc : ExprNode; params : ExprList); STMTIF : (ifCond : ExprNode; thenList, elseList : StmtList); STMTWHILE : (whileCond : ExprNode; whileBody : StmtList; whilePreEval : ExprList); STMTREPEAT : (repeatCond : ExprNode; repeatBody : StmtList; repeatPreEval : ExprList); STMTLOOP : (loopBody : StmtList; saveLoopActive : boolean; loopPreEval : ExprList); STMTFOR : (forIndexName : String; forFrom, forTo, forBy : ExprNode; forBody : StmtList; forIndexVar, forLimitVar : VarNode; forByConst : ConstNode; forSaveAlloc : AllocationNode; forPreEval : ExprList; forIndexType : TypeNode); STMTWITH : (withQual : ExprNode; withQualNode : WithQualNode; withBody : StmtList; withSaveAllocNode : AllocationNode); STMTRETURN : (returnVal : ExprNode); STMTCASE : (caseSel : ExprNode; cases : CaseList; caseTree : CaseTreeNode; caseElse : StmtList); end; StmtListRec = record next : StmtList; first, last : StmtNode; end; ParamKind = (PARAMVAR, PARAMVALUE, PARAMARRAYVAR, PARAMARRAYVALUE); ParamNodeRec = record next : ParamNode; name : String; paramType : TypeNode; paramVar : VarNode; docopy : boolean; reference : boolean; case kind : ParamKind of PARAMVALUE : (paramListVar : VarNode); PARAMARRAYVAR, PARAMARRAYVALUE : (numElements : VarNode); end; ParamListRec = record next : ParamList; first, last : ParamNode; end; IdentNodeRec = record next : IdentNode; name : String; end; IdentListRec = record next : IdentList; first, last : IdentNode; end; ImportNodeRec = record next : ImportNode; fileName : String; lineNumber : integer; saveModule : ModuleNode; saveScope : Scope; fromIdent : String; idents : IdentList; searchList : IdentList; currSearch : IdentNode; end; ImportListRec = record next : ImportList; first, last : ImportNode; end; ConstSetNodeRec = record next : ConstSetNode; lower, upper : ConstNode; end; ConstSetListRec = record next : ConstSetList; first, last : ConstSetNode; end; ExprSetNodeRec = record next : ExprSetNode; lower, upper : ExprNode; end; ExprSetListRec = record next : ExprSetList; first, last : ExprSetNode; end; CaseNodeRec = record next : CaseNode; pcodeLabel : LabelNumber; labelExprs : ExprSetList; labelConsts : ConstSetList; stmts : StmtList; end; CaseListRec = record next : CaseList; first, last : CaseNode; end; CaseTreeNodeRec = record lower, higher : CaseTreeNode; first, last : cardinal; caseNode : CaseNode; end; SetValueRec = record next : SetValue; setType : TypeNode; value : set of 0..MAXSETSIZE; end; CodeType = (CODEMODULE, CODEPROC); CodeNodeRec = record next : CodeNode; stmts : StmtList; case kind : CodeType of CODEMODULE : (module : ModuleNode); CODEPROC : (proc : ProcNode); end; CodeListRec = record next : CodeList; first, last : CodeNode; end; GlobalVarNodeRec = record next : GlobalVarNode; number : integer; size : cardinal; name : String; extern : boolean; end; GlobalVarListRec = record next : GlobalVarList; first, last : GlobalVarNode; end; WithQualNodeRec = record next : WithQualNode; implQual : VarNode; recType : TypeNode; baseVar : VarNode; basePtrType : TypeNode; end;var integerTypeNode, realTypeNode, charTypeNode, cardinalTypeNode, bitsetTypeNode, booleanTypeNode, wordTypeNode, byteTypeNode, addressTypeNode, stringTypeNode, anyTypeNode, nullTypeNode, opaqueTypeNode, procTypeNode, cardIntTypeNode, builtinProcTypeNode, fileTypeNode, arrayOfCharTypeNode, longrealTypeNode, realConstTypeNode, charConstTypeNode, processTypeNode : TypeNode; indexableTypes : set of DataType; addressableExprs : set of ExprKind; generateBlockNumber : BlockNumber; globalScope, currScope : Scope; globalModule, currModule : ModuleNode; globalProc, currProc : ProcNode; builtinScope, programModuleScope : Scope; withQualList : WithQualNode; globalPortList : PortList; loopActive : boolean; currLine : integer; currFile : String;procedure InitSymTab; external;procedure DumpSymTab; external;function StartScope (open : boolean) : Scope; external;procedure OpenScope (scope : Scope; open : boolean); external;procedure EndScope; external;function DefineSymbol (var sym : Symbol; name : String; scope : Scope; symCase : SymbolCase) : boolean; external;function LookUpSymbol (name : String; scope : Scope; symCase : SymbolCase) : Symbol; external;function QualifiedName (names : IdentList) : Symbol; external;function TypeOf (names : IdentList) : TypeNode; external;function Compatible (var dtn : TypeNode; den : ExprNode; var stn : TypeNode; sen : ExprNode) : TypeNode; external;function Assignable (dtn : TypeNode; var stn : TypeNode; sen : ExprNode) : TypeNode; external;function Passable (dtn : TypeNode; kind : ParamKind; var stn : TypeNode; sen : ExprNode) : boolean; external;function Port(sym : Symbol; scope : Scope) : Symbol; external;function AddToCodeList (list : CodeList; newOne : CodeNode) : CodeList; external;function AddToSymbolList (list : SymbolList; newOne : SymbolNode) : SymbolList; external;procedure CheckEqualSym(sym1, sym2 : Symbol); external;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -