diff --git a/README.md b/README.md index 487496a..e452224 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,17 @@ -## Kide Reader* +## Salama Reader* -The parser part of kide is now a standalone gem. It parses ruby using Parslet and no other dependencies. +The parser part of salama is now a standalone gem. It parses ruby using Parslet and no other dependencies. -This is interesing if you want to generate executable code, like kide, but also for other things, like code analysis. +This is interesing if you want to generate executable code, like salama, but also for other things, like code analysis. Also it is very educational, as it is very readable code, and not too much of it. * -It looks into it's kide ball and all it sees is red. A red kide . . . ruby, yes. +It looks into it's salama ball and all it sees is red. A red salama . . . ruby, yes. ### Parser -The main parser per se is in parser/kide , but it just pulls in all the parts. +The main parser per se is in parser/salama , but it just pulls in all the parts. All the other files are ruby modules representing aspects of the parser. Most names are quite self explanitory, but here is a list: @@ -32,7 +32,7 @@ All the other files are ruby modules representing aspects of the parser. Most n The Abtract Syntax Tree (ast) layer puts the parsed code into objects, so they are nice and easy to work with. -The Classes don't really define any functionality, that is done in Kide, or can be done in any code using this. Kide just adds a compile function to each class, but a visitor pattern would do just as well. +The Classes don't really define any functionality, that is done in Salama, or can be done in any code using this. Salama just adds a compile function to each class, but a visitor pattern would do just as well. The functionality that is in there is mainly to do with testing. Equality is defined, but also **inspect** in such a way that it's output (which you get from a failing test) can be pasted straight into the test case as the expected result. diff --git a/Rakefile b/Rakefile index 74fe28c..efe2879 100644 --- a/Rakefile +++ b/Rakefile @@ -14,11 +14,11 @@ require 'rake' require 'jeweler' Jeweler::Tasks.new do |gem| # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options - gem.name = "kide-reader" - gem.homepage = "http://github.com/kide-vm/kide-reader" + gem.name = "salama-reader" + gem.homepage = "http://github.com/salama-vm/salama-reader" gem.license = "GPL3" gem.summary = %Q{Parse ruby in ruby using parslet.} - gem.description = %Q{Kide reader is part of the kide vm. The reader reads (parses) ruby and + gem.description = %Q{Salama reader is part of the salama vm. The reader reads (parses) ruby and creates an ast from it. There are no other dependencies than parslet, which itself has hardly any. The gem may be useful for code analysis tools or for education. Two ways to use it include adding functions to each of the AST classes, or using a visitor patter.} @@ -48,7 +48,7 @@ Rake::RDocTask.new do |rdoc| version = File.exist?('VERSION') ? File.read('VERSION') : "" rdoc.rdoc_dir = 'rdoc' - rdoc.title = "kide-reader #{version}" + rdoc.title = "salama-reader #{version}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') end diff --git a/lib/parser/kide.rb b/lib/parser/salama.rb similarity index 97% rename from lib/parser/kide.rb rename to lib/parser/salama.rb index 94707fd..aa66b55 100644 --- a/lib/parser/kide.rb +++ b/lib/parser/salama.rb @@ -19,7 +19,7 @@ module Parser # a maybe removes the 0 a sequence (array) to a single (hash). Thus 2 transformations are needed # More work than the prettiness is worth, so only use .maybe on something that does not need capturing - class Kide < Parslet::Parser + class Salama < Parslet::Parser include BasicTypes include CompoundTypes include Tokens diff --git a/lib/kide-reader.rb b/lib/salama-reader.rb similarity index 65% rename from lib/kide-reader.rb rename to lib/salama-reader.rb index 3e6aa80..2c37050 100644 --- a/lib/kide-reader.rb +++ b/lib/salama-reader.rb @@ -1,3 +1,3 @@ require 'parslet' -require 'parser/kide' +require 'parser/salama' require 'parser/transform' diff --git a/test/parser_helper.rb b/test/parser_helper.rb index bd04c3d..8428ac5 100644 --- a/test/parser_helper.rb +++ b/test/parser_helper.rb @@ -17,7 +17,7 @@ module ParserHelper module InstanceMethods def setup - @parser = Parser::Kide.new + @parser = Parser::Salama.new @transform = Parser::Transform.new end diff --git a/test/setup.rb b/test/setup.rb index e4ed4ee..1c20da1 100644 --- a/test/setup.rb +++ b/test/setup.rb @@ -13,7 +13,7 @@ end $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) -require 'kide-reader' +require 'salama-reader' require "minitest" require "minitest/autorun"