namechange

This commit is contained in:
Torsten Ruger 2014-07-29 18:36:18 +03:00
parent 03ad97ef27
commit 0cc0812d5e
6 changed files with 14 additions and 14 deletions

View File

@ -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. 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 ### 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: 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 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. 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.

View File

@ -14,11 +14,11 @@ require 'rake'
require 'jeweler' require 'jeweler'
Jeweler::Tasks.new do |gem| Jeweler::Tasks.new do |gem|
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
gem.name = "kide-reader" gem.name = "salama-reader"
gem.homepage = "http://github.com/kide-vm/kide-reader" gem.homepage = "http://github.com/salama-vm/salama-reader"
gem.license = "GPL3" gem.license = "GPL3"
gem.summary = %Q{Parse ruby in ruby using parslet.} 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. 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. 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.} 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') : "" version = File.exist?('VERSION') ? File.read('VERSION') : ""
rdoc.rdoc_dir = 'rdoc' rdoc.rdoc_dir = 'rdoc'
rdoc.title = "kide-reader #{version}" rdoc.title = "salama-reader #{version}"
rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb') rdoc.rdoc_files.include('lib/**/*.rb')
end end

View File

@ -19,7 +19,7 @@ module Parser
# a maybe removes the 0 a sequence (array) to a single (hash). Thus 2 transformations are needed # 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 # 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 BasicTypes
include CompoundTypes include CompoundTypes
include Tokens include Tokens

View File

@ -1,3 +1,3 @@
require 'parslet' require 'parslet'
require 'parser/kide' require 'parser/salama'
require 'parser/transform' require 'parser/transform'

View File

@ -17,7 +17,7 @@ module ParserHelper
module InstanceMethods module InstanceMethods
def setup def setup
@parser = Parser::Kide.new @parser = Parser::Salama.new
@transform = Parser::Transform.new @transform = Parser::Transform.new
end end

View File

@ -13,7 +13,7 @@ end
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.dirname(__FILE__))
require 'kide-reader' require 'salama-reader'
require "minitest" require "minitest"
require "minitest/autorun" require "minitest/autorun"