How domingues/updigitalscript works
Main Components
A. Source Code Processing Layer
• PL/SQL Grammar Components (from grammar directory)
• Lexer and Parser Components (from lib directory)
• Compiler System (src/Compiler.js)
B. Web Interface Layer
• Editor Component (docs/editor.ups)
• Code Examples (fibonacci.ups, mandelbrot_set.ups)
• Web UI (docs/index.html, css, js)
C. Build and Generation System
• Grammar Generation Scripts
• Bundle Generation (rollup.config.js)
Level 1: Input Layer
[PL/SQL Code Input] --> [ACE Editor Integration]
Level 2: Processing Layer
[PlSqlLexer] --> [PlSqlParser] --> [Compiler]
• v
Level 3: Output Layer
[UPdigitalScript Bundle] --> [JavaScript Runtime]
Component Details
A. Grammar Processing:
• Relationship between PlSqlLexer.g4 and PlSqlParser.g4
• Generation of JavaScript/TypeScript files from grammar
B. Compilation Pipeline:
• Transformation stages from PL/SQL to JavaScript
• How the Compiler.js interfaces with the parser components
C. Web Interface:
• Demonstrate the integration of the ACE editor
• How the compiled code is executed in the browser
Important Technical Elements
• ANTLR4-based grammar system
• TypeScript compilation process
• Bundling process using Rollup
• Browser runtime environment