public
Description: rexical is a lexical scanner generator for ruby
Homepage:
Clone URL: git://github.com/tenderlove/rexical.git
name age message
file .gitignore Fri Mar 13 14:37:36 -0700 2009 making rdoc ignore the generated header [tenderlove]
file CHANGELOG.rdoc Tue Jun 30 20:25:53 -0700 2009 terrorist version bump [tenderlove]
file DOCUMENTATION.en.rdoc Wed Jul 23 09:33:34 -0700 2008 moving around documentation adding manifest [tenderlove]
file DOCUMENTATION.ja.rdoc Wed Jul 23 09:33:34 -0700 2008 moving around documentation adding manifest [tenderlove]
file Manifest.txt Tue Jun 30 20:21:46 -0700 2009 fixing manifest [tenderlove]
file README.ja Sun Jun 07 11:17:39 -0700 2009 renaming to rex to rexical [tenderlove]
file README.rdoc Sun Jun 07 11:17:39 -0700 2009 renaming to rex to rexical [tenderlove]
file Rakefile Tue Jun 30 20:21:34 -0700 2009 removing unused file [tenderlove]
directory bin/ Sun Jun 07 11:17:39 -0700 2009 renaming to rex to rexical [tenderlove]
directory lib/ Tue Jun 30 20:25:53 -0700 2009 terrorist version bump [tenderlove]
directory sample/ Wed Jul 23 09:05:20 -0700 2008 moving stuff out of packages [tenderlove]
directory test/ Fri Jun 19 18:00:04 -0700 2009 Spaces don't need to be escaped in regular expr... [Carl Lerche]
README.rdoc

Rexical

DESCRIPTION

Rexical is a lexical scanner generator. It is written in Ruby itself, and generates Ruby program. It is designed for use with Racc.

SYNOPSIS

Here is a sample lexical definition:

  class Sample
  macro
    BLANK         [\ \t]+
  rule
    BLANK         # no action
    \d+           { [:digit, text.to_i] }
    \w+           { [:word, text] }
    \n
    .             { [text, text] }
  end

Here is the command line usage:

  $ rex  sample1.rex  --stub
  $ ruby sample1.rex.rb  sample1.c

  $ rex  sample2.rex  --stub
  $ ruby sample2.rex.rb  sample2.bas

  $ racc calc3.racc
  $ rex  calc3.rex
  $ ruby calc3.tab.rb

REQUIREMENTS

  • ruby version 1.8.x or later.

INSTALL

  • sudo gem install rexical

LICENSE

Rexical is distributed under the terms of the GNU Lesser General Public License version 2. Note that you do NOT need to follow LGPL for your own parser (Rexical outputs). You can provide those files under any licenses you want.