Skip to content

DreamBerdStack/MilkScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
NOTE: DreamBerd's 'MilkScript' is not to be confused with Remember the Milk's service with the same name!

milkscript logo

MilkScript

An overall tutorial on how to use it.

BUILDING

Build using the make milkscript if you wish to use the version of the parser written in Go (which may or may not
be done at the time of reading this). If you wish to use the beta parser (the one written in Python, which also has horrid source code),
then run it using the make milkscript_test command.

FOR CONTRIBUTORS

For those who want to upgrade the code within the MilkScript repo (since I am a horrid programmer) it's best I go over the git repo. The following describes each directory:

examples/ - This is a folder where all the example files go in.
parser/ - This is an upcoming version of the parser, written in Go.
res/ - Just resources for stuff like the README file.
test_parser/ - A beta/alpha version of the parser, written in Python.

FOR DEVELOPERS

Just saying, since all text is aligned to the center, the example code looks weird. Sorry!

MilkScript is stack-based, so a majority of data you wish to save will be thrown on there. To push to the stack, use the pour command to pour data onto the stack.
Here's an example:

pour(Hello, world!);

To read from a stack register, use the read command and call them by address:

pour(melkey is coming for you);
read(0);

Also, every program must end with exit() to declare the end of the program:

pour(melkey is coming for you);
read(0);
exit();

To 'sip' from the 'mug', use the sip command to remove the back of the stack, here's an example:

pour(Hi!);
pour(This message will be replaced.);
sip();
pour(This is a replacement!);
read(0);
read(1);
exit();

About

Milkscript

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published