This file is generated from the Python source tree. Regenerate it with python scripts/generate_api_docs.py.
pl1compinpySource: pl1compinpy/__init__.py
PL1CompInPy: a Python-based PL/1 compiler project.
pl1compinpy.__main__Source: pl1compinpy/__main__.py
Module containing main support for the PL/I compiler.
pl1compinpy.astSource: pl1compinpy/ast.py
Compatibility wrapper for the core AST package.
pl1compinpy.builtinsSource: pl1compinpy/builtins/__init__.py
PL/I builtin source management.
pl1compinpy.builtins.loaderSource: pl1compinpy/builtins/loader.py
Module containing loader support for the PL/I compiler.
BuiltinErrorclass BuiltinError(ValueError)
Exception type raised for builtin errors.
Defined at line 7.
BuiltinLibraryclass BuiltinLibrary
Data container describing builtin library values used by the compiler.
Defined at line 12.
Methods:
BuiltinLibrary.sourcedef source(self, name: str) -> str
Performs source behavior in BuiltinLibrary.
Defined at line 15.
BuiltinLibrary.includedef include(self, names: list[str]) -> str
Performs include behavior in BuiltinLibrary.
Defined at line 21.
include_builtinsdef include_builtins(source: str, names: list[str] | None = None) -> str
Performs include builtins behavior in pl1compinpy.builtins.loader.
Defined at line 25.
pl1compinpy.builtins.pl1Source: pl1compinpy/builtins/pl1/__init__.py
Packaged PL/I builtin source files.
pl1compinpy.cliSource: pl1compinpy/cli.py
Module containing cli support for the PL/I compiler.
build_parserdef build_parser() -> argparse.ArgumentParser
Performs build parser behavior in pl1compinpy.cli.
Defined at line 9.
maindef main(argv: list[str] | None = None) -> int
Performs main behavior in pl1compinpy.cli.
Defined at line 43.
pl1compinpy.codegenSource: pl1compinpy/codegen/__init__.py
Assembly, executable lowering, and binary container generation.
emit_codedef emit_code(program, target: str) -> str
Emits code output for the compiler.
Defined at line 15.
pl1compinpy.codegen.backendsSource: pl1compinpy/codegen/backends.py
Module containing backends support for the PL/I compiler.
AssemblyTargetclass AssemblyTarget
Data container describing assembly target values used by the compiler.
Defined at line 26.
BackendErrorclass BackendError(ValueError)
Exception type raised for backend errors.
Defined at line 49.
SymbolTableclass SymbolTable
Data container describing symbol table values used by the compiler.
Defined at line 67.
Methods:
SymbolTable.add_stringdef add_string(self, value: str) -> str
Performs add string behavior in SymbolTable.
Defined at line 72.
AssemblyEmitterclass AssemblyEmitter
Class implementing assembly emitter behavior in the PL/I compiler.
Defined at line 79.
Methods:
AssemblyEmitter.__init__def __init__(self, target: AssemblyTarget) -> None
Initializes an instance of AssemblyEmitter.
Defined at line 80.
AssemblyEmitter._collect_symbolsdef _collect_symbols(self, program: Program) -> None
Internal helper in AssemblyEmitter for collect symbols.
Defined at line 86.
AssemblyEmitter._collect_statementdef _collect_statement(self, statement: Statement) -> None
Internal helper in AssemblyEmitter for collect statement.
Defined at line 90.
AssemblyEmitter._collect_expressiondef _collect_expression(self, expression: Expression) -> None
Internal helper in AssemblyEmitter for collect expression.
Defined at line 117.
AssemblyEmitter._new_labeldef _new_label(self, stem: str) -> str
Internal helper in AssemblyEmitter for new label.
Defined at line 126.
AssemblyEmitter._symboldef _symbol(self, name: str) -> str
Internal helper in AssemblyEmitter for symbol.
Defined at line 131.
AssemblyEmitter._runtime_symboldef _runtime_symbol(self, name: str) -> str
Internal helper in AssemblyEmitter for runtime symbol.
Defined at line 134.
AssemblyEmitter._runtime_externsdef _runtime_externs(self) -> list[str]
Internal helper in AssemblyEmitter for runtime externs.
Defined at line 137.
AssemblyEmitter._runtime_link_commentsdef _runtime_link_comments(self, comment: str) -> list[str]
Internal helper in AssemblyEmitter for runtime link comments.
Defined at line 140.
AssemblyEmitter._escaped_bytesdef _escaped_bytes(self, value: str) -> str
Internal helper in AssemblyEmitter for escaped bytes.
Defined at line 150.
AssemblyEmitter._condition_jumpdef _condition_jump(self, operator: str, if_false: bool) -> str
Internal helper in AssemblyEmitter for condition jump.
Defined at line 154.
AssemblyEmitter._raw_put_argumentsdef _raw_put_arguments(self, statement: RawStatement) -> list[Expression]
Internal helper in AssemblyEmitter for raw put arguments.
Defined at line 166.
X586AssemblyEmitterclass X586AssemblyEmitter(AssemblyEmitter)
Class implementing x586 assembly emitter behavior in the PL/I compiler.
Defined at line 183.
Methods:
X586AssemblyEmitter.emitdef emit(self, program: Program) -> str
Performs emit behavior in X586AssemblyEmitter.
Defined at line 184.
X586AssemblyEmitter._statementdef _statement(self, statement: Statement) -> list[str]
Internal helper in X586AssemblyEmitter for statement.
Defined at line 208.
X586AssemblyEmitter._ifdef _if(self, statement: IfStatement) -> list[str]
Internal helper in X586AssemblyEmitter for if.
Defined at line 241.
X586AssemblyEmitter._calldef _call(self, statement: Call) -> list[str]
Internal helper in X586AssemblyEmitter for call.
Defined at line 253.
X586AssemblyEmitter._print_argumentsdef _print_arguments(self, arguments: list[Expression]) -> list[str]
Internal helper in X586AssemblyEmitter for print arguments.
Defined at line 265.
X586AssemblyEmitter._comparisondef _comparison(self, expression: Expression, false_label: str) -> list[str]
Internal helper in X586AssemblyEmitter for comparison.
Defined at line 276.
X586AssemblyEmitter._expressiondef _expression(self, expression: Expression) -> list[str]
Internal helper in X586AssemblyEmitter for expression.
Defined at line 288.
X8664AssemblyEmitterclass X8664AssemblyEmitter(AssemblyEmitter)
Class implementing x8664 assembly emitter behavior in the PL/I compiler.
Defined at line 314.
Methods:
X8664AssemblyEmitter.emitdef emit(self, program: Program) -> str
Performs emit behavior in X8664AssemblyEmitter.
Defined at line 315.
X8664AssemblyEmitter._statementdef _statement(self, statement: Statement) -> list[str]
Internal helper in X8664AssemblyEmitter for statement.
Defined at line 341.
X8664AssemblyEmitter._ifdef _if(self, statement: IfStatement) -> list[str]
Internal helper in X8664AssemblyEmitter for if.
Defined at line 374.
X8664AssemblyEmitter._calldef _call(self, statement: Call) -> list[str]
Internal helper in X8664AssemblyEmitter for call.
Defined at line 386.
X8664AssemblyEmitter._print_argumentsdef _print_arguments(self, arguments: list[Expression]) -> list[str]
Internal helper in X8664AssemblyEmitter for print arguments.
Defined at line 398.
X8664AssemblyEmitter._comparisondef _comparison(self, expression: Expression, false_label: str) -> list[str]
Internal helper in X8664AssemblyEmitter for comparison.
Defined at line 425.
X8664AssemblyEmitter._expressiondef _expression(self, expression: Expression) -> list[str]
Internal helper in X8664AssemblyEmitter for expression.
Defined at line 437.
Arm64AssemblyEmitterclass Arm64AssemblyEmitter(AssemblyEmitter)
Class implementing arm64 assembly emitter behavior in the PL/I compiler.
Defined at line 463.
Methods:
Arm64AssemblyEmitter.emitdef emit(self, program: Program) -> str
Performs emit behavior in Arm64AssemblyEmitter.
Defined at line 464.
Arm64AssemblyEmitter._statementdef _statement(self, statement: Statement) -> list[str]
Internal helper in Arm64AssemblyEmitter for statement.
Defined at line 492.
Arm64AssemblyEmitter._ifdef _if(self, statement: IfStatement) -> list[str]
Internal helper in Arm64AssemblyEmitter for if.
Defined at line 525.
Arm64AssemblyEmitter._calldef _call(self, statement: Call) -> list[str]
Internal helper in Arm64AssemblyEmitter for call.
Defined at line 537.
Arm64AssemblyEmitter._print_argumentsdef _print_arguments(self, arguments: list[Expression]) -> list[str]
Internal helper in Arm64AssemblyEmitter for print arguments.
Defined at line 547.
Arm64AssemblyEmitter._comparisondef _comparison(self, expression: Expression, false_label: str) -> list[str]
Internal helper in Arm64AssemblyEmitter for comparison.
Defined at line 573.
Arm64AssemblyEmitter._expressiondef _expression(self, expression: Expression) -> list[str]
Internal helper in Arm64AssemblyEmitter for expression.
Defined at line 594.
Arm64AssemblyEmitter._escape_ascizdef _escape_asciz(self, value: str) -> str
Internal helper in Arm64AssemblyEmitter for escape asciz.
Defined at line 619.
emit_assemblydef emit_assembly(program: Program, target_name: str) -> str
Emits assembly output for the compiler.
Defined at line 53.
pl1compinpy.codegen.binary_formatsSource: pl1compinpy/codegen/binary_formats.py
Module containing binary formats support for the PL/I compiler.
BinaryFormatErrorclass BinaryFormatError(ValueError)
Exception type raised for binary format errors.
Defined at line 9.
emit_binarydef emit_binary(format_name: str, program: Program | None = None) -> bytes
Emits binary output for the compiler.
Defined at line 23.
_aligndef _align(value: int, alignment: int) -> int
Internal helper in pl1compinpy.codegen.binary_formats for align.
Defined at line 39.
_pe32_x586_windowsdef _pe32_x586_windows(program: Program | None = None) -> bytes
Internal helper in pl1compinpy.codegen.binary_formats for pe32 x586 windows.
Defined at line 43.
_pe64_x86_64_windowsdef _pe64_x86_64_windows(program: Program | None = None) -> bytes
Internal helper in pl1compinpy.codegen.binary_formats for pe64 x86 64 windows.
Defined at line 129.
_elf64_x86_64def _elf64_x86_64(program: Program | None = None) -> bytes
Internal helper in pl1compinpy.codegen.binary_formats for elf64 x86 64.
Defined at line 214.
_elf64_aarch64def _elf64_aarch64(program: Program | None = None) -> bytes
Internal helper in pl1compinpy.codegen.binary_formats for elf64 aarch64.
Defined at line 221.
_elf64def _elf64(machine: int, code: bytes, data: bytes = b'') -> bytes
Internal helper in pl1compinpy.codegen.binary_formats for elf64.
Defined at line 232.
_macho64_x86_64_macosdef _macho64_x86_64_macos(program: Program | None = None) -> bytes
Internal helper in pl1compinpy.codegen.binary_formats for macho64 x86 64 macos.
Defined at line 273.
_macho64_arm64_macosdef _macho64_arm64_macos(program: Program | None = None) -> bytes
Internal helper in pl1compinpy.codegen.binary_formats for macho64 arm64 macos.
Defined at line 280.
_macho64def _macho64(cpu_type: int, cpu_subtype: int, code: bytes, data: bytes = b'') -> bytes
Internal helper in pl1compinpy.codegen.binary_formats for macho64.
Defined at line 287.
_segment_commanddef _segment_command(name: str, vmaddr: int, vmsize: int, fileoff: int, filesize: int, maxprot: int, initprot: int) -> bytes
Internal helper in pl1compinpy.codegen.binary_formats for segment command.
Defined at line 318.
pl1compinpy.codegen.dotnet_executableSource: pl1compinpy/codegen/dotnet_executable.py
Module containing dotnet executable support for the PL/I compiler.
DotNetExecutableErrorclass DotNetExecutableError(RuntimeError)
Exception type raised for dot net executable errors.
Defined at line 12.
emit_dotnet_executabledef emit_dotnet_executable(program: Program, output: Path, ilasm: str | None = None) -> Path
Emits dotnet executable output for the compiler.
Defined at line 16.
pl1compinpy.codegen.dotnet_ilSource: pl1compinpy/codegen/dotnet_il.py
Module containing dotnet il support for the PL/I compiler.
DotNetILEmitterclass DotNetILEmitter
Class implementing dot net ilemitter behavior in the PL/I compiler.
Defined at line 7.
Methods:
DotNetILEmitter.emitdef emit(self, program: Program) -> str
Performs emit behavior in DotNetILEmitter.
Defined at line 8.
DotNetILEmitter._proceduredef _procedure(self, name: str, procedure: Procedure) -> list[str]
Internal helper in DotNetILEmitter for procedure.
Defined at line 54.
DotNetILEmitter._entrypoint_calldef _entrypoint_call(self, procedure_name: str, returns: bool) -> list[str]
Internal helper in DotNetILEmitter for entrypoint call.
Defined at line 82.
DotNetILEmitter._entrypoint_bodydef _entrypoint_body(self, statements: list[object]) -> list[str]
Internal helper in DotNetILEmitter for entrypoint body.
Defined at line 97.
DotNetILEmitter._statementdef _statement(self, statement: object, locals_map: dict[str, int], local_types: list[str]) -> list[str]
Internal helper in DotNetILEmitter for statement.
Defined at line 116.
DotNetILEmitter._expressiondef _expression(self, expression: object, locals_map: dict[str, int], local_types: list[str]) -> list[str]
Internal helper in DotNetILEmitter for expression.
Defined at line 138.
DotNetILEmitter._calldef _call(self, call: Call, locals_map: dict[str, int], local_types: list[str]) -> list[str]
Internal helper in DotNetILEmitter for call.
Defined at line 150.
DotNetILEmitter._localdef _local(self, name: str, locals_map: dict[str, int], local_types: list[str]) -> int
Internal helper in DotNetILEmitter for local.
Defined at line 167.
DotNetILEmitter._int_constantdef _int_constant(self, value: int) -> list[str]
Internal helper in DotNetILEmitter for int constant.
Defined at line 173.
DotNetILEmitter._main_namedef _main_name(self, program: Program) -> str | None
Internal helper in DotNetILEmitter for main name.
Defined at line 182.
DotNetILEmitter._quotedef _quote(self, value: str) -> str
Internal helper in DotNetILEmitter for quote.
Defined at line 189.
emit_dotnet_ildef emit_dotnet_il(program: Program) -> str
Emits dotnet il output for the compiler.
Defined at line 194.
pl1compinpy.codegen.executable_pipelineSource: pl1compinpy/codegen/executable_pipeline.py
Module containing executable pipeline support for the PL/I compiler.
Mnemonicclass Mnemonic
Data container describing mnemonic values used by the compiler.
Defined at line 26.
ExecutableImageclass ExecutableImage
Data container describing executable image values used by the compiler.
Defined at line 32.
LoweringContextclass LoweringContext
Data container describing lowering context values used by the compiler.
Defined at line 38.
Methods:
LoweringContext.variabledef variable(self, name: str) -> int
Performs variable behavior in LoweringContext.
Defined at line 46.
LoweringContext.localdef local(self, name: str) -> int
Performs local behavior in LoweringContext.
Defined at line 52.
LoweringContext.local_bytesdef local_bytes(self) -> int
Performs local bytes behavior in LoweringContext.
Defined at line 60.
LoweringContext.is_localdef is_local(self, name: str) -> bool
Performs is local behavior in LoweringContext.
Defined at line 63.
LoweringContext.is_parameterdef is_parameter(self, name: str) -> bool
Performs is parameter behavior in LoweringContext.
Defined at line 66.
LoweringContext.stack_offsetdef stack_offset(self, name: str) -> int
Performs stack offset behavior in LoweringContext.
Defined at line 69.
LoweringContext.stringdef string(self, value: str) -> tuple[int, int]
Performs string behavior in LoweringContext.
Defined at line 76.
LoweringContext.labeldef label(self, stem: str) -> str
Performs label behavior in LoweringContext.
Defined at line 82.
X586MnemonicAssemblerclass X586MnemonicAssembler
Class implementing x586 mnemonic assembler behavior in the PL/I compiler.
Defined at line 335.
Methods:
X586MnemonicAssembler.__init__def __init__(self, image_base: int, code_rva: int, data: bytes, variables: dict[str, int]) -> None
Initializes an instance of X586MnemonicAssembler.
Defined at line 336.
X586MnemonicAssembler.assembledef assemble(self, mnemonics: list[Mnemonic]) -> bytes
Performs assemble behavior in X586MnemonicAssembler.
Defined at line 343.
X586MnemonicAssembler._var_addrdef _var_addr(self, name: str) -> int
Internal helper in X586MnemonicAssembler for var addr.
Defined at line 351.
X586MnemonicAssembler._data_addrdef _data_addr(self, offset: int) -> int
Internal helper in X586MnemonicAssembler for data addr.
Defined at line 354.
X586MnemonicAssembler._code_sizedef _code_size(self, mnemonics: list[Mnemonic]) -> int
Internal helper in X586MnemonicAssembler for code size.
Defined at line 357.
X586MnemonicAssembler._label_offsetsdef _label_offsets(self, mnemonics: list[Mnemonic]) -> dict[str, int]
Internal helper in X586MnemonicAssembler for label offsets.
Defined at line 360.
X586MnemonicAssembler._sizedef _size(self, mnemonic: Mnemonic) -> int
Internal helper in X586MnemonicAssembler for size.
Defined at line 369.
X586MnemonicAssembler._encodedef _encode(self, mnemonic: Mnemonic, offset: int, labels: dict[str, int]) -> bytes
Internal helper in X586MnemonicAssembler for encode.
Defined at line 405.
X586MnemonicAssembler._jfalse_opcodedef _jfalse_opcode(self, operator: str) -> bytes
Internal helper in X586MnemonicAssembler for jfalse opcode.
Defined at line 474.
X8664MnemonicAssemblerclass X8664MnemonicAssembler
Class implementing x8664 mnemonic assembler behavior in the PL/I compiler.
Defined at line 486.
Methods:
X8664MnemonicAssembler.__init__def __init__(self, image_base: int, code_rva: int, data: bytes, variables: dict[str, int], macos: bool = False, windows: bool = False) -> None
Initializes an instance of X8664MnemonicAssembler.
Defined at line 487.
X8664MnemonicAssembler.assembledef assemble(self, mnemonics: list[Mnemonic]) -> bytes
Performs assemble behavior in X8664MnemonicAssembler.
Defined at line 495.
Arm64MnemonicAssemblerclass Arm64MnemonicAssembler
Class implementing arm64 mnemonic assembler behavior in the PL/I compiler.
Defined at line 517.
Methods:
Arm64MnemonicAssembler.__init__def __init__(self, macos: bool = False) -> None
Initializes an instance of Arm64MnemonicAssembler.
Defined at line 518.
Arm64MnemonicAssembler.assembledef assemble(self, mnemonics: list[Mnemonic]) -> bytes
Performs assemble behavior in Arm64MnemonicAssembler.
Defined at line 521.
Arm64MnemonicAssembler._mov_w0_immdef _mov_w0_imm(self, value: int) -> bytes
Internal helper in Arm64MnemonicAssembler for mov w0 imm.
Defined at line 534.
Arm64MnemonicAssembler._mov_x16_or_x8def _mov_x16_or_x8(self, value: int) -> bytes
Internal helper in Arm64MnemonicAssembler for mov x16 or x8.
Defined at line 539.
lower_programdef lower_program(program: Program) -> tuple[list[Mnemonic], bytes, dict[str, int]]
Performs lower program behavior in pl1compinpy.codegen.executable_pipeline.
Defined at line 88.
assemble_executabledef assemble_executable(program: Program, binary_format: str, *, image_base: int = 4194304, code_rva: int = 4096) -> ExecutableImage
Performs assemble executable behavior in pl1compinpy.codegen.executable_pipeline.
Defined at line 114.
_collect_datadef _collect_data(statement: Statement, context: LoweringContext) -> None
Internal helper in pl1compinpy.codegen.executable_pipeline for collect data.
Defined at line 136.
_collect_expression_datadef _collect_expression_data(expression: Expression, context: LoweringContext) -> None
Internal helper in pl1compinpy.codegen.executable_pipeline for collect expression data.
Defined at line 157.
_is_procedure_definitiondef _is_procedure_definition(statement: Statement) -> bool
Internal helper in pl1compinpy.codegen.executable_pipeline for is procedure definition.
Defined at line 167.
_main_procedure_namedef _main_procedure_name(program: Program) -> str | None
Internal helper in pl1compinpy.codegen.executable_pipeline for main procedure name.
Defined at line 173.
_lower_statementdef _lower_statement(statement: Statement, context: LoweringContext) -> list[Mnemonic]
Internal helper in pl1compinpy.codegen.executable_pipeline for lower statement.
Defined at line 181.
_lower_proceduredef _lower_procedure(procedure: Procedure, context: LoweringContext) -> list[Mnemonic]
Internal helper in pl1compinpy.codegen.executable_pipeline for lower procedure.
Defined at line 230.
_lower_calldef _lower_call(call: Call, context: LoweringContext) -> list[Mnemonic]
Internal helper in pl1compinpy.codegen.executable_pipeline for lower call.
Defined at line 250.
_lower_expressiondef _lower_expression(expression: Expression, context: LoweringContext) -> list[Mnemonic]
Internal helper in pl1compinpy.codegen.executable_pipeline for lower expression.
Defined at line 264.
_lower_condition_false_jumpdef _lower_condition_false_jump(expression: Expression, false_label: str, context: LoweringContext) -> list[Mnemonic]
Internal helper in pl1compinpy.codegen.executable_pipeline for lower condition false jump.
Defined at line 286.
_lower_displaydef _lower_display(arguments: list[Expression], context: LoweringContext) -> list[Mnemonic]
Internal helper in pl1compinpy.codegen.executable_pipeline for lower display.
Defined at line 296.
_load_namedef _load_name(name: str, context: LoweringContext) -> Mnemonic
Internal helper in pl1compinpy.codegen.executable_pipeline for load name.
Defined at line 308.
_store_namedef _store_name(name: str, context: LoweringContext) -> Mnemonic
Internal helper in pl1compinpy.codegen.executable_pipeline for store name.
Defined at line 317.
_push_referencedef _push_reference(name: str, context: LoweringContext) -> Mnemonic
Internal helper in pl1compinpy.codegen.executable_pipeline for push reference.
Defined at line 326.
pl1compinpy.codegen.jvm_bytecodeSource: pl1compinpy/codegen/jvm_bytecode.py
Module containing jvm bytecode support for the PL/I compiler.
JVMBytecodeEmitterclass JVMBytecodeEmitter
Class implementing jvmbytecode emitter behavior in the PL/I compiler.
Defined at line 7.
Methods:
JVMBytecodeEmitter.emitdef emit(self, program: Program) -> str
Performs emit behavior in JVMBytecodeEmitter.
Defined at line 8.
JVMBytecodeEmitter._proceduredef _procedure(self, name: str, procedure: Procedure) -> list[str]
Internal helper in JVMBytecodeEmitter for procedure.
Defined at line 44.
JVMBytecodeEmitter._expressiondef _expression(self, expression: object, locals_map: dict[str, int]) -> list[str]
Internal helper in JVMBytecodeEmitter for expression.
Defined at line 81.
JVMBytecodeEmitter._calldef _call(self, call: Call, locals_map: dict[str, int]) -> list[str]
Internal helper in JVMBytecodeEmitter for call.
Defined at line 100.
JVMBytecodeEmitter._int_constantdef _int_constant(self, value: int) -> list[str]
Internal helper in JVMBytecodeEmitter for int constant.
Defined at line 108.
JVMBytecodeEmitter._return_descriptordef _return_descriptor(self, procedure: Procedure) -> str
Internal helper in JVMBytecodeEmitter for return descriptor.
Defined at line 117.
JVMBytecodeEmitter._main_namedef _main_name(self, program: Program) -> str | None
Internal helper in JVMBytecodeEmitter for main name.
Defined at line 120.
emit_jvm_bytecodedef emit_jvm_bytecode(program: Program) -> str
Emits jvm bytecode output for the compiler.
Defined at line 128.
pl1compinpy.codegen.jvm_classfileSource: pl1compinpy/codegen/jvm_classfile.py
Module containing jvm classfile support for the PL/I compiler.
ConstantPoolclass ConstantPool
Data container describing constant pool values used by the compiler.
Defined at line 14.
Methods:
ConstantPool.utf8def utf8(self, value: str) -> int
Performs utf8 behavior in ConstantPool.
Defined at line 18.
ConstantPool.class_infodef class_info(self, name: str) -> int
Performs class info behavior in ConstantPool.
Defined at line 25.
ConstantPool.name_and_typedef name_and_type(self, name: str, descriptor: str) -> int
Performs name and type behavior in ConstantPool.
Defined at line 31.
ConstantPool.method_refdef method_ref(self, owner: str, name: str, descriptor: str) -> int
Performs method ref behavior in ConstantPool.
Defined at line 37.
ConstantPool._adddef _add(self, entry: bytes) -> int
Internal helper in ConstantPool for add.
Defined at line 45.
ConstantPool.bytesdef bytes(self) -> bytes
Performs bytes behavior in ConstantPool.
Defined at line 49.
JVMProcedureclass JVMProcedure
Data container describing jvmprocedure values used by the compiler.
Defined at line 54.
Methods:
JVMProcedure.descriptordef descriptor(self) -> str
Performs descriptor behavior in JVMProcedure.
Defined at line 63.
JVMClassFileEmitterclass JVMClassFileEmitter
Class implementing jvmclass file emitter behavior in the PL/I compiler.
Defined at line 67.
Methods:
JVMClassFileEmitter.emitdef emit(self, program: Program, class_name: str = 'PL1Program') -> bytes
Performs emit behavior in JVMClassFileEmitter.
Defined at line 68.
JVMClassFileEmitter._proceduresdef _procedures(self, program: Program) -> list[JVMProcedure]
Internal helper in JVMClassFileEmitter for procedures.
Defined at line 118.
JVMClassFileEmitter._proceduredef _procedure(self, name: str, procedure: Procedure) -> JVMProcedure
Internal helper in JVMClassFileEmitter for procedure.
Defined at line 127.
JVMClassFileEmitter._return_valuedef _return_value(self, statement: RawStatement, locals_map: dict[str, int]) -> bytes
Internal helper in JVMClassFileEmitter for return value.
Defined at line 157.
JVMClassFileEmitter._expressiondef _expression(self, expression: object, locals_map: dict[str, int]) -> bytes
Internal helper in JVMClassFileEmitter for expression.
Defined at line 164.
JVMClassFileEmitter._constructor_codedef _constructor_code(self, pool: ConstantPool) -> bytes
Internal helper in JVMClassFileEmitter for constructor code.
Defined at line 174.
JVMClassFileEmitter._methoddef _method(self, pool: ConstantPool, name: str, descriptor: str, code: bytes, max_stack: int, max_locals: int) -> bytes
Internal helper in JVMClassFileEmitter for method.
Defined at line 177.
JVMClassFileEmitter._iconstdef _iconst(self, value: int) -> bytes
Internal helper in JVMClassFileEmitter for iconst.
Defined at line 194.
JVMClassFileEmitter._iloaddef _iload(self, index: int) -> bytes
Internal helper in JVMClassFileEmitter for iload.
Defined at line 203.
JVMClassFileEmitter._istoredef _istore(self, index: int) -> bytes
Internal helper in JVMClassFileEmitter for istore.
Defined at line 206.
JVMClassFileEmitter._main_namedef _main_name(self, program: Program) -> str | None
Internal helper in JVMClassFileEmitter for main name.
Defined at line 209.
emit_jvm_classdef emit_jvm_class(program: Program, class_name: str = 'PL1Program') -> bytes
Emits jvm class output for the compiler.
Defined at line 217.
emit_jvm_classesdef emit_jvm_classes(program: Program, class_name: str = 'PL1Program') -> dict[str, bytes]
Emits jvm classes output for the compiler.
Defined at line 221.
pl1compinpy.codegen.linkersSource: pl1compinpy/codegen/linkers.py
Module containing linkers support for the PL/I compiler.
LinkRequestclass LinkRequest
Data container describing link request values used by the compiler.
Defined at line 10.
LinkerErrorclass LinkerError(ValueError)
Exception type raised for linker errors.
Defined at line 15.
ExecutableLinkerclass ExecutableLinker
Facade for the platform executable container writers.
Defined at line 19.
Methods:
ExecutableLinker.linkdef link(self, request: LinkRequest) -> bytes
Performs link behavior in ExecutableLinker.
Defined at line 22.
PELinkerclass PELinker(ExecutableLinker)
Class implementing pelinker behavior in the PL/I compiler.
Defined at line 28.
Methods:
PELinker.link_pe32_x586_windowsdef link_pe32_x586_windows(self, program: Program | None = None) -> bytes
Performs link pe32 x586 windows behavior in PELinker.
Defined at line 29.
PELinker.link_pe64_x86_64_windowsdef link_pe64_x86_64_windows(self, program: Program | None = None) -> bytes
Performs link pe64 x86 64 windows behavior in PELinker.
Defined at line 32.
ELFLinkerclass ELFLinker(ExecutableLinker)
Class implementing elflinker behavior in the PL/I compiler.
Defined at line 36.
Methods:
ELFLinker.link_elf64_x86_64def link_elf64_x86_64(self, program: Program | None = None) -> bytes
Performs link elf64 x86 64 behavior in ELFLinker.
Defined at line 37.
ELFLinker.link_elf64_aarch64def link_elf64_aarch64(self, program: Program | None = None) -> bytes
Performs link elf64 aarch64 behavior in ELFLinker.
Defined at line 40.
MachOLinkerclass MachOLinker(ExecutableLinker)
Class implementing mach olinker behavior in the PL/I compiler.
Defined at line 44.
Methods:
MachOLinker.link_macho64_x86_64_macosdef link_macho64_x86_64_macos(self, program: Program | None = None) -> bytes
Performs link macho64 x86 64 macos behavior in MachOLinker.
Defined at line 45.
MachOLinker.link_macho64_arm64_macosdef link_macho64_arm64_macos(self, program: Program | None = None) -> bytes
Performs link macho64 arm64 macos behavior in MachOLinker.
Defined at line 48.
link_executabledef link_executable(format_name: str, program: Program | None = None) -> bytes
Performs link executable behavior in pl1compinpy.codegen.linkers.
Defined at line 52.
pl1compinpy.codegen.python_sourceSource: pl1compinpy/codegen/python_source.py
Module containing python source support for the PL/I compiler.
PythonSourceEmitterclass PythonSourceEmitter
Class implementing python source emitter behavior in the PL/I compiler.
Defined at line 24.
Methods:
PythonSourceEmitter.emitdef emit(self, program: Program) -> str
Performs emit behavior in PythonSourceEmitter.
Defined at line 25.
PythonSourceEmitter._statementdef _statement(self, statement: object, indent: int = 0) -> list[str]
Internal helper in PythonSourceEmitter for statement.
Defined at line 34.
PythonSourceEmitter._io_statementdef _io_statement(self, statement: IOStatement, indent: int) -> list[str]
Internal helper in PythonSourceEmitter for io statement.
Defined at line 90.
PythonSourceEmitter._select_statementdef _select_statement(self, statement: SelectStatement, indent: int) -> list[str]
Internal helper in PythonSourceEmitter for select statement.
Defined at line 105.
PythonSourceEmitter._select_conditiondef _select_condition(self, statement: SelectStatement, expressions: list[Expression]) -> str
Internal helper in PythonSourceEmitter for select condition.
Defined at line 118.
PythonSourceEmitter._proceduredef _procedure(self, procedure: Procedure, indent: int) -> list[str]
Internal helper in PythonSourceEmitter for procedure.
Defined at line 126.
PythonSourceEmitter._bodydef _body(self, statements: list[object], indent: int) -> list[str]
Internal helper in PythonSourceEmitter for body.
Defined at line 136.
PythonSourceEmitter._expressiondef _expression(self, expression: Expression) -> str
Internal helper in PythonSourceEmitter for expression.
Defined at line 144.
PythonSourceEmitter._operatordef _operator(self, operator: str) -> str
Internal helper in PythonSourceEmitter for operator.
Defined at line 160.
PythonSourceEmitter._declaration_initial_valuedef _declaration_initial_value(self, declaration: Declaration, name: str) -> str
Internal helper in PythonSourceEmitter for declaration initial value.
Defined at line 171.
PythonSourceEmitter._main_procedure_namedef _main_procedure_name(self, program: Program) -> str | None
Internal helper in PythonSourceEmitter for main procedure name.
Defined at line 183.
emit_python_sourcedef emit_python_source(program: Program) -> str
Emits python source output for the compiler.
Defined at line 191.
pl1compinpy.codegen.runtime_linkSource: pl1compinpy/codegen/runtime_link.py
Module containing runtime link support for the PL/I compiler.
RuntimeLinkageclass RuntimeLinkage
Data container describing runtime linkage values used by the compiler.
Defined at line 10.
Methods:
RuntimeLinkage.symboldef symbol(self, name: str, prefix: str = '') -> str
Performs symbol behavior in RuntimeLinkage.
Defined at line 24.
RuntimeLinkManifestclass RuntimeLinkManifest
Data container describing runtime link manifest values used by the compiler.
Defined at line 31.
Methods:
RuntimeLinkManifest.to_bytesdef to_bytes(self) -> bytes
Performs to bytes behavior in RuntimeLinkManifest.
Defined at line 35.
runtime_linkagedef runtime_linkage(target: str) -> RuntimeLinkage
Performs runtime linkage behavior in pl1compinpy.codegen.runtime_link.
Defined at line 176.
runtime_manifestdef runtime_manifest(target: str, program: Program | None = None) -> RuntimeLinkManifest
Performs runtime manifest behavior in pl1compinpy.codegen.runtime_link.
Defined at line 188.
encoded_runtime_manifestdef encoded_runtime_manifest(target: str, program: Program | None = None) -> bytes
Performs encoded runtime manifest behavior in pl1compinpy.codegen.runtime_link.
Defined at line 192.
_runtime_callsdef _runtime_calls(program: Program | None) -> set[str]
Internal helper in pl1compinpy.codegen.runtime_link for runtime calls.
Defined at line 196.
_collect_runtime_callsdef _collect_runtime_calls(statement: Statement | None, calls: set[str]) -> None
Internal helper in pl1compinpy.codegen.runtime_link for collect runtime calls.
Defined at line 205.
pl1compinpy.compilerSource: pl1compinpy/compiler.py
Compatibility wrapper for the core compiler package.
pl1compinpy.coreSource: pl1compinpy/core/__init__.py
Core AST and compiler orchestration.
pl1compinpy.core.astSource: pl1compinpy/core/ast.py
Module containing ast support for the PL/I compiler.
Programclass Program
Data container describing program values used by the compiler.
Defined at line 7.
Statementclass Statement
Class implementing statement behavior in the PL/I compiler.
Defined at line 11.
Assignmentclass Assignment(Statement)
Data container describing assignment values used by the compiler.
Defined at line 16.
Declarationclass Declaration(Statement)
Data container describing declaration values used by the compiler.
Defined at line 22.
GenericAlternativeclass GenericAlternative
Data container describing generic alternative values used by the compiler.
Defined at line 34.
Callclass Call(Statement)
Data container describing call values used by the compiler.
Defined at line 40.
Procedureclass Procedure(Statement)
Data container describing procedure values used by the compiler.
Defined at line 47.
DoGroupclass DoGroup(Statement)
Data container describing do group values used by the compiler.
Defined at line 57.
IfStatementclass IfStatement(Statement)
Data container describing if statement values used by the compiler.
Defined at line 65.
IOStatementclass IOStatement(Statement)
Data container describing iostatement values used by the compiler.
Defined at line 72.
SelectStatementclass SelectStatement(Statement)
Data container describing select statement values used by the compiler.
Defined at line 81.
WhenBranchclass WhenBranch
Data container describing when branch values used by the compiler.
Defined at line 88.
LabelledStatementclass LabelledStatement(Statement)
Data container describing labelled statement values used by the compiler.
Defined at line 94.
RawStatementclass RawStatement(Statement)
Data container describing raw statement values used by the compiler.
Defined at line 100.
Expressionclass Expression
Class implementing expression behavior in the PL/I compiler.
Defined at line 105.
Identifierclass Identifier(Expression)
Data container describing identifier values used by the compiler.
Defined at line 110.
NumberLiteralclass NumberLiteral(Expression)
Data container describing number literal values used by the compiler.
Defined at line 115.
StringLiteralclass StringLiteral(Expression)
Data container describing string literal values used by the compiler.
Defined at line 120.
BinaryExpressionclass BinaryExpression(Expression)
Data container describing binary expression values used by the compiler.
Defined at line 125.
UnaryExpressionclass UnaryExpression(Expression)
Data container describing unary expression values used by the compiler.
Defined at line 132.
pl1compinpy.core.compilerSource: pl1compinpy/core/compiler.py
Module containing compiler support for the PL/I compiler.
Compilerclass Compiler
Class implementing compiler behavior in the PL/I compiler.
Defined at line 11.
Methods:
Compiler.compiledef compile(self, source: str, target: str = 'python-source', builtins: list[str] | None = None) -> str
Performs compile behavior in Compiler.
Defined at line 12.
compile_sourcedef compile_source(source: str, target: str = 'python-source', builtins: list[str] | None = None) -> str
Compiles PL/I input into source output.
Defined at line 18.
available_targetsdef available_targets() -> tuple[str, ...]
Performs available targets behavior in pl1compinpy.core.compiler.
Defined at line 22.
available_binary_formatsdef available_binary_formats() -> tuple[str, ...]
Performs available binary formats behavior in pl1compinpy.core.compiler.
Defined at line 26.
compile_binarydef compile_binary(format_name: str, source: str | None = None, builtins: list[str] | None = None) -> bytes
Compiles PL/I input into binary output.
Defined at line 30.
compile_jvm_classesdef compile_jvm_classes(source: str, builtins: list[str] | None = None) -> dict[str, bytes]
Compiles PL/I input into jvm classes output.
Defined at line 36.
compile_dotnet_executabledef compile_dotnet_executable(source: str, output: str | Path, builtins: list[str] | None = None, ilasm: str | None = None) -> Path
Compiles PL/I input into dotnet executable output.
Defined at line 42.
pl1compinpy.frontendSource: pl1compinpy/frontend/__init__.py
Lexing, keyword metadata, and parsing for PL1CompInPy.
pl1compinpy.frontend.keywordsSource: pl1compinpy/frontend/keywords.py
Module containing keywords support for the PL/I compiler.
KeywordInfoclass KeywordInfo
Data container describing keyword info values used by the compiler.
Defined at line 7.
_adddef _add(word: str, category: str, meaning: str, *aliases: str) -> None
Internal helper in pl1compinpy.frontend.keywords for add.
Defined at line 18.
keyword_infodef keyword_info(word: str) -> KeywordInfo | None
Performs keyword info behavior in pl1compinpy.frontend.keywords.
Defined at line 169.
pl1compinpy.frontend.lexerSource: pl1compinpy/frontend/lexer.py
Module containing lexer support for the PL/I compiler.
TokenTypeclass TokenType(str, Enum)
Class implementing token type behavior in the PL/I compiler.
Defined at line 9.
Tokenclass Token
Data container describing token values used by the compiler.
Defined at line 40.
Methods:
Token.is_keyworddef is_keyword(self) -> bool
Performs is keyword behavior in Token.
Defined at line 48.
LexerErrorclass LexerError(ValueError)
Exception type raised for lexer errors.
Defined at line 52.
Lexerclass Lexer
Class implementing lexer behavior in the PL/I compiler.
Defined at line 56.
Methods:
Lexer.__init__def __init__(self, source: str) -> None
Initializes an instance of Lexer.
Defined at line 57.
Lexer.tokenizedef tokenize(self) -> list[Token]
Tokenizes PL/I source text for the parser.
Defined at line 63.
Lexer._at_enddef _at_end(self) -> bool
Internal helper in Lexer for at end.
Defined at line 86.
Lexer._peekdef _peek(self) -> str
Internal helper in Lexer for peek.
Defined at line 89.
Lexer._peek_nextdef _peek_next(self) -> str
Internal helper in Lexer for peek next.
Defined at line 92.
Lexer._advancedef _advance(self) -> str
Internal helper in Lexer for advance.
Defined at line 98.
Lexer._advance_linedef _advance_line(self) -> None
Internal helper in Lexer for advance line.
Defined at line 104.
Lexer._identifierdef _identifier(self) -> Token
Internal helper in Lexer for identifier.
Defined at line 109.
Lexer._numberdef _number(self) -> Token
Internal helper in Lexer for number.
Defined at line 118.
Lexer._stringdef _string(self) -> Token
Internal helper in Lexer for string.
Defined at line 130.
Lexer._commentdef _comment(self) -> None
Internal helper in Lexer for comment.
Defined at line 145.
Lexer._symboldef _symbol(self) -> Token
Internal helper in Lexer for symbol.
Defined at line 161.
pl1compinpy.frontend.parserSource: pl1compinpy/frontend/parser.py
Module containing parser support for the PL/I compiler.
ParserErrorclass ParserError(ValueError)
Exception type raised for parser errors.
Defined at line 28.
Parserclass Parser
Class implementing parser behavior in the PL/I compiler.
Defined at line 32.
Methods:
Parser.__init__def __init__(self, tokens: list[Token]) -> None
Initializes an instance of Parser.
Defined at line 33.
Parser.parsedef parse(self) -> Program
Parses lexer tokens into the compiler's AST representation.
Defined at line 37.
Parser._statementdef _statement(self) -> Statement
Internal helper in Parser for statement.
Defined at line 45.
Parser._declarationdef _declaration(self) -> Declaration
Internal helper in Parser for declaration.
Defined at line 82.
Parser._dimensions_from_tokensdef _dimensions_from_tokens(self, tokens: list[Token], index: int) -> tuple[list[int], int]
Internal helper in Parser for dimensions from tokens.
Defined at line 144.
Parser._file_options_from_tokensdef _file_options_from_tokens(self, tokens: list[Token]) -> dict[str, str]
Internal helper in Parser for file options from tokens.
Defined at line 152.
Parser._generic_options_from_tokensdef _generic_options_from_tokens(self, names: list[str], tokens: list[Token]) -> dict[str, list[GenericAlternative]]
Internal helper in Parser for generic options from tokens.
Defined at line 171.
Parser._picture_options_from_tokensdef _picture_options_from_tokens(self, names: list[str], tokens: list[Token]) -> dict[str, str]
Internal helper in Parser for picture options from tokens.
Defined at line 190.
Parser._picture_pattern_from_tokensdef _picture_pattern_from_tokens(self, tokens: list[Token], index: int) -> tuple[str, int]
Internal helper in Parser for picture pattern from tokens.
Defined at line 202.
Parser._based_options_from_tokensdef _based_options_from_tokens(self, names: list[str], tokens: list[Token]) -> dict[str, str | None]
Internal helper in Parser for based options from tokens.
Defined at line 232.
Parser._pointer_names_from_tokensdef _pointer_names_from_tokens(self, names: list[str], tokens: list[Token]) -> list[str]
Internal helper in Parser for pointer names from tokens.
Defined at line 245.
Parser._proceduredef _procedure(self, name: str | None) -> Procedure
Internal helper in Parser for procedure.
Defined at line 252.
Parser._collect_until_balanced_rparendef _collect_until_balanced_rparen(self) -> list[Token]
Internal helper in Parser for collect until balanced rparen.
Defined at line 286.
Parser._do_groupdef _do_group(self) -> DoGroup
Internal helper in Parser for do group.
Defined at line 303.
Parser._do_control_conditiondef _do_control_condition(self, tokens: list[Token], keyword: str) -> Expression | None
Internal helper in Parser for do control condition.
Defined at line 323.
Parser._if_statementdef _if_statement(self) -> IfStatement
Internal helper in Parser for if statement.
Defined at line 332.
Parser._call_statementdef _call_statement(self) -> Call
Internal helper in Parser for call statement.
Defined at line 339.
Parser._io_statementdef _io_statement(self) -> IOStatement
Internal helper in Parser for io statement.
Defined at line 358.
Parser._select_statementdef _select_statement(self) -> SelectStatement
Internal helper in Parser for select statement.
Defined at line 368.
Parser._assignmentdef _assignment(self) -> Assignment
Internal helper in Parser for assignment.
Defined at line 395.
Parser._raw_statementdef _raw_statement(self) -> RawStatement
Internal helper in Parser for raw statement.
Defined at line 400.
Parser._expressiondef _expression(self) -> Expression
Internal helper in Parser for expression.
Defined at line 405.
Parser._logical_ordef _logical_or(self) -> Expression
Internal helper in Parser for logical or.
Defined at line 408.
Parser._logical_anddef _logical_and(self) -> Expression
Internal helper in Parser for logical and.
Defined at line 416.
Parser._comparisondef _comparison(self) -> Expression
Internal helper in Parser for comparison.
Defined at line 424.
Parser._concatenationdef _concatenation(self) -> Expression
Internal helper in Parser for concatenation.
Defined at line 432.
Parser._termdef _term(self) -> Expression
Internal helper in Parser for term.
Defined at line 440.
Parser._factordef _factor(self) -> Expression
Internal helper in Parser for factor.
Defined at line 448.
Parser._unarydef _unary(self) -> Expression
Internal helper in Parser for unary.
Defined at line 456.
Parser._powerdef _power(self) -> Expression
Internal helper in Parser for power.
Defined at line 464.
Parser._primarydef _primary(self) -> Expression
Internal helper in Parser for primary.
Defined at line 472.
Parser._expression_from_tokensdef _expression_from_tokens(self, tokens: list[Token]) -> Expression
Internal helper in Parser for expression from tokens.
Defined at line 485.
Parser._expressions_until_rparendef _expressions_until_rparen(self) -> list[Expression]
Internal helper in Parser for expressions until rparen.
Defined at line 489.
Parser._option_valuedef _option_value(self, tokens: list[Token], keyword: str) -> str | None
Internal helper in Parser for option value.
Defined at line 500.
Parser._option_tokensdef _option_tokens(self, tokens: list[Token], keyword: str) -> list[Token]
Internal helper in Parser for option tokens.
Defined at line 506.
Parser._io_options_from_tokensdef _io_options_from_tokens(self, tokens: list[Token]) -> dict[str, Expression]
Internal helper in Parser for io options from tokens.
Defined at line 531.
Parser._identifier_list_untildef _identifier_list_until(self, end: TokenType) -> list[str]
Internal helper in Parser for identifier list until.
Defined at line 539.
Parser._type_textdef _type_text(self, tokens: list[Token]) -> str
Internal helper in Parser for type text.
Defined at line 549.
Parser._collect_until_semicolondef _collect_until_semicolon(self) -> list[Token]
Internal helper in Parser for collect until semicolon.
Defined at line 552.
Parser._collect_until_keyworddef _collect_until_keyword(self, *keywords: str) -> list[Token]
Internal helper in Parser for collect until keyword.
Defined at line 566.
Parser._looks_like_labeldef _looks_like_label(self) -> bool
Internal helper in Parser for looks like label.
Defined at line 580.
Parser._starts_raw_statementdef _starts_raw_statement(self) -> bool
Internal helper in Parser for starts raw statement.
Defined at line 583.
Parser._matchdef _match(self, *types: TokenType) -> bool
Internal helper in Parser for match.
Defined at line 609.
Parser._match_semicolondef _match_semicolon(self) -> bool
Internal helper in Parser for match semicolon.
Defined at line 615.
Parser._match_keyworddef _match_keyword(self, *keywords: str) -> bool
Internal helper in Parser for match keyword.
Defined at line 618.
Parser._previous_keyworddef _previous_keyword(self, keyword: str) -> bool
Internal helper in Parser for previous keyword.
Defined at line 624.
Parser._checkdef _check(self, token_type: TokenType) -> bool
Internal helper in Parser for check.
Defined at line 627.
Parser._check_nextdef _check_next(self, token_type: TokenType) -> bool
Internal helper in Parser for check next.
Defined at line 630.
Parser._check_keyworddef _check_keyword(self, *keywords: str) -> bool
Internal helper in Parser for check keyword.
Defined at line 635.
Parser._check_next_keyworddef _check_next_keyword(self, *keywords: str) -> bool
Internal helper in Parser for check next keyword.
Defined at line 639.
Parser._consumedef _consume(self, token_type: TokenType, message: str) -> Token
Internal helper in Parser for consume.
Defined at line 645.
Parser._consume_identifierdef _consume_identifier(self, message: str) -> Token
Internal helper in Parser for consume identifier.
Defined at line 650.
Parser._advancedef _advance(self) -> Token
Internal helper in Parser for advance.
Defined at line 655.
Parser._peekdef _peek(self) -> Token
Internal helper in Parser for peek.
Defined at line 660.
Parser._previousdef _previous(self) -> Token
Internal helper in Parser for previous.
Defined at line 663.
Parser._errordef _error(self, token: Token, message: str) -> ParserError
Internal helper in Parser for error.
Defined at line 666.
pl1compinpy.runtimeSource: pl1compinpy/runtime/__init__.py
Runtime normalization and calling-convention support.
pl1compinpy.runtime.arraysSource: pl1compinpy/runtime/arrays.py
Module containing arrays support for the PL/I compiler.
ArrayRuntimeErrorclass ArrayRuntimeError(ValueError)
Exception type raised for array runtime errors.
Defined at line 10.
ArrayValueclass ArrayValue
Data container describing array value values used by the compiler.
Defined at line 15.
Methods:
ArrayValue.__post_init__def __post_init__(self) -> None
Internal helper in ArrayValue for post init.
Defined at line 22.
ArrayValue.element_countdef element_count(self) -> int
Performs element count behavior in ArrayValue.
Defined at line 28.
ArrayValue.indexdef index(self, *subscripts: int) -> int
Performs index behavior in ArrayValue.
Defined at line 31.
ArrayValue.getdef get(self, *subscripts: int) -> int
Performs get behavior in ArrayValue.
Defined at line 43.
ArrayValue.setdef set(self, value: int, *subscripts: int) -> None
Performs set behavior in ArrayValue.
Defined at line 46.
ArrayRuntimeclass ArrayRuntime
Class implementing array runtime behavior in the PL/I compiler.
Defined at line 50.
Methods:
ArrayRuntime.__init__def __init__(self, heap: HeapRuntime | None = None) -> None
Initializes an instance of ArrayRuntime.
Defined at line 51.
ArrayRuntime.allocate_arraydef allocate_array(self, name: str, dimensions: list[int], element_size: int = 4) -> ArrayValue
Performs allocate array behavior in ArrayRuntime.
Defined at line 55.
ArrayRuntime.free_arraydef free_array(self, name: str) -> None
Performs free array behavior in ArrayRuntime.
Defined at line 64.
pl1compinpy.runtime.basedSource: pl1compinpy/runtime/based.py
Module containing based support for the PL/I compiler.
BasedRuntimeErrorclass BasedRuntimeError(ValueError)
Exception type raised for based runtime errors.
Defined at line 8.
PointerValueclass PointerValue
Data container describing pointer value values used by the compiler.
Defined at line 13.
Methods:
PointerValue.is_nulldef is_null(self) -> bool
Performs is null behavior in PointerValue.
Defined at line 18.
BasedRecordclass BasedRecord
Data container describing based record values used by the compiler.
Defined at line 23.
BasedRuntimeclass BasedRuntime
Class implementing based runtime behavior in the PL/I compiler.
Defined at line 29.
Methods:
BasedRuntime.__init__def __init__(self, heap: HeapRuntime | None = None) -> None
Initializes an instance of BasedRuntime.
Defined at line 30.
BasedRuntime.declare_pointerdef declare_pointer(self, name: str) -> PointerValue
Performs declare pointer behavior in BasedRuntime.
Defined at line 35.
BasedRuntime.declare_based_recorddef declare_based_record(self, name: str, size: int, pointer_name: str | None = None) -> BasedRecord
Performs declare based record behavior in BasedRuntime.
Defined at line 39.
BasedRuntime.allocate_baseddef allocate_based(self, record_name: str, pointer_name: str | None = None) -> PointerValue
Performs allocate based behavior in BasedRuntime.
Defined at line 48.
BasedRuntime.set_pointerdef set_pointer(self, pointer_name: str, handle: int, offset: int = 0) -> PointerValue
Performs set pointer behavior in BasedRuntime.
Defined at line 59.
BasedRuntime.set_pointer_to_recorddef set_pointer_to_record(self, pointer_name: str, record_name: str, source_pointer: str | None = None) -> PointerValue
Performs set pointer to record behavior in BasedRuntime.
Defined at line 71.
BasedRuntime.pointer_for_recorddef pointer_for_record(self, record_name: str, pointer_name: str | None = None) -> PointerValue
Performs pointer for record behavior in BasedRuntime.
Defined at line 77.
BasedRuntime.storage_fordef storage_for(self, record_name: str, pointer_name: str | None = None) -> memoryview
Performs storage for behavior in BasedRuntime.
Defined at line 87.
BasedRuntime.write_recorddef write_record(self, record_name: str, data: bytes, pointer_name: str | None = None) -> None
Performs write record behavior in BasedRuntime.
Defined at line 96.
BasedRuntime.read_recorddef read_record(self, record_name: str, pointer_name: str | None = None) -> bytes
Performs read record behavior in BasedRuntime.
Defined at line 104.
BasedRuntime._recorddef _record(self, name: str) -> BasedRecord
Internal helper in BasedRuntime for record.
Defined at line 107.
pl1compinpy.runtime.calculationSource: pl1compinpy/runtime/calculation.py
Module containing calculation support for the PL/I compiler.
CalculationErrorclass CalculationError(ValueError)
Exception type raised for calculation errors.
Defined at line 10.
PL1Typeclass PL1Type(str, Enum)
Class implementing pl1 type behavior in the PL/I compiler.
Defined at line 14.
PL1Valueclass PL1Value
Data container describing pl1 value values used by the compiler.
Defined at line 23.
Methods:
PL1Value.truthydef truthy(self) -> bool
Performs truthy behavior in PL1Value.
Defined at line 28.
NumericTowerclass NumericTower
Class implementing numeric tower behavior in the PL/I compiler.
Defined at line 36.
Methods:
NumericTower.valuedef value(self, raw: object, type_name: PL1Type | str | None = None) -> PL1Value
Performs value behavior in NumericTower.
Defined at line 44.
NumericTower.castdef cast(self, value: PL1Value, target: PL1Type | str) -> PL1Value
Performs cast behavior in NumericTower.
Defined at line 51.
NumericTower.promotedef promote(self, left: PL1Value, right: PL1Value) -> tuple[PL1Value, PL1Value, PL1Type]
Performs promote behavior in NumericTower.
Defined at line 75.
NumericTower._inferdef _infer(self, raw: object) -> PL1Type
Internal helper in NumericTower for infer.
Defined at line 83.
CalculationEngineclass CalculationEngine
Class implementing calculation engine behavior in the PL/I compiler.
Defined at line 97.
Methods:
CalculationEngine.__init__def __init__(self, variables: dict[str, PL1Value | object] | None = None) -> None
Initializes an instance of CalculationEngine.
Defined at line 98.
CalculationEngine.evaluatedef evaluate(self, expression: Expression) -> PL1Value
Performs evaluate behavior in CalculationEngine.
Defined at line 102.
CalculationEngine.castdef cast(self, value: PL1Value | object, target: PL1Type | str) -> PL1Value
Performs cast behavior in CalculationEngine.
Defined at line 117.
CalculationEngine._numberdef _number(self, text: str) -> PL1Value
Internal helper in CalculationEngine for number.
Defined at line 120.
CalculationEngine._unarydef _unary(self, expression: UnaryExpression) -> PL1Value
Internal helper in CalculationEngine for unary.
Defined at line 125.
CalculationEngine._binarydef _binary(self, expression: BinaryExpression) -> PL1Value
Internal helper in CalculationEngine for binary.
Defined at line 138.
CalculationEngine._comparedef _compare(self, left: PL1Value, right: PL1Value, op: str) -> bool
Internal helper in CalculationEngine for compare.
Defined at line 166.
pl1compinpy.runtime.callingSource: pl1compinpy/runtime/calling.py
Module containing calling support for the PL/I compiler.
RuntimeErrorclass RuntimeError(ValueError)
Exception type raised for runtime errors.
Defined at line 16.
normalize_callsdef normalize_calls(program: Program) -> Program
Performs normalize calls behavior in pl1compinpy.runtime.calling.
Defined at line 20.
_procedure_tabledef _procedure_table(statements: list[Statement]) -> dict[str, Procedure]
Internal helper in pl1compinpy.runtime.calling for procedure table.
Defined at line 27.
_normalize_statementdef _normalize_statement(statement: Statement, procedures: dict[str, Procedure], table: FunctionTable) -> Statement
Internal helper in pl1compinpy.runtime.calling for normalize statement.
Defined at line 38.
_normalize_calldef _normalize_call(call: Call, procedures: dict[str, Procedure], table: FunctionTable) -> Call
Internal helper in pl1compinpy.runtime.calling for normalize call.
Defined at line 65.
_descriptor_parameter_namesdef _descriptor_parameter_names(descriptor: FunctionDescriptor) -> list[str]
Internal helper in pl1compinpy.runtime.calling for descriptor parameter names.
Defined at line 85.
pl1compinpy.runtime.function_tableSource: pl1compinpy/runtime/function_table.py
Module containing function table support for the PL/I compiler.
FunctionTableErrorclass FunctionTableError(ValueError)
Exception type raised for function table errors.
Defined at line 9.
ParameterDescriptorclass ParameterDescriptor
Data container describing parameter descriptor values used by the compiler.
Defined at line 14.
FunctionDescriptorclass FunctionDescriptor
Data container describing function descriptor values used by the compiler.
Defined at line 22.
Methods:
FunctionDescriptor.normalized_namedef normalized_name(self) -> str
Performs normalized name behavior in FunctionDescriptor.
Defined at line 33.
FunctionTableclass FunctionTable
Data container describing function table values used by the compiler.
Defined at line 38.
Methods:
FunctionTable.add_functiondef add_function(self, descriptor: FunctionDescriptor) -> FunctionDescriptor
Performs add function behavior in FunctionTable.
Defined at line 42.
FunctionTable.add_runtimedef add_runtime(self, name: str, pointer: Callable[..., Any] | str, parameters: list[ParameterDescriptor] | None = None, returns: str | None = None, *, default_mode: str = 'reference', variadic: bool = False) -> FunctionDescriptor
Performs add runtime behavior in FunctionTable.
Defined at line 46.
FunctionTable.add_builtindef add_builtin(self, name: str, pointer: Callable[..., Any] | str, parameters: list[ParameterDescriptor] | None = None, returns: str | None = None, *, default_mode: str = 'reference', variadic: bool = False) -> FunctionDescriptor
Performs add builtin behavior in FunctionTable.
Defined at line 68.
FunctionTable.add_proceduredef add_procedure(self, name: str, procedure: Procedure) -> FunctionDescriptor
Performs add procedure behavior in FunctionTable.
Defined at line 91.
FunctionTable.mergedef merge(self, other: 'FunctionTable') -> 'FunctionTable'
Performs merge behavior in FunctionTable.
Defined at line 104.
FunctionTable.declare_builtindef declare_builtin(self, name: str) -> None
Performs declare builtin behavior in FunctionTable.
Defined at line 110.
FunctionTable.getdef get(self, name: str) -> FunctionDescriptor
Performs get behavior in FunctionTable.
Defined at line 113.
FunctionTable.validate_calldef validate_call(self, call: Call) -> FunctionDescriptor
Performs validate call behavior in FunctionTable.
Defined at line 119.
FunctionTable.calldef call(self, name: str, *arguments: Any, mode: str = 'reference', **keyword_arguments: Any) -> Any
Performs call behavior in FunctionTable.
Defined at line 134.
FunctionTable._validate_by_namedef _validate_by_name(self, call: Call, descriptor: FunctionDescriptor) -> None
Internal helper in FunctionTable for validate by name.
Defined at line 144.
build_dynamic_function_tabledef build_dynamic_function_table(program: Program) -> FunctionTable
Performs build dynamic function table behavior in pl1compinpy.runtime.function_table.
Defined at line 151.
declare_program_builtinsdef declare_program_builtins(program: Program, table: FunctionTable) -> FunctionTable
Performs declare program builtins behavior in pl1compinpy.runtime.function_table.
Defined at line 158.
declared_builtinsdef declared_builtins(program: Program) -> set[str]
Performs declared builtins behavior in pl1compinpy.runtime.function_table.
Defined at line 164.
_declare_statement_builtinsdef _declare_statement_builtins(statement: Statement | None, table: FunctionTable) -> None
Internal helper in pl1compinpy.runtime.function_table for declare statement builtins.
Defined at line 170.
_add_statement_functiondef _add_statement_function(table: FunctionTable, statement: Statement) -> None
Internal helper in pl1compinpy.runtime.function_table for add statement function.
Defined at line 199.
validate_program_callsdef validate_program_calls(program: Program, table: FunctionTable) -> None
Performs validate program calls behavior in pl1compinpy.runtime.function_table.
Defined at line 207.
_validate_statement_callsdef _validate_statement_calls(statement: Statement | None, table: FunctionTable) -> None
Internal helper in pl1compinpy.runtime.function_table for validate statement calls.
Defined at line 212.
runtime_function_tabledef runtime_function_table() -> FunctionTable
Performs runtime function table behavior in pl1compinpy.runtime.function_table.
Defined at line 236.
pl1compinpy.runtime.genericsSource: pl1compinpy/runtime/generics.py
Module containing generics support for the PL/I compiler.
GenericRuntimeErrorclass GenericRuntimeError(ValueError)
Exception type raised for generic runtime errors.
Defined at line 7.
GenericFunctionclass GenericFunction
Data container describing generic function values used by the compiler.
Defined at line 24.
Methods:
GenericFunction.whendef when(self, parameter_types: list[str], implementation: Callable[..., object]) -> 'GenericFunction'
Performs when behavior in GenericFunction.
Defined at line 28.
GenericFunction.__call__def __call__(self, *arguments: object) -> object
Internal helper in GenericFunction for call.
Defined at line 32.
GenericRuntimeclass GenericRuntime
Class implementing generic runtime behavior in the PL/I compiler.
Defined at line 41.
Methods:
GenericRuntime.__init__def __init__(self) -> None
Initializes an instance of GenericRuntime.
Defined at line 42.
GenericRuntime.definedef define(self, name: str) -> GenericFunction
Performs define behavior in GenericRuntime.
Defined at line 45.
GenericRuntime.calldef call(self, name: str, *arguments: object) -> object
Performs call behavior in GenericRuntime.
Defined at line 49.
pl1_typedef pl1_type(value: object) -> str
Performs pl1 type behavior in pl1compinpy.runtime.generics.
Defined at line 11.
pl1compinpy.runtime.heapSource: pl1compinpy/runtime/heap.py
Module containing heap support for the PL/I compiler.
HeapRuntimeErrorclass HeapRuntimeError(ValueError)
Exception type raised for heap runtime errors.
Defined at line 6.
HeapBlockclass HeapBlock
Data container describing heap block values used by the compiler.
Defined at line 11.
Methods:
HeapBlock.sizedef size(self) -> int
Performs size behavior in HeapBlock.
Defined at line 16.
HeapRuntimeclass HeapRuntime
Class implementing heap runtime behavior in the PL/I compiler.
Defined at line 20.
Methods:
HeapRuntime.__init__def __init__(self) -> None
Initializes an instance of HeapRuntime.
Defined at line 21.
HeapRuntime.allocatedef allocate(self, size: int) -> int
Performs allocate behavior in HeapRuntime.
Defined at line 25.
HeapRuntime.freedef free(self, handle: int) -> None
Performs free behavior in HeapRuntime.
Defined at line 33.
HeapRuntime.blockdef block(self, handle: int) -> HeapBlock
Performs block behavior in HeapRuntime.
Defined at line 38.
pl1compinpy.runtime.ioSource: pl1compinpy/runtime/io.py
Module containing io support for the PL/I compiler.
FileRuntimeErrorclass FileRuntimeError(ValueError)
Exception type raised for file runtime errors.
Defined at line 10.
FileDescriptorclass FileDescriptor
Data container describing file descriptor values used by the compiler.
Defined at line 15.
Methods:
FileDescriptor.from_declarationdef from_declaration(cls, declaration: Declaration, base_path: Path | None = None) -> 'FileDescriptor'
Performs from declaration behavior in FileDescriptor.
Defined at line 25.
StdioRuntimeclass StdioRuntime
Class implementing stdio runtime behavior in the PL/I compiler.
Defined at line 46.
Methods:
StdioRuntime.__init__def __init__(self) -> None
Initializes an instance of StdioRuntime.
Defined at line 47.
StdioRuntime.opendef open(self, descriptor: FileDescriptor) -> None
Performs open behavior in StdioRuntime.
Defined at line 50.
StdioRuntime.closedef close(self, descriptor: FileDescriptor) -> None
Performs close behavior in StdioRuntime.
Defined at line 54.
StdioRuntime.write_recorddef write_record(self, descriptor: FileDescriptor, data: bytes | str) -> None
Performs write record behavior in StdioRuntime.
Defined at line 59.
StdioRuntime.read_recorddef read_record(self, descriptor: FileDescriptor) -> bytes | str
Performs read record behavior in StdioRuntime.
Defined at line 81.
StdioRuntime.executedef execute(self, statement: IOStatement, descriptors: dict[str, FileDescriptor], variables: dict[str, object] | None = None) -> None
Performs execute behavior in StdioRuntime.
Defined at line 100.
StdioRuntime._io_valuedef _io_value(self, statement: IOStatement, variables: dict[str, object]) -> bytes | str
Internal helper in StdioRuntime for io value.
Defined at line 118.
StdioRuntime._handledef _handle(self, descriptor: FileDescriptor) -> BinaryIO
Internal helper in StdioRuntime for handle.
Defined at line 129.
pl1compinpy.runtime.pictureSource: pl1compinpy/runtime/picture.py
Module containing picture support for the PL/I compiler.
PictureRuntimeErrorclass PictureRuntimeError(ValueError)
Exception type raised for picture runtime errors.
Defined at line 7.
PictureSpecclass PictureSpec
Data container describing picture spec values used by the compiler.
Defined at line 12.
Methods:
PictureSpec.scaledef scale(self) -> int
Performs scale behavior in PictureSpec.
Defined at line 16.
PictureSpec.integer_digitsdef integer_digits(self) -> int
Performs integer digits behavior in PictureSpec.
Defined at line 25.
PictureSpec.storage_widthdef storage_width(self) -> int
Performs storage width behavior in PictureSpec.
Defined at line 31.
PictureSpec.formatdef format(self, value: int | float | Decimal | str) -> str
Performs format behavior in PictureSpec.
Defined at line 34.
PictureSpec.parsedef parse(self, text: str) -> Decimal
Parses lexer tokens into the compiler's AST representation.
Defined at line 67.
PictureSpec._first_required_integer_indexdef _first_required_integer_index(self) -> int
Internal helper in PictureSpec for first required integer index.
Defined at line 79.
PictureSpec._digit_countdef _digit_count(self, text: str) -> int
Internal helper in PictureSpec for digit count.
Defined at line 87.
PictureRuntimeclass PictureRuntime
Class implementing picture runtime behavior in the PL/I compiler.
Defined at line 91.
Methods:
PictureRuntime.compiledef compile(self, pattern: str) -> PictureSpec
Performs compile behavior in PictureRuntime.
Defined at line 92.
PictureRuntime.fixed_to_picturedef fixed_to_picture(self, value: int | Decimal, pattern: str) -> str
Performs fixed to picture behavior in PictureRuntime.
Defined at line 99.
PictureRuntime.float_to_picturedef float_to_picture(self, value: float, pattern: str) -> str
Performs float to picture behavior in PictureRuntime.
Defined at line 102.
PictureRuntime.picture_to_fixeddef picture_to_fixed(self, text: str, pattern: str) -> Decimal
Performs picture to fixed behavior in PictureRuntime.
Defined at line 105.
PictureRuntime.picture_to_floatdef picture_to_float(self, text: str, pattern: str) -> float
Performs picture to float behavior in PictureRuntime.
Defined at line 108.
pl1compinpy.runtime.socket_ioSource: pl1compinpy/runtime/socket_io.py
Module containing socket io support for the PL/I compiler.
SocketRuntimeErrorclass SocketRuntimeError(ValueError)
Exception type raised for socket runtime errors.
Defined at line 11.
SocketSecureModeclass SocketSecureMode(str, Enum)
Class implementing socket secure mode behavior in the PL/I compiler.
Defined at line 15.
SocketDescriptorclass SocketDescriptor
Data container describing socket descriptor values used by the compiler.
Defined at line 22.
Methods:
SocketDescriptor.tcp_clientdef tcp_client(cls, name: str, host: str, port: int, timeout: float | None = None) -> 'SocketDescriptor'
Performs tcp client behavior in SocketDescriptor.
Defined at line 36.
SocketDescriptor.tcp_serverdef tcp_server(cls, name: str, host: str = '127.0.0.1', port: int = 0, timeout: float | None = None) -> 'SocketDescriptor'
Performs tcp server behavior in SocketDescriptor.
Defined at line 40.
SocketDescriptor.ssl_clientdef ssl_client(cls, name: str, host: str, port: int, timeout: float | None = None, verify: bool = True) -> 'SocketDescriptor'
Performs ssl client behavior in SocketDescriptor.
Defined at line 44.
SocketDescriptor.tls_clientdef tls_client(cls, name: str, host: str, port: int, timeout: float | None = None, verify: bool = True) -> 'SocketDescriptor'
Performs tls client behavior in SocketDescriptor.
Defined at line 48.
SocketHandleclass SocketHandle
Data container describing socket handle values used by the compiler.
Defined at line 53.
Methods:
SocketHandle.addressdef address(self) -> tuple[str, int]
Performs address behavior in SocketHandle.
Defined at line 59.
SocketFileDescriptorclass SocketFileDescriptor
Data container describing socket file descriptor values used by the compiler.
Defined at line 65.
Methods:
SocketFileDescriptor.from_endpointdef from_endpoint(cls, endpoint: SocketDescriptor, *, recfm: str = 'UNIX', lrecl: int | None = None, text: bool = False) -> 'SocketFileDescriptor'
Performs from endpoint behavior in SocketFileDescriptor.
Defined at line 73.
SocketRuntimeclass SocketRuntime
Class implementing socket runtime behavior in the PL/I compiler.
Defined at line 84.
Methods:
SocketRuntime.__init__def __init__(self) -> None
Initializes an instance of SocketRuntime.
Defined at line 85.
SocketRuntime.opendef open(self, descriptor: SocketDescriptor) -> SocketHandle
Performs open behavior in SocketRuntime.
Defined at line 88.
SocketRuntime.listendef listen(self, descriptor: SocketDescriptor, backlog: int = 1) -> SocketHandle
Performs listen behavior in SocketRuntime.
Defined at line 93.
SocketRuntime.connectdef connect(self, descriptor: SocketDescriptor) -> SocketHandle
Performs connect behavior in SocketRuntime.
Defined at line 108.
SocketRuntime.acceptdef accept(self, listener_name: str, client_name: str) -> SocketHandle
Performs accept behavior in SocketRuntime.
Defined at line 117.
SocketRuntime.senddef send(self, name: str, data: bytes | str) -> None
Performs send behavior in SocketRuntime.
Defined at line 139.
SocketRuntime.receivedef receive(self, name: str, size: int = 4096) -> bytes
Performs receive behavior in SocketRuntime.
Defined at line 143.
SocketRuntime.closedef close(self, name: str) -> None
Performs close behavior in SocketRuntime.
Defined at line 146.
SocketRuntime.adoptdef adopt(self, name: str, stream: socket.socket | ssl.SSLSocket, secure: SocketSecureMode | str = SocketSecureMode.NONE) -> SocketHandle
Performs adopt behavior in SocketRuntime.
Defined at line 151.
SocketRuntime.close_alldef close_all(self) -> None
Performs close all behavior in SocketRuntime.
Defined at line 157.
SocketRuntime._handledef _handle(self, name: str) -> SocketHandle
Internal helper in SocketRuntime for handle.
Defined at line 161.
SocketRuntime._secure_modedef _secure_mode(self, descriptor: SocketDescriptor) -> SocketSecureMode
Internal helper in SocketRuntime for secure mode.
Defined at line 167.
SocketRuntime._client_contextdef _client_context(self, descriptor: SocketDescriptor) -> ssl.SSLContext
Internal helper in SocketRuntime for client context.
Defined at line 170.
SocketRuntime._server_contextdef _server_context(self, descriptor: SocketDescriptor) -> ssl.SSLContext
Internal helper in SocketRuntime for server context.
Defined at line 179.
SocketStreamRuntimeclass SocketStreamRuntime
Class implementing socket stream runtime behavior in the PL/I compiler.
Defined at line 187.
Methods:
SocketStreamRuntime.__init__def __init__(self, primitive: SocketRuntime | None = None) -> None
Initializes an instance of SocketStreamRuntime.
Defined at line 188.
SocketStreamRuntime.opendef open(self, descriptor: SocketFileDescriptor) -> SocketHandle
Performs open behavior in SocketStreamRuntime.
Defined at line 191.
SocketStreamRuntime.closedef close(self, descriptor: SocketFileDescriptor) -> None
Performs close behavior in SocketStreamRuntime.
Defined at line 196.
SocketStreamRuntime.adoptdef adopt(self, name: str, stream: socket.socket | ssl.SSLSocket, secure: SocketSecureMode | str = SocketSecureMode.NONE) -> SocketHandle
Performs adopt behavior in SocketStreamRuntime.
Defined at line 199.
SocketStreamRuntime.write_payloaddef write_payload(self, descriptor: SocketFileDescriptor, data: bytes | str) -> None
Performs write payload behavior in SocketStreamRuntime.
Defined at line 202.
SocketStreamRuntime.read_payloaddef read_payload(self, descriptor: SocketFileDescriptor, size: int | None = None) -> bytes | str
Performs read payload behavior in SocketStreamRuntime.
Defined at line 205.
SocketStreamRuntime.write_recorddef write_record(self, descriptor: SocketFileDescriptor, data: bytes | str) -> None
Performs write record behavior in SocketStreamRuntime.
Defined at line 208.
SocketStreamRuntime.read_recorddef read_record(self, descriptor: SocketFileDescriptor, size: int | None = None) -> bytes | str
Performs read record behavior in SocketStreamRuntime.
Defined at line 225.
SocketStreamRuntime.executedef execute(self, statement: IOStatement, descriptors: dict[str, SocketFileDescriptor], variables: dict[str, object] | None = None) -> None
Performs execute behavior in SocketStreamRuntime.
Defined at line 243.
SocketStreamRuntime.close_alldef close_all(self) -> None
Performs close all behavior in SocketStreamRuntime.
Defined at line 261.
SocketStreamRuntime._read_exactdef _read_exact(self, name: str, size: int) -> bytes
Internal helper in SocketStreamRuntime for read exact.
Defined at line 264.
SocketStreamRuntime._io_valuedef _io_value(self, statement: IOStatement, variables: dict[str, object]) -> bytes | str
Internal helper in SocketStreamRuntime for io value.
Defined at line 277.
pl1compinpy.runtime.stringsSource: pl1compinpy/runtime/strings.py
Module containing strings support for the PL/I compiler.
StringRuntimeErrorclass StringRuntimeError(ValueError)
Exception type raised for string runtime errors.
Defined at line 8.
StringValueclass StringValue
Data container describing string value values used by the compiler.
Defined at line 13.
Methods:
StringValue.storagedef storage(self) -> bytearray
Performs storage behavior in StringValue.
Defined at line 18.
StringValue.lengthdef length(self) -> int
Performs length behavior in StringValue.
Defined at line 22.
StringValue.payloaddef payload(self) -> bytes
Performs payload behavior in StringValue.
Defined at line 26.
StringValue.textdef text(self, encoding: str = 'utf-8') -> str
Performs text behavior in StringValue.
Defined at line 29.
StringRuntimeclass StringRuntime
Class implementing string runtime behavior in the PL/I compiler.
Defined at line 33.
Methods:
StringRuntime.__init__def __init__(self, heap: HeapRuntime | None = None) -> None
Initializes an instance of StringRuntime.
Defined at line 34.
StringRuntime.allocatedef allocate(self, data: bytes | str, encoding: str = 'utf-8') -> StringValue
Performs allocate behavior in StringRuntime.
Defined at line 37.
StringRuntime.substrdef substr(self, value: StringValue, start: int, count: int | None = None) -> StringValue
Performs substr behavior in StringRuntime.
Defined at line 47.
pl1compinpy.vsamSource: pl1compinpy/vsam/__init__.py
Local VSAM-style catalog and binary data component runtime.
pl1compinpy.vsam.catalogSource: pl1compinpy/vsam/catalog.py
Module containing catalog support for the PL/I compiler.
VSAMErrorclass VSAMError(ValueError)
Exception type raised for compiler errors.
Defined at line 9.
VSAMTypeclass VSAMType(str, Enum)
Class implementing vsamtype behavior in the PL/I compiler.
Defined at line 13.
VSAMDefinitionclass VSAMDefinition
Data container describing vsamdefinition values used by the compiler.
Defined at line 21.
VSAMCatalogclass VSAMCatalog
Class implementing vsamcatalog behavior in the PL/I compiler.
Defined at line 34.
Methods:
VSAMCatalog.__init__def __init__(self, root: Path | str) -> None
Initializes an instance of VSAMCatalog.
Defined at line 35.
VSAMCatalog.definedef define(cls, root: Path | str, name: str, organization: VSAMType | str, *, key_offset: int = 0, key_length: int = 0, record_length: int | None = None) -> 'VSAMCatalog'
Performs define behavior in VSAMCatalog.
Defined at line 43.
VSAMCatalog.writedef write(self, record: bytes, *, key: bytes | str | None = None, rrn: int | None = None, rba: int | None = None) -> int
Performs write behavior in VSAMCatalog.
Defined at line 65.
VSAMCatalog.readdef read(self, *, key: bytes | str | None = None, rrn: int | None = None, rba: int | None = None, length: int | None = None) -> bytes
Performs read behavior in VSAMCatalog.
Defined at line 77.
VSAMCatalog._write_ksdsdef _write_ksds(self, record: bytes, key: bytes | str | None) -> int
Internal helper in VSAMCatalog for write ksds.
Defined at line 99.
VSAMCatalog._write_rrdsdef _write_rrds(self, record: bytes, rrn: int | None) -> int
Internal helper in VSAMCatalog for write rrds.
Defined at line 110.
VSAMCatalog._write_ldsdef _write_lds(self, payload: bytes, rba: int | None) -> int
Internal helper in VSAMCatalog for write lds.
Defined at line 122.
VSAMCatalog._append_recorddef _append_record(self, record: bytes) -> int
Internal helper in VSAMCatalog for append record.
Defined at line 129.
VSAMCatalog._append_rawdef _append_raw(self, payload: bytes) -> int
Internal helper in VSAMCatalog for append raw.
Defined at line 134.
VSAMCatalog._read_record_atdef _read_record_at(self, rba: int) -> bytes
Internal helper in VSAMCatalog for read record at.
Defined at line 140.
VSAMCatalog._read_atdef _read_at(self, rba: int, length: int) -> bytes
Internal helper in VSAMCatalog for read at.
Defined at line 149.
VSAMCatalog._key_textdef _key_text(self, key: bytes | str) -> str
Internal helper in VSAMCatalog for key text.
Defined at line 158.
VSAMCatalog._loaddef _load(self) -> VSAMDefinition | None
Internal helper in VSAMCatalog for load.
Defined at line 161.
VSAMCatalog._savedef _save(self) -> None
Internal helper in VSAMCatalog for save.
Defined at line 167.
pl1compinpy.vsam.ioSource: pl1compinpy/vsam/io.py
Module containing io support for the PL/I compiler.
VSAMFileDescriptorclass VSAMFileDescriptor
Data container describing vsamfile descriptor values used by the compiler.
Defined at line 11.
Methods:
VSAMFileDescriptor.from_declarationdef from_declaration(cls, declaration: Declaration, base_path: Path | None = None) -> 'VSAMFileDescriptor'
Performs from declaration behavior in VSAMFileDescriptor.
Defined at line 21.
VSAMRuntimeclass VSAMRuntime
Class implementing vsamruntime behavior in the PL/I compiler.
Defined at line 43.
Methods:
VSAMRuntime.__init__def __init__(self) -> None
Initializes an instance of VSAMRuntime.
Defined at line 44.
VSAMRuntime.opendef open(self, descriptor: VSAMFileDescriptor) -> None
Performs open behavior in VSAMRuntime.
Defined at line 47.
VSAMRuntime.closedef close(self, descriptor: VSAMFileDescriptor) -> None
Performs close behavior in VSAMRuntime.
Defined at line 62.
VSAMRuntime.write_recorddef write_record(self, descriptor: VSAMFileDescriptor, data: bytes | str, *, key: bytes | str | None = None, rrn: int | None = None, rba: int | None = None) -> int
Performs write record behavior in VSAMRuntime.
Defined at line 65.
VSAMRuntime.read_recorddef read_record(self, descriptor: VSAMFileDescriptor, *, key: bytes | str | None = None, rrn: int | None = None, rba: int | None = None, length: int | None = None) -> bytes
Performs read record behavior in VSAMRuntime.
Defined at line 77.
VSAMRuntime.executedef execute(self, statement: IOStatement, descriptors: dict[str, VSAMFileDescriptor], variables: dict[str, object] | None = None) -> None
Performs execute behavior in VSAMRuntime.
Defined at line 88.
VSAMRuntime._catalogdef _catalog(self, descriptor: VSAMFileDescriptor) -> VSAMCatalog
Internal helper in VSAMRuntime for catalog.
Defined at line 118.
VSAMRuntime._optional_valuedef _optional_value(self, expression: Expression | None, variables: dict[str, object]) -> bytes | str | None
Internal helper in VSAMRuntime for optional value.
Defined at line 124.
VSAMRuntime._optional_keydef _optional_key(self, descriptor: VSAMFileDescriptor, expression: Expression | None, variables: dict[str, object]) -> bytes | str | None
Internal helper in VSAMRuntime for optional key.
Defined at line 130.
VSAMRuntime._optional_intdef _optional_int(self, expression: Expression | None, variables: dict[str, object]) -> int | None
Internal helper in VSAMRuntime for optional int.
Defined at line 136.
VSAMRuntime._valuedef _value(self, expression: Expression | None, variables: dict[str, object]) -> object
Internal helper in VSAMRuntime for value.
Defined at line 142.