• Stars
    star
    150
  • Rank 247,323 (Top 5 %)
  • Language
    Java
  • License
    Other
  • Created over 14 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A complete interpreter for a dialect of BASIC in one Java sourcefile
About
-----

Jasic is an exercise in simplicity and pedagogy. It is a complete standalone
interpreter for a dialect of the original BASIC language that fits inside a
single .java file. It handles tokenizing, parsing, interpreting, output,
variables, expressions, and flow control, like a full-scale compiler or
interpreter, just in miniature. I tried to keep the code simple and readable
while still being terse.

If you've ever wanted a gentle introduction to how programming languages work
under the hood, Jasic is a good place to start.


Getting Started
---------------

You can build Jasic using your big IDE of choice, but the simplest way is just
through the command line. Open a command prompt and navigate to the main Jasic
directory (where this file is), then do:

> javac com/stuffwithstuff/Jasic.java

This compiles the code. To run it, enter:

> java com.stuffwithstuff.Jasic <script>

Where it says <script> fill in the path to some .jas file containing Jasic code.
Here's one:

> java com.stuffwithstuff.Jasic sample/mandel.jas

More Info
---------

The real information about Jasic, including the language syntax and how the
interpreter works is all in with the code, so go ahead and read through
Jasic.java.

If you have any questions, feel free to get in touch. Cheers!

More Repositories

1

craftinginterpreters

Repository for the book "Crafting Interpreters"
HTML
8,949
star
2

game-programming-patterns

Source repo for the book
HTML
4,134
star
3

vigil

Vigil, the eternal morally vigilant programming language
Python
2,900
star
4

hauberk

A web-based roguelike written in Dart.
Dart
2,009
star
5

mark-sweep

A simple mark-sweep garbage collector in C
C
722
star
6

magpie

The Magpie programming language
Python
360
star
7

bantam

A simple demo app for Pratt parsing
Java
312
star
8

finch

The Finch programming language
C++
242
star
9

rooms-and-mazes

Animated demo code for a random dungeon generator
Dart
137
star
10

ui-as-code

Design work on improving Dart's syntax for UI code
Dart
121
star
11

amaranth

An open source roguelike written in C#
C#
120
star
12

journal

My blog, in all its statically-generated glory.
HTML
101
star
13

malison

A little terminal emulation package for Dart.
Dart
74
star
14

lark

The Lark programming language.
Java
59
star
15

piecemeal

Basic data structures your 2D Dart game may need.
Dart
52
star
16

wrenalyzer

Static analyzer for the Wren programming language
44
star
17

lisp2-gc

A simple implementation of the LISP2 mark-compact GC algorithm
C
38
star
18

malison-dotnet

A terminal emulation library in C#
C#
36
star
19

a-turn-based-game-loop

Demo code for http://journal.stuffwithstuff.com/2014/07/15/a-turn-based-game-loop/
Dart
28
star
20

markymark

A tiny static web server for previewing Markdown files
Dart
25
star
21

fov

Demo code for a blog post about field-of-view calculation
Dart
21
star
22

bulfinch

Just a little toy language to learn about register-based VMs.
Java
20
star
23

pattern_matching

A simple ML-like pattern-matching library in C#.
C#
18
star
24

bramble-dotnet

A set of utility classes and extension methods in C#
C#
17
star
25

bits

Tiny web page for converting between binary, decimal, hex and UTF-8
HTML
9
star
26

dep-external-libraries

Proposal for handling platform-specific code in Dart
Dart
8
star
27

temp_primary_constructors

Temporary repo for trying out a proposed Dart language feature
Dart
7
star
28

wren-sublime

A Sublime Package for the Wren programming language
6
star
29

multipleinheritance.js

A little hack to get multiple inheritance working in JavaScript.
JavaScript
6
star
30

settings

My personal settings, configurations, and dotfiles.
Shell
5
star
31

wren-atom

Atom package for Wren
CoffeeScript
4
star
32

linkedlist

Reversing a linked list
Go
4
star
33

magpie-csharp

The old C#-based Magpie programming language
C#
3
star
34

magpie-optionally-typed

The old single-dispatch optionally-typed flavor of the Magpie programming language.
C#
3
star
35

temp-flutter-examples

Temporary repo looking at some Flutter examples
Dart
2
star
36

dep-interface-libraries

DEP for configuration-specific code in Dart
2
star
37

gallery-constructors

Temporary repo to test out some potential changes around constructors in Dart
Dart
1
star
38

format-flutter

Temporary repo to apply an experimental dart format style to Flutter.
Dart
1
star
39

module_scrape

Temporary code for investigating a module system for Dart
Dart
1
star
40

temp_flutter_format

Temporary repo to experiment with some formatting styles in the Flutter repo
Dart
1
star
41

support

My personal repository for support files: things like color schemes, preferences, and other settings files that it's handy to have centrally accessible.
1
star