Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

Generating ruby parser in bel.rb

Tony Bargnesi edited this page Jun 21, 2016 · 1 revision

WARNING: Obsolete

The generation of a full Ruby parser for BEL Script is obsolete for bel versions greater than or equal to 1.0.0. It is supplanted by the BEL expression and script parsers available in bel_parser.

Related issues: #128 #129.


Generating BEL Script parser from Ragel

The ragel definitions in lib/bel/ragel/ are compiled into a Ruby finite-state machine for parsing full BEL Script. The ragel compilation utilizes the -T1 (e.g. faster table driven FSM) compilation switch.

Requirements:

Steps to regenerate:

# From root of bel.rb project.

# Generates a Ruby FSM at lib/bel/ragel/bel.rb.
ragel -T1 -L -R lib/bel/ragel/bel.rl

# Move generated FSM to library location.
mv lib/bel/ragel/bel.rb lib/bel/script.rb
Clone this wiki locally