An interpreter for 9608 pseudocode
Project description
An interpreter for 9608 pseudocode
Pseudo is an interpreter for 9608 pseudocode, a pseudocode syntax used in Cambridge International AS & A Level Computer Science.
Setup
pip install pseudo-9608
Usage
Shell: Running with a pseudocode file
$ pseudo myfile.pseudo
This will run the pseudocode interpreter on the file myfile.pseudo
.
Python: Running with a pseudocode file
import pseudocode
pseudocode.runFile('myfile.pseudo')
This will run the pseudocode interpreter on the file myfile.pseudo
.
Python: Running with a pseudocode string
import pseudocode
code = """
OUTPUT "Hello World!"
"""
pseudocode.run(code)
This will run the pseudocode interpreter on the string code
.
Chapters
This project is also an attempt to write a programming book in a new style. Each chapter of this book is written as a pull request.
- 01a Scanning
- 01b Tokens
- 02 Expressions
- 03 Evaluation
- 04 Statements
- 05 Interpreting
- 06a Variables
- 06b Assignment
- 06c Retrieving variables
- 07 Resolving
- 08 Static typing
- 09 Conditionals
- 10 Loops
- 11 Input
- 12a Procedures
- 12b Procedure calls
- 12c Passing by reference
- 13a Functions
- 13b Loose ends
- 14a Reading from source
- 14b Line numbers
- 14c Referencing source code
- 14d Column info
- 15 File IO
- 16a OOP: Expressions
- 16b OOP: Statements
- 16c OOP: Expression Statements
- 16d OOP: Variables
- 16e OOP: Values
- 16f OOP: Frames
- 16g OOP: Error reporting
- 16h OOP: Tokens
- 17 Statement hierarchies
- 18a Boolean
- 18b Logical operators
- 18c Fix: logical operators (This is an addendum to 18b)
- 19 REALs
- 20 Packaging
- 21a Test: Data passing
- 21b Test: Checking output
- 21c Test: Checking Errors
- 22a Scoping: Recursion
- 22b Scoping: System
- 23a Object: Scopes
- 23b Object: Attributes
- 23c Object: ARRAY
- 24a Improvements: type annotation
- 24b Improvements: Decoupling
- 24c Improvements: Type Relationship
- 24d Improvements: Parser
- 24e Improvements: Resolver
- 24f Improvements: Interpreter
- 24g Improvements: Pseudo
- 25a Automation: Testing
- 25b Automation: setup
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pseudo-9608-0.3.4.tar.gz
(22.0 kB
view hashes)
Built Distribution
Close
Hashes for pseudo_9608-0.3.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cefc334ce3fb1ee702eeff4ba60391ceae58b5582ab96eb87f3a321b1937d5f |
|
MD5 | fac57524bb5a1f7f8b5295d3f486c7ce |
|
BLAKE2b-256 | 1b31ab01edf99c1e854f69d6a50b691efd1b424ecb9a2d52dd6000d15743ae51 |