Download presentation
Presentation is loading. Please wait.
Published byRolf Joseph Modified over 9 years ago
1
SB How ScriptBasic works Introduction to ScriptBasic Modules
2
SB Contents Who is this presentation for Why modules, what is a module? What modules run ScriptBasic programs Auxiliary modules Sources for more information
3
SB Who this presentation is for Curious (why things happen?) Want to learn and understand how ScriptBasic works Want to modify ScriptBasic NOT for those, who just want to program in scriba
4
SB What is a module? More or less standalone function collection A typedef collects all global (class) data Thread safe
5
SB What modules are in ScriptBasic Reader Tokenizer Syntax analyzer Builder Execution system Other auxiliary modules
6
SB READER Reads the whole source into memory Creates a linked list of lines Handles include directives reader.c
7
SB TOKENIZER Gets the input from the lines read by reader Results a linked list of tokens Tables define what –a symbol is, –operators, built-in functions, keywords Handles continuation lines lexer.c
8
SB SYNTAX ANALYZER Uses list of tokens Creates complex, fragmented memory structure Tables define –commands syntax –unary and binary operators –built-in functions –expression syntax is as usual, hard coded expression.c
9
SB BUILDER Takes the fragmented, complex memory structure Creates a simplified structure in a continuos memory space. This is the final executable format of a ScriptBasic program. Has function to save and load compiled code. builder.c
10
SB EXECUTION SYSTEM Gets the built code and executes. Allocates memory for variables. Allocates/releases memory for local variables Handles error conditions, etc... execute.c
11
SB AUXILIARY MODULES Memory management module ( myalloc.c ) Variable management module ( memory.c ) External module handling ( modumana.c ) Symbol table handling ( sym.c )
12
SB Sources of information Presentations (ready or planned) on other modules Source documentation in HTML format scriba.doc telling some details well, you have the source code…
13
SB Thank you for listening
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.