RemObjects PascalScript

repository·master·Indexed 19 days ago

https://github.com/remobjects/pascalscript

A Pascal-based scripting and compilation engine providing a runtime interpreter, compiler, and standard library for integration into Delphi or other Pascal environments. Includes a specialized port for ARM EABI/EABIHF architectures and UnitParser for parsing Pascal language constructs such as constants, type definitions, and classes. Requires SynEdit for specific demo projects and UnitParser.

Tokens
1.1K
Snippets
2
Records
8
Agent score
68%

What's inside remobjects-pascalscript

  1. Overview of RemObjects Pascal distribution files

    master

    The RemObjects Pascal distribution includes the following key components:

    Core Engine

    • ifps3.pas: The runtime interpreter.
    • ifpscomp.pas: The compiler.
    • ifps3common.pas: Common types and constants used by IFPS3.
    • ifps3lib_std.pas: The standard library.
    • ifps3lib_stdr.pas: The standard library (runtime).
    • ifps3utl.pas: Utility unit.
    • ifps3_def.inc: Include file.

    Integration and DLL Support

    • ifpidll2runtime.pas: Runtime DLL support.
    • ifpidll2.pas: Compiler DLL loading support.
    • ifpicall.pas: Call library used by all runtime calling units.
    • ifpii_*.pas: Import libraries (compiler).
    • ifpiir_*.pas: Import libraries (runtime).
    • IFPS3CompExec.pas: A component wrapper around IFPS3.

    Documentation and Examples

    • help/: Help documents (HTML format) and examples.
    • demo/: Test application.
    • demo_import/: Test application with class library.
    • demo_kylix/: Kylix test application.
  2. Overview of the ARM EABI/EABIHF port of PascalScript

    master
    This project is a specialized port of PascalScript for ARM architectures, specifically targeting the EABI and EABIHF (Hard Float) Application Binary Interfaces. It introduces critical low-level improvements for parameter passing and return value handling to ensure compatibility and performance on ARM hardware.
  3. Supported Pascal Language Constructs in UnitParser

    master

    UnitParser can parse the following elements from source code:

    • Constants: Supports both explicit and implicit typing.
    • Global Variables: Parsed, but no output is currently generated for them.
    • Delphi Routines: Properly encapsulated.
    • Type Definitions:
      • Simple typing (e.g., MyInt = Integer;)
      • Type identity (e.g., MyInt = type Integer;)
      • Enums (e.g., MyEnum = (ab,abc);)
      • Sets
      • Records and nested records
      • Classes
    • Arrays: Supports dynamic arrays (static arrays are not currently implemented).
    • Method Pointers: Supported (note: function pointers are not supported by the underlying ifps3).
    • Overloaded Functions: When an overload directive is discovered, the parser prompts for a new function name and generates wrapper code to map the new name to the original version. You can press Enter to use the same name.
  4. Install RemObjects Pascal via Delphi

    master

    To install RemObjects Pascal, use the provided .dpk file.

    Note for non-Delphi 7 users: The package was originally built with Delphi 7. If you are using a different version of Delphi, the installation may fail due to missing packages. To resolve this:

    1. Open the .dpk file.
    2. Remove any missing packages from the requires list.
    3. Remove any compiler directives that cause errors.

    After installing the package, ensure you add the IFPS3 directory to your project's search paths.

    /* Steps to resolve Delphi version mismatches */
    // 1. Remove missing packages from the 'requires' list in the .dpk
    // 2. Remove incompatible compiler directives
    // 3. Add the IFPS3 directory to your search paths
  5. UnitParser Command Line and Configuration

    master

    UnitParser includes several features for managing the conversion process:

    • Command Line Options: Available for controlling the conversion process.
    • INI Configuration:
      • Uses a conv.ini file (compatible with Carlo Kok's Conv utility).
      • Version 0.5 introduced an INI-project file that stores all settings.
    • Output Management:
      • You can choose to generate a single output file or multiple files.
      • Modified files are saved with the .int extension.
      • By default, output files are generated in the same directory as the source file, but you can force all generated files into a specific folder.
    • Error Reporting: By default, the last 5 tokens are reported when an error occurs. The reported token string is reconstructed and will not contain comments, original formatting, or exact casing.