Toi (programming language): Difference between revisions

Content deleted Content added
Rjgordon (talk | contribs)
Rjgordon (talk | contribs)
No edit summary
Line 1:
{{Dead end|date=October 2016}}
'''Toy''' is an imperative, type-sensitive language that provides the basic functionality of a [[programming language]]. The language was designed and developed from the ground-up by Paul Longtine.<ref>https://github.com/bannana/language/blob/master/doc/OVERVIEW</ref> Written in C, Toy was created with the intent to be an educational experience and serves as a learning tool (or toy, hence the name) for those looking to familiarize themselves with the inner-workings of a programming language.<ref>https://banna.tech/projects/post/toy_language/</ref>
 
== Specification<ref>https://github.com/bannana/language/blob/master/doc/SPECIFICATION</ref> ==
 
=== [[Type (computer science)|Types]] ===
0 VOID - Null, no data
1 ADDR - Address type (bytecode)
Line 22:
15 G_FIFO - Stack
 
=== Runtime[[Runtim]]e ===
 
==== Runtime context definition ====
Line 28:
The runtime context keeps track of an individual threads metadata, such as:
 
* The operating [[Stack (abstract data type)|stack]]
** The operating stack where current running instructions push/pop to.
*** refer to STACK DEFINITION
Line 43:
This context gives definition to an 'environment' where code is executed.
 
==== [[Namespace]] definition ====
 
A key part to any operational computer language is the notion of a 'Namespace'.
Line 87:
by using the
 
==== [[Variable]] definition ====
 
Variables in this definiton provide the following mechanims:
Line 117:
structures.
 
==== [[Function (computer science)|Function]] definition ====
 
Functions in this virtual machine are a pointer to a set of instructions in a
program with metadata about parameters defined.
 
==== [[Object (computer science)|Object]] definition ====
 
In this paradigm, objects are units that encapsulate a separate namespace and
collection of methods.
 
==== [[Bytecode]] spec ====
 
Bytecode is arranged in the following order:
Line 153:
each instruction, and instruction category:
 
=== [[Opcode]] ===
 
Keywords:
Line 211:
4F NAND - and's TBI
----
'''5 - [[Conditional (computer programming)|Conditional Expressions]]'''
 
Things for comparison, < > = ! and so on and so forth.
Line 234:
6F ENDL - End of loop
----
'''7 - Code flow'''
'''
These instructions dictate code flow.
----
Line 294 ⟶ 293:
objects this bytecode set cannot touch. Uses argstack.
 
=== [[Compiler|Compiler/Translator/Assembler]] ===
 
==== [[Lexical analysis]] ====