• Stars
    star
    1
  • Language
    Julia
  • License
    Other
  • Created about 10 years ago
  • Updated over 6 years ago

Reviews

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

Repository Details

A very simple hackable parser and lexer for simple languages

SimpleParser

This parser is intended for parsing small simple languages. It is rather primitive. The main thing it has got going for itself is that the implementation is so simple that if you need to write support for some simple language and don't want to drag in too many dependencies, then this is simple code to hack and tweak.

I am using it as the foundation of two simple parsers. One for parsing ASCII plist files and the other for Go function signatures.

To use the parser, first create lexer for the code you are parsing. Then create a parser from this lexer and start parsing the top level statement or datastructure.

lexer = Lexer(code)
parser = Parser(lexer)
parse_toplevel(parser)

You implement your parse functions using:

  • look_ahead_type(parser) to find the type of the token comming up.
  • match(parser, token_type) verify that look ahead token is what we expect and consume it.

The lexer implements the julia iterator interface so you iterate through each token in a regular for-loop.

Build Status

Coverage Status

codecov.io

More Repositories

1

Zacktron-33

Assembler and disassembler for the imaginary Calcutron-33 CPU implemented in Zig
Zig
19
star
2

calcutron

The made-up Calcutron-33 computer to make it fun and easy to learn and experiment with assembly code
Go
19
star
3

juliatour

A tour of the Julia programming language, inspired by Go
Julia
13
star
4

LusionEngine

Lua 2D Game Engine. Used for making classic 2D games in Lua. Engine itself is written in C++ but has a Lua API for game logic.
C++
10
star
5

QtUIParser.jl

Parser and generator for the .ui XML files used by the Qt GUI toolkit for storing graphical users interfaces
Julia
9
star
6

PLists.jl

Reading and writing standard config files on macOS and NeXT. Just the plain text versions of the plist format.
Julia
9
star
7

LittleManComputer.jl

Implementation of the Little Man Computer for learning Assembly programming in Julia
Julia
8
star
8

RocketBuilder.jl

Gtk based GUI for building rockets for simulating rocket launches.
Julia
6
star
9

code-samples-julia-second-language

Code samples used in Julia for Beginners Book second edition
Julia
5
star
10

Calcutron33.jl

Implementation of a assembler, disassembler and simulator for made up Calcutron-33 decimal CPU.
Julia
5
star
11

Airship.jl

Julia code for performing temperature, pressure and volume and buoyancy calculations.
Julia
4
star
12

Rockets.jl

Collection of functions for doing newtonian physics intended to do basic rocket equations
Julia
3
star
13

rocket

Simple Go library to simulate rocket launches. Mainly intended for educational purposes.
Go
3
star
14

everydaythings

A rewrite of programming examples in the book "Exploring Everyday Things with R and Ruby" into Julia
Julia
3
star
15

ObjCWrap.jl

Call Objective-C code from Julia using friendly syntax. Allow access to Apple frameworks like Cocoa
Julia
3
star
16

go-geom2d

A 2D geometry library for the Go programming language
Go
3
star
17

Quizer

Application for practicing for multiple choice tests
Objective-C
2
star
18

Julia.tmbundle

Personal additions to Julia textmate bundle part of the main repository for the Julia programming language.
AppleScript
2
star
19

handyscripts

Collection of handy scripts that I use
Clojure
2
star
20

PikeLexer

Experimenting with building a lexer in Julia based on the ideas presented by Rob Pike on how the lexer in the Go template engine was implemented.
Julia
1
star
21

AVRprojects

Maker and electronics projects based on AVR microcontroller
Assembly
1
star
22

AVR-Assembler-DSL

An assembler and simulator for the AVR micro-controller created as a Julia DSL.
Julia
1
star
23

BitBlit2D.jl

Experiments in making a 2D pixel game or game engine in Julia using SDL
Julia
1
star
24

Figurer.jl

A julia package demonstrating how you can model a hierarchy of types. In this case geometric figures.
Julia
1
star
25

bensin

A 2D game engine written in Go for exploring various game engine architectures such as data oriented design.
Go
1
star
26

ProcLauncher

A simple Qt GUI application for experimenting with the QProcess class
C++
1
star
27

GoTMSupport.jl

Support for writing bundle commands for the Go programming language in Julia.
Julia
1
star
28

arena

Demonstrate allocating nodes in a generic binary tree using an arena allocator
Go
1
star
29

Trees.jl

Implementation of red-black trees in Julia for educational purposes.
Julia
1
star
30

AsciiDocTools

A colleciton of functions for converting Pandoc style Markdown to AsciiDoc format
Julia
1
star
31

cryptobook

A book about cryptology which aims at being brief and help you understand how to use crypthology as a mobile developer, bit coin user, or if you want to secure your personal files.
1
star
32

LearnByCheating.jl

Learn Julia programming through exercises designed around the idea of cheating
Julia
1
star
33

Streng

Swift strings are missing a lot of essential string methods so this extension adds them
Swift
1
star
34

EditorUtils.jl

Collection of functions which a practical to use when editing source code
Julia
1
star
35

DesignPatterns.jl

Example of implementing OO design patterns in Julia
Julia
1
star
36

ToyRockets.jl

An educational example for how to create type and type hierarchies in Julia.
Julia
1
star