GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ara-lang/parser: A fault-tolerant, recursive-descent parser for Ara Programming Language 🌲

BranchesTags
Open more actions menu

Latest commit

 

History

91 Commits
91 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
benches
benches
 
 
bin
bin
 
 
examples
examples
 
 
src
src
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
Cargo.toml
Cargo.toml
 
 
Justfile
Justfile
 
 
LICENSE-APACHE
LICENSE-APACHE
 
 
LICENSE-MIT
LICENSE-MIT
 
 
README.md
README.md
 
 

Repository files navigation

Ara Parser

Actions Status Crates.io Docs

A fault-tolerant, recursive-descent parser for Ara Programming Language 🌲

Note: This project is a hard-fork of php-rust-tools/parser

Special thanks to the original authors for their work.


Usage

Add ara_parser to your Cargo.toml, and you're good to go!

[dependencies]
ara_parser = "0.6.6"

Example

use ara_parser::parser;
use ara_reporting::builder::CharSet;
use ara_reporting::builder::ColorChoice;
use ara_reporting::builder::ReportBuilder;
use ara_reporting::error::Error;
use ara_source::loader::load_directories;

fn main() -> Result<(), Error> {
   let source_map = load_directories("/path/to/project", vec!["src/"]).unwrap();

   match parser::parse_map(&source_map) {
      Ok(tree_map) => tree_map.trees.iter().for_each(|tree| {
         println!("{:#?}", tree.definitions);
      }),
      Err(report) => {
         ReportBuilder::new(&source_map)
                 .with_charset(CharSet::Unicode)
                 .with_colors(ColorChoice::Always)
                 .print(report.as_ref())?;
      }
   }

   Ok(())
}

Documentation

See the documentation for more information.

License

Licensed under either of

  • Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Credits

  • Saif Eddin Gmati
  • All contributors

About

A fault-tolerant, recursive-descent parser for Ara Programming Language 🌲

Resources

Readme

Code of conduct

Code of conduct
Activity
Custom properties

Stars

22 stars

Watchers

2 watching

Forks

2 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.