From d38a9c626fda8bc8d8fd813fcc0a21de9aa8d2a6 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Mon, 30 Nov 2015 19:55:48 +0200 Subject: [PATCH] renamed to soml-parser --- Gemfile | 2 +- Gemfile.lock | 4 +-- README.md | 32 ++++++++------------ Rakefile | 2 +- lib/parser/{salama.rb => soml.rb} | 0 lib/{salama-reader.rb => soml-parser.rb} | 2 +- salama-reader.gemspec => soml-parser.gemspec | 8 ++--- test/setup.rb | 2 +- 8 files changed, 22 insertions(+), 30 deletions(-) rename lib/parser/{salama.rb => soml.rb} (100%) rename lib/{salama-reader.rb => soml-parser.rb} (71%) rename salama-reader.gemspec => soml-parser.gemspec (67%) diff --git a/Gemfile b/Gemfile index 63d4023..a3ef5eb 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source "http://rubygems.org" gem "rake" -gem "salama-reader" , :path => "." +gem "soml-parser" , :path => "." # use this for debugging, the printout is better (cut/paste) gem "ast" , :github => "dancinglightning/ast" , :branch => :new_inspect diff --git a/Gemfile.lock b/Gemfile.lock index 2e62cbe..8dacaaa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,7 +8,7 @@ GIT PATH remote: . specs: - salama-reader (0.4.0) + soml-parser (0.5.0) ast (~> 2.1.0) parslet (~> 1.7.1) @@ -38,7 +38,7 @@ DEPENDENCIES codeclimate-test-reporter minitest rake - salama-reader! + soml-parser! BUNDLED WITH 1.10.6 diff --git a/README.md b/README.md index f2e4c63..1e46292 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,17 @@ -[![Build Status](https://travis-ci.org/salama/salama-reader.svg?branch=master)](https://travis-ci.org/salama/salama-reader) -[![Gem Version](https://badge.fury.io/rb/salama-reader.svg)](http://badge.fury.io/rb/salama-reader) -[![Test Coverage](https://codeclimate.com/github/salama/salama-reader/badges/coverage.svg)](https://codeclimate.com/github/salama/salama-reader) +[![Build Status](https://travis-ci.org/salama/soml-parser.svg?branch=master)](https://travis-ci.org/salama/soml-parser) +[![Gem Version](https://badge.fury.io/rb/soml-parser.svg)](http://badge.fury.io/rb/soml-parser) +[![Test Coverage](https://codeclimate.com/github/salama/soml-parser/badges/coverage.svg)](https://codeclimate.com/github/salama/soml-parser) -## Salama Reader +## Soml Parser -The parser part of salama is now a standalone gem. It parses Phisol using Parslet and no other dependencies. +The parser part of soml is a standalone gem to allow independent development. +It parses Soml using Parslet and no other dependencies. Also it is very educational, as it is very readable code, and not too much of it. -## Phisol Phi System Object Language +## Soml: Salama Object Machine Language -Phisol is just forming after realizing the (unfortunate) need for an oo system language. -(I really didn't want to do yet another language) +Soml is Still forming after realizing the need for an oo system language. The need comes from these three things: @@ -20,26 +20,18 @@ Phisol is just forming after realizing the (unfortunate) need for an oo system l - Upward compatible memory and calling conventions are needed - Multiple return addresses are needed -From these comes the name: A phi node is the opposite of what you may think of as an if. Actually an -if statement is always a branch (the if part) and a rejoining of the two branches (the phi part). - -In Phisol a function call is not necessarily a part of linear code. A call may return to several +In Soml a function call is not necessarily a part of linear code. A call may return to several addresses, making the call more like an if statement. ### Syntax -Syntax (and semantics) of Phisol are just forming, but some things are clear: +Syntax and semantics of Soml are described on the [salama site](http://salama-vm.org/soml/soml.html) -- statically typed (in the beginning with just two types) meaning all variable declarations, - functions and arguments shall be typed. +- statically typed so all variable declarations, functions and arguments are typed. - objects but without data hiding -- probably nil objects - static blocks (a bit ala crystal) - call syntax as already discussed, ie message based - -Some things we shall leave behind from the ruby approach are a lot of sugar, like missing brackets, -random code everywhere, statements galore . . . - +- no semicolns and stuff, but not ruby either ### Parser diff --git a/Rakefile b/Rakefile index fc4213b..ecf4a72 100644 --- a/Rakefile +++ b/Rakefile @@ -27,7 +27,7 @@ Rake::RDocTask.new do |rdoc| version = File.exist?('VERSION') ? File.read('VERSION') : "" rdoc.rdoc_dir = 'rdoc' - rdoc.title = "salama-reader #{version}" + rdoc.title = "soml-parser #{version}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') end diff --git a/lib/parser/salama.rb b/lib/parser/soml.rb similarity index 100% rename from lib/parser/salama.rb rename to lib/parser/soml.rb diff --git a/lib/salama-reader.rb b/lib/soml-parser.rb similarity index 71% rename from lib/salama-reader.rb rename to lib/soml-parser.rb index b816698..446d718 100644 --- a/lib/salama-reader.rb +++ b/lib/soml-parser.rb @@ -1,4 +1,4 @@ require 'parslet' -require 'parser/salama' +require 'parser/soml' require "ast" require 'parser/transform' diff --git a/salama-reader.gemspec b/soml-parser.gemspec similarity index 67% rename from salama-reader.gemspec rename to soml-parser.gemspec index 0fcbf06..9706d91 100644 --- a/salama-reader.gemspec +++ b/soml-parser.gemspec @@ -1,17 +1,17 @@ # -*- encoding: utf-8 -*- Gem::Specification.new do |s| - s.name = 'salama-reader' - s.version = '0.4.0' + s.name = 'soml-parser' + s.version = '0.5.0' s.authors = ['Torsten Ruger'] s.email = 'torsten@villataika.fi' s.extra_rdoc_files = ['README.md'] s.files = %w(README.md LICENSE) + Dir.glob("lib/**/*") - s.homepage = 'https://github.com/salama/salama-reader' + s.homepage = 'https://github.com/salama/soml-parser' s.license = 'GNU v3' s.require_paths = ['lib'] - s.summary = 'Ruby parser for the salama machine' + s.summary = 'Ruby parser for the salama object system language' s.add_dependency 'parslet', '~> 1.7.1' s.add_dependency 'ast', '~> 2.1.0' diff --git a/test/setup.rb b/test/setup.rb index 47c8410..11fbe76 100644 --- a/test/setup.rb +++ b/test/setup.rb @@ -13,7 +13,7 @@ if ENV['CODECLIMATE_REPO_TOKEN'] CodeClimate::TestReporter.start end -require 'salama-reader' +require 'soml-parser' require "minitest" require "minitest/autorun"