ScriptBasic Developers Manual
by Peter Verhas
Table of Contents
1. Introduction
1.1. Chapters
2. Interpreter Architecture
2.1. External Preprocessor
2.2. Reader
2.3. Lexer
2.3.1. Functions implemented in this module
2.4. Syntax Analyzer
2.4.1. Name Space
2.4.2. Expression
2.4.3. Functions implemented in this module
2.5. Builder
2.5.1. Node Structure
2.5.2. Binary File Format
2.5.3. Functions implemented in this module
2.6. Executor
2.6.1. Command parameters
2.6.2. Instrunction parameters
2.6.3. Finalizer function
2.6.4. Functions implemented in this module
2.7. Configuration File Handling
2.7.1. Functions implemented in this module
2.8. Memory Allocation
2.8.1. Functions implemented in this module
2.9. Variable Allocation
2.9.1. Functions implemented in this module
2.10. Error Reporting
2.10.1. Functions implemented in this module
2.11. The Logger Module
2.12. Hook Functions
2.13. Handle Pointers in External Modules Support Functions
2.14. Thread Support Functions
2.15. Dynamic Library Handling Support Functions
2.16. Other System Dependant Functions
2.17. Module Management
2.18. Run Time Options Handling
2.19. Simple Pattern Matching
2.20. Symbol Table Handling
3. Embedding the Interpreter
3.1. Object Oriented Model of ScriptBasic
3.2. Sample Embedding
3.2.1. Include Header Files
3.2.2. Function main(), Variable Declarations
3.2.3. Command Line handling
3.2.4. Creating Program Object
3.2.5. Loading Configuration
3.2.6. Loading Internal Preprocessors
3.2.7. Setting the File Name
3.2.8. Using the Cache
3.2.9. Run External Preprocessors
3.2.10. Loading the Source Program
3.2.11. Saving Binary File
3.2.12. Execute the BASIC Program
3.2.13. Destroying the Program Object
3.3. ScriptBasic C API
4. Extension Modules
4.1. How Extension Modules are Used
4.2. A Simple Sample Module
4.3. Compiling a Module
4.4. Installing a Module
4.5. Module Support Functions
5. Preprocessors
5.1. Loading Preprocessor
5.2. Skeleton of a Preprocessor
5.3. Preprocessor Entry Points
5.3.1. PreprocessorLoad
5.3.2. PreprocessorReadStart
5.3.3. PreprocessorReadDone0
5.3.4. PreprocessorReadDone1
5.3.5. PreprocessorReadDone2
5.3.6. PreprocessorReadDone3
5.3.7. PreprocessorLexInit
5.3.8. PreprocessorLexDone
5.3.9. PreprocessorLexNASymbol
5.3.10. PreprocessorLexASymbol
5.3.11. PreprocessorLexSymbol
5.3.12. PreprocessorLexString
5.3.13. PreprocessorLexMString
5.3.14. PreprocessorLexInteger
5.3.15. PreprocessorLexReal
5.3.16. PreprocessorLexCharacter
5.3.17. PreprocessorExStart
5.3.18. PreprocessorExStartLine
5.3.19. PreprocessorExEnd
5.3.20. PreprocessorExFinish
5.3.21. PreprocessorExStartLocal
5.3.22. PreprocessorExEndLocal
5.3.23. PreprocessorExLineNode
5.3.24. PreprocessorExeStart
5.3.25. PreprocessorExeFinish
5.3.26. PreprocessorExeNoRun
6. Compilation
6.1. Compilation under UNIX