Skip to content

Generates Abstract Syntax Trees (ASTs) for the WinZig programming language.

Notifications You must be signed in to change notification settings

ThilinaTLM/win-zig-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WinZig AST Generator

Welcome to the WinZig AST Generator, a tool written in Rust that generates Abstract Syntax Trees (ASTs) for the WinZig programming language. This project provides an easy-to-use interface for analyzing your WinZig code, offering you insights into its structure and aiding in debugging.

This tool leverages Rust's efficient and safe systems programming language capabilities, making the AST generation process reliable and fast.

Single Command Install, Build & Run

make
./winzigc --ast winzig_test_programs/winzig_01

Building & Running Guide

Requirements

  • Rust (recommend 1.67.1 or higher)
  • Cargo (recommend 1.67.1 or higher)

Install Rust & Cargo

Make sure you have these installed on your machine before proceeding.

Building From Source

  1. Clone this repository to your local machine.

    git clone https://github.com/ThilinaTLM/win-zig-parser.git
    cd win-zig-parser
  2. Build the project using Cargo.

    cargo build --release
  3. Run the executable with sample WinZig source file.

    ./target/release/win-zig winzig_test_programs/winzig_01

Tests

Run the following command to run the test suite.

cargo test

This will test all the source files provided in winzig_test_programs directory. It will compare generated AST with expected AST provided as a winzig_xx.tree file.

Usage

  1. Generate AST

    ./target/release/win-zig <path-to-winzig-file>
  2. Generate AST with verbose output

    ./target/release/win-zig <path-to-winzig-file> --verbose
  3. Get lexical tokens

    ./target/release/win-zig <path-to-winzig-file> --tokens

About

Generates Abstract Syntax Trees (ASTs) for the WinZig programming language.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published