Permalink
Browse files

renaming to rex to rexical

  • Loading branch information...
1 parent 3a23828 commit 6d9a629b9d0e0a0b6d95ab0b251a86a7c03874b4 @tenderlove committed Jun 7, 2009
Showing with 44 additions and 38 deletions.
  1. +6 −0 CHANGELOG.rdoc
  2. +5 −5 README.ja
  3. +6 −7 README.rdoc
  4. +3 −2 Rakefile
  5. +2 −2 bin/rex
  6. +0 −3 lib/rex.rb
  7. +3 −0 lib/rexical.rb
  8. +3 −3 lib/{rex → rexical}/generator.rb
  9. +1 −1 lib/{rex → rexical}/info.rb
  10. +6 −6 lib/{rex → rexical}/rexcmd.rb
  11. +9 −9 test/test_generator.rb
View
6 CHANGELOG.rdoc
@@ -1,3 +1,9 @@
+=== 1.0.3
+
+* Bug fixes
+
+ * renamed to "Rexical" because someone already has "rex".
+
=== 1.0.2
* Bug fixes
View
10 README.ja
@@ -1,7 +1,7 @@
-Rex README
+Rexical README
===========
- Rex �� Ruby �Τ���Υ�����ʥ����ͥ졼���Ǥ���
+ Rexical �� Ruby �Τ���Υ�����ʥ����ͥ졼���Ǥ���
lex �� Ruby �Ǥ�����ޤ���
Racc �ȤȤ�˻Ȥ��褦���߷פ���Ƥ��ޤ���
@@ -35,7 +35,7 @@ Rex README
�ƥ���
------
- sample/ �ʲ��ˤ����Ĥ� Rex ��ʸˡ�ե�����Υ���ץ뤬�Ѱ�
+ sample/ �ʲ��ˤ����Ĥ� Rexical ��ʸˡ�ե�����Υ���ץ뤬�Ѱ�
���Ƥ���ޤ����ʲ���¹Ԥ��Ƥ��������
$ rex sample1.rex --stub
@@ -48,7 +48,7 @@ Rex README
$ rex calc3.rex
$ ruby calc3.tab.rb
- Rex �ξܤ���ʸˡ�� doc/ �ǥ��쥯�ȥ�ʲ��򸫤Ƥ��������
+ Rexical �ξܤ���ʸˡ�� doc/ �ǥ��쥯�ȥ�ʲ��򸫤Ƥ��������
�ޤ�������� sample/ �ǥ��쥯�ȥ�ʲ��򸫤Ƥ��������
@@ -63,7 +63,7 @@ Rex README
�Х��ʤ�
--------
- Rex ��ȤäƤ��ƥХ��餷�����ݤ�����顢�����Υ��ɥ쥹�ޤ�
+ Rexical ��ȤäƤ��ƥХ��餷�����ݤ�����顢�����Υ��ɥ쥹�ޤ�
�᡼��򤯤������
���ΤȤ��ϤǤ������Х���Ƹ��Ǥ���ʸˡ�ե�������դ��Ƥ��������
View
13 README.rdoc
@@ -1,11 +1,10 @@
-= Rex
+= Rexical
-* http://rex.rubyforge.org
-* http://github.com/aaronp/rex/tree/master
+* http://github.com/tenderlove/rexical/tree/master
== DESCRIPTION
-Rex is a lexical scanner generator.
+Rexical is a lexical scanner generator.
It is written in Ruby itself, and generates Ruby program.
It is designed for use with Racc.
@@ -43,11 +42,11 @@ Here is the command line usage:
== INSTALL
-* sudo gem install rex
+* sudo gem install rexical
== LICENSE
-Rex is distributed under the terms of the GNU Lesser General
+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 (Rex outputs). You can provide those
+LGPL for your own parser (Rexical outputs). You can provide those
files under any licenses you want.
View
5 Rakefile
@@ -4,12 +4,13 @@ require 'rubygems'
require 'hoe'
$LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
-require 'rex'
+require 'rexical'
-HOE = Hoe.new('rex', Rex::VERSION) do |p|
+HOE = Hoe.new('rexical', Rexical::VERSION) do |p|
p.readme_file = 'README.rdoc'
p.history_file = 'CHANGELOG.rdoc'
p.developer('Aaron Patterson', 'aaronp@rubyforge.org')
+ p.rubyforge_name = 'ruby-rex'
p.extra_rdoc_files = FileList['*.rdoc']
end
View
4 bin/rex
@@ -13,6 +13,6 @@
## ---------------------------------------------------------------------
require 'rubygems'
-require 'rex'
+require 'rexical'
-Rex::Cmd.new.run
+Rexical::Cmd.new.run
View
3 lib/rex.rb
@@ -1,3 +0,0 @@
-require 'rex/generator'
-require 'rex/info'
-require 'rex/rexcmd'
View
3 lib/rexical.rb
@@ -0,0 +1,3 @@
+require 'rexical/generator'
+require 'rexical/info'
+require 'rexical/rexcmd'
View
6 lib/rex/generator.rb → lib/rexical/generator.rb
@@ -9,7 +9,7 @@
#
require 'strscan'
-module Rex
+module Rexical
## ---------------------------------------------------------------------
class ParseError < StandardError ; end
@@ -388,7 +388,7 @@ def write_scanner f = scanner_io
flag = ""
flag += "i" if @opt['--ignorecase']
## header
- f.printf REX_HEADER, Rex::VERSION, grammar_file
+ f.printf REX_HEADER, Rexical::VERSION, grammar_file
unless @opt['--independent']
f.printf "require 'racc/parser'\n"
@@ -514,7 +514,7 @@ def scan_evaluate( str )
## test
if __FILE__ == $0
- rex = Rex::Generator.new(nil)
+ rex = Rexical::Generator.new(nil)
rex.grammar_file = "sample.rex"
rex.read_grammar
rex.parse
View
2 lib/rex/info.rb → lib/rexical/info.rb
@@ -8,7 +8,7 @@
# the GNU Lesser General Public License version 2 or later.
#
-module Rex
+module Rexical
VERSION = '1.0.2'
Copyright = 'Copyright (c) 2005-2006 ARIMA Yasuhiro'
Mailto = 'arima.yasuhiro@nifty.com'
View
12 lib/rex/rexcmd.rb → lib/rexical/rexcmd.rb
@@ -12,7 +12,7 @@
## ---------------------------------------------------------------------
require 'getoptlong'
-module Rex
+module Rexical
class Cmd
OPTIONS = <<-EOT
@@ -35,7 +35,7 @@ def run
usage 'too many grammar files given' if ARGV.size > 1
filename = ARGV[0]
- rex = Rex::Generator.new(@opt)
+ rex = Rexical::Generator.new(@opt)
begin
rex.grammar_file = filename
rex.read_grammar
@@ -47,7 +47,7 @@ def run
rex.write_scanner
@status = 0
- rescue Rex::ParseError, Errno::ENOENT
+ rescue Rexical::ParseError, Errno::ENOENT
msg = $!.to_s
unless /\A\d/ === msg
msg[0,0] = ' '
@@ -91,12 +91,12 @@ def initialize
usage if @opt['--help']
if @opt['--version']
- puts "#{@cmd} version #{Rex::Version}"
+ puts "#{@cmd} version #{Rexical::Version}"
exit 0
end
if @opt['--copyright']
- puts "#{@cmd} version #{Rex::Version}"
- puts "#{Rex::Copyright} <#{Rex::Mailto}>"
+ puts "#{@cmd} version #{Rexical::Version}"
+ puts "#{Rexical::Copyright} <#{Rexical::Mailto}>"
exit 0
end
end
View
18 test/test_generator.rb
@@ -1,11 +1,11 @@
require 'test/unit'
require 'tempfile'
-require 'rex'
+require 'rexical'
require 'stringio'
class TestGenerator < Test::Unit::TestCase
def test_header_is_written_after_module
- rex = Rex::Generator.new(
+ rex = Rexical::Generator.new(
"--independent" => true
)
rex.grammar_file = File.join File.dirname(__FILE__), 'assets', 'test.rex'
@@ -26,15 +26,15 @@ def test_header_is_written_after_module
end
def test_read_non_existent_file
- rex = Rex::Generator.new(nil)
+ rex = Rexical::Generator.new(nil)
rex.grammar_file = 'non_existent_file'
assert_raises Errno::ENOENT do
rex.read_grammar
end
end
def test_scanner_inherits
- rex = Rex::Generator.new(
+ rex = Rexical::Generator.new(
"--independent" => true
)
rex.grammar_lines = StringScanner.new %q{
@@ -53,7 +53,7 @@ class Calculator < Bar
end
def test_scanner_inherits_many_levels
- rex = Rex::Generator.new(
+ rex = Rexical::Generator.new(
"--independent" => true
)
rex.grammar_lines = StringScanner.new %q{
@@ -72,7 +72,7 @@ class Calculator < Foo::Bar
end
def test_simple_scanner
- rex = Rex::Generator.new(
+ rex = Rexical::Generator.new(
"--independent" => true
)
rex.grammar_lines = StringScanner.new %q{
@@ -101,7 +101,7 @@ class Calculator
end
def test_simple_scanner_with_macros
- rex = Rex::Generator.new(
+ rex = Rexical::Generator.new(
"--independent" => true
)
rex.grammar_lines = StringScanner.new %q{
@@ -132,7 +132,7 @@ class Calculator
end
def test_nested_macros
- rex = Rex::Generator.new(
+ rex = Rexical::Generator.new(
"--independent" => true
)
rex.grammar_lines = StringScanner.new %q{
@@ -153,7 +153,7 @@ class Calculator
end
def test_more_nested_macros
- rex = Rex::Generator.new(
+ rex = Rexical::Generator.new(
"--independent" => true
)
rex.grammar_lines = StringScanner.new %q{

0 comments on commit 6d9a629

Please sign in to comment.