renamed to soml-parser
This commit is contained in:
parent
6ae4b624b0
commit
d38a9c626f
2
Gemfile
2
Gemfile
@ -2,7 +2,7 @@ source "http://rubygems.org"
|
|||||||
|
|
||||||
gem "rake"
|
gem "rake"
|
||||||
|
|
||||||
gem "salama-reader" , :path => "."
|
gem "soml-parser" , :path => "."
|
||||||
|
|
||||||
# use this for debugging, the printout is better (cut/paste)
|
# use this for debugging, the printout is better (cut/paste)
|
||||||
gem "ast" , :github => "dancinglightning/ast" , :branch => :new_inspect
|
gem "ast" , :github => "dancinglightning/ast" , :branch => :new_inspect
|
||||||
|
@ -8,7 +8,7 @@ GIT
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
salama-reader (0.4.0)
|
soml-parser (0.5.0)
|
||||||
ast (~> 2.1.0)
|
ast (~> 2.1.0)
|
||||||
parslet (~> 1.7.1)
|
parslet (~> 1.7.1)
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ DEPENDENCIES
|
|||||||
codeclimate-test-reporter
|
codeclimate-test-reporter
|
||||||
minitest
|
minitest
|
||||||
rake
|
rake
|
||||||
salama-reader!
|
soml-parser!
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.10.6
|
1.10.6
|
||||||
|
32
README.md
32
README.md
@ -1,17 +1,17 @@
|
|||||||
[](https://travis-ci.org/salama/salama-reader)
|
[](https://travis-ci.org/salama/soml-parser)
|
||||||
[](http://badge.fury.io/rb/salama-reader)
|
[](http://badge.fury.io/rb/soml-parser)
|
||||||
[](https://codeclimate.com/github/salama/salama-reader)
|
[](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.
|
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.
|
Soml is Still forming after realizing the need for an oo system language.
|
||||||
(I really didn't want to do yet another language)
|
|
||||||
|
|
||||||
The need comes from these three things:
|
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
|
- Upward compatible memory and calling conventions are needed
|
||||||
- Multiple return addresses 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
|
In Soml a function call is not necessarily a part of linear code. A call may return to several
|
||||||
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
|
|
||||||
addresses, making the call more like an if statement.
|
addresses, making the call more like an if statement.
|
||||||
|
|
||||||
### Syntax
|
### 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,
|
- statically typed so all variable declarations, functions and arguments are typed.
|
||||||
functions and arguments shall be typed.
|
|
||||||
- objects but without data hiding
|
- objects but without data hiding
|
||||||
- probably nil objects
|
|
||||||
- static blocks (a bit ala crystal)
|
- static blocks (a bit ala crystal)
|
||||||
- call syntax as already discussed, ie message based
|
- call syntax as already discussed, ie message based
|
||||||
|
- no semicolns and stuff, but not ruby either
|
||||||
Some things we shall leave behind from the ruby approach are a lot of sugar, like missing brackets,
|
|
||||||
random code everywhere, statements galore . . .
|
|
||||||
|
|
||||||
|
|
||||||
### Parser
|
### Parser
|
||||||
|
|
||||||
|
2
Rakefile
2
Rakefile
@ -27,7 +27,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 = "salama-reader #{version}"
|
rdoc.title = "soml-parser #{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
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
require 'parslet'
|
require 'parslet'
|
||||||
require 'parser/salama'
|
require 'parser/soml'
|
||||||
require "ast"
|
require "ast"
|
||||||
require 'parser/transform'
|
require 'parser/transform'
|
@ -1,17 +1,17 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- encoding: utf-8 -*-
|
||||||
|
|
||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
s.name = 'salama-reader'
|
s.name = 'soml-parser'
|
||||||
s.version = '0.4.0'
|
s.version = '0.5.0'
|
||||||
|
|
||||||
s.authors = ['Torsten Ruger']
|
s.authors = ['Torsten Ruger']
|
||||||
s.email = 'torsten@villataika.fi'
|
s.email = 'torsten@villataika.fi'
|
||||||
s.extra_rdoc_files = ['README.md']
|
s.extra_rdoc_files = ['README.md']
|
||||||
s.files = %w(README.md LICENSE) + Dir.glob("lib/**/*")
|
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.license = 'GNU v3'
|
||||||
s.require_paths = ['lib']
|
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 'parslet', '~> 1.7.1'
|
||||||
s.add_dependency 'ast', '~> 2.1.0'
|
s.add_dependency 'ast', '~> 2.1.0'
|
@ -13,7 +13,7 @@ if ENV['CODECLIMATE_REPO_TOKEN']
|
|||||||
CodeClimate::TestReporter.start
|
CodeClimate::TestReporter.start
|
||||||
end
|
end
|
||||||
|
|
||||||
require 'salama-reader'
|
require 'soml-parser'
|
||||||
|
|
||||||
require "minitest"
|
require "minitest"
|
||||||
require "minitest/autorun"
|
require "minitest/autorun"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user