A tool that allows you to modify, edit, and recompile the AST script of Artemis engine.

Overview

Artemis AST Script Processor

This utility offers a set of Rust functions to parse and manipulate Artemis AST-based scripts.

Features

  1. Tokenization: Converts raw script into a series of tokens.
  2. Parsing: Transforms tokens into a structured AST represented as a HashMap.
  3. AST Pruning: Removes unnecessary elements from the AST for a cleaner representation.
  4. Script Generation: Converts the modified AST back into its script form.
  5. Scenario Extraction and Replacement: Aids in replacing parts of the script based on your requirements.

Getting Started

Build

  1. Clone the Repository:

    git clone https://github.com/your_username/ast-script-processor.git
    cd ast-script-processor
  2. Build the Project:

    With Rust installed, building is as simple as:

    cargo build --release

    This will create an optimized executable in the target/release directory.

Usage

  1. Parse the AST:

    let ast = parse_ast("path/to/script.txt").unwrap();
  2. Prune the AST:

    prune_ast(&mut ast);
  3. Convert the AST back to a script:

    let script = hashmap_to_script(&ast).unwrap();
  4. Extract and replace scenario:

    replace_secnario(&ast, vec!["11", "22"]).unwrap();

License

MIT

You might also like...
This is a simple command-line interface tool that allows you to interact with ChatGPT from OpenAI or Azure.

HeyGPT This is a simple command-line interface tool that allows you to interact with ChatGPT from OpenAI or Azure. You can use it to: Chat with ChatGP

A rust library that allows you to host the CLR and execute dotnet binaries.
A rust library that allows you to host the CLR and execute dotnet binaries.

ClrOxide ClrOxide is a rust library that allows you to host the CLR and dynamically execute dotnet binaries. I wanted to call it Kepler for no particu

A filesystem driver that allows you to view your Blackboard course contents as if they were normal files and folders on your system!
A filesystem driver that allows you to view your Blackboard course contents as if they were normal files and folders on your system!

BlackboardFS Blackboard: noun A website so bad that it might as well be a network drive. BlackboardFS is a filesystem driver that allows you to view y

FastSSH is a TUI that allows you to quickly connect to your services by navigating through your SSH config.
FastSSH is a TUI that allows you to quickly connect to your services by navigating through your SSH config.

Connect quickly to your services 🚀 FastSSH is a TUI that allows you to quickly connect to your services by navigating through your SSH config. Instal

Rust crate that allows you to display status & progress information in a terminal

status-line This crate allows you to display status & progress information in a terminal This crate handles the problem of displaying a small amount o

bevy_scriptum is a a plugin for Bevy that allows you to write some of your game logic in a scripting language

bevy_scriptum is a a plugin for Bevy that allows you to write some of your game logic in a scripting language. Currently, only Rhai is supported, but more languages may be added in the future.

đź’« This program allows you to do requests in Rust without reqwest !

Zapros đź’« This program allows you to do requests in Rust without reqwest ! Usage : Get use crate::http_client::HttpClient; use crate::http_client::Htt

A crate that allows you to mostly-safely cast one type into another type.

A crate that allows you to mostly-safely cast one type into another type. This is mostly useful for generic functions, e.g. pub fn fooS(s: S) {

TMM is a Linux native game modding tool. it allows to install and depoly mods for Linux native and wine games.

Tux Mod Manager TMM is a Linux native mod manager made with the Tauri toolkit. It can install, load, remove and deploy mods for both Linux native and

Owner
xmoe
It is now safe to turn off your computer
xmoe
Recompile Rust faster. Good for your flow state.

plonk Plonk is a development-time build tool for Rust projects. cargo install cargo-plonk # fn main() { # lib::say_hello(); # } $ cargo build -p exam

Divy Srivastava 16 Dec 12, 2023
Scriptable tool to read and write UEFI variables from EFI shell. View, save, edit and restore hidden UEFI (BIOS) Setup settings faster than with the OEM menu forms.

UEFI Variable Tool (UVT) UEFI Variable Tool (UVT) is a command-line application that runs from the UEFI shell. It can be launched in seconds from any

null 4 Dec 11, 2023
Sero is a web server that allows you to easily host your static sites without pain. The idea was inspired by surge.sh but gives you full control.

sero Lightning-fast, static web publishing with zero configuration and full control ?? Table Of Contents ?? Table Of Contents ?? Tools âť“ About The Pro

Dmitry Miasnenko 6 Nov 13, 2023
A tree-sitter based AST difftool to get meaningful semantic diffs

diffsitter Disclaimer diffsitter is very much a work in progress and nowhere close to production ready (yet). Contributions are always welcome! Summar

Afnan Enayet 1.3k Jan 8, 2023
tmplt is a command-line interface tool that allows you to quickly and easily set up project templates for various programming languages and frameworks

tmplt A User Friendly CLI Tool For Creating New Projects With Templates About tmplt is a command-line tool that lets users quickly create new projects

Humble Penguin 35 Apr 8, 2023
A bit like tee, a bit like script, but all with a fake tty. Lets you remote control and watch a process

teetty teetty is a wrapper binary to execute a command in a pty while providing remote control facilities. This allows logging the stdout of a process

Armin Ronacher 259 Jan 3, 2023
Edit a file directly on Amazon S3 in CLI.

s3-edit-rs The original idea for this project comes from s3-edit written in Go by tsub. I started this project for educational purposes, and it is my

Gor Hayrapetyan 6 Jul 12, 2020
Bulk edit files.

bulke Bulk edit files. Example (not working yet) $ cat ./ap/jp.yaml // ... region: ap country: jp $ cat ./eu/de.yaml // ... region: eu country: de //

null 3 Jan 10, 2022
A terminal UI to edit bytes by the nibble.

heh The HEx Helper is a cross-platform terminal UI used for modifying file data in hex or ASCII. It aims to replicate some of the look of hexyl while

nathan 285 Dec 18, 2022
Jumpy is a tool that allows to quickly jump to one of the directory you've visited in the past

Jumpy Jumpy is a tool that allows to quickly jump to one of the directory you've visited in the past. It is heavily inspired by Zoxide but is more lig

Clément Nerma 2 Oct 3, 2022