Skip to content

LavirtheWhiolet/self-bootstrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Self-bootstrap

A general-purpose parser generator that converts a grammar description for an extended PEG into a Ruby program to parse that grammar.

See peg2rb - User Guide.html (view online) for details on the input grammar description and the output parser. You may also see samples of the grammar descriptions in samples.

The input grammar description has its own grammar too. It is described in peg2rb.peg.

Requirements

Usage

You may run this program with the following command of Bourne shell or Command Prompt:

ruby peg2rb.rb input-grammar > output-parser

where input-grammar is a file with the input grammar description and output-parser is a file which the output parser is to be written to.

The program exits with status 0 if the parser is generated successfully and with non-zero status otherwise.

Source code for peg2rb.rb. You may use peg2rb.rb on it to generate peg2rb.rb itself.

Rakefile

Script for Rake for building this package.

TODO

Tasks planned to be done for this package.

generated

All generated files—generated parsers, object files, temporary assets—are put into this directory.

proof

Formal proof of this package correctness. Not done yet.

Sample grammar descriptions for peg2rb.rb, scripts to generate and run parsers from them and sample input data for the parsers.

How to build

Install Rake and run following command in this directory:

rake

About

PEG parser generator for Ruby.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages