PEG grammar for Ruby, based on StringScanner. Consistently superior speed: up to 10 times faster than Treetop, and twice the speed of rex+racc.
Compatible with Ruby v1.9 and above.
Same license as for Ruby.
gem in rsec
Parser / Regexp Combinator For Ruby
Home Page: rsec.herokuapp.com
License: Other
PEG grammar for Ruby, based on StringScanner. Consistently superior speed: up to 10 times faster than Treetop, and twice the speed of rex+racc.
Compatible with Ruby v1.9 and above.
Same license as for Ruby.
gem in rsec
2 methods are under consideration: StringScanner#scan_byte and StringScanner#scan_string
Hi,
I ran 'sudo gem1.9 install rsec' and received the following diagnostics:
Successfully installed rsec-0.3.6
1 gem installed
Installing ri documentation for rsec-0.3.6...
Installing RDoc documentation for rsec-0.3.6...
ERROR: While generating documentation for rsec-0.3.6
... MESSAGE: Error while evaluating /opt/local/lib/ruby1.9/1.9.1/rdoc/generator/template/darkfish/classpage.rhtml: undefined method `gsub' for nil:NilClass (at "method-source-code"\n\t\t\t\t\t\tid="prim-source">\n
\n")
... RDOC args: lib readme.rdoc
(continuing with the rest of the installation)As You can imagine, the RDoc for rsec is not installed.
Add a method to_graph, which outputs a dot file which can be read by graphviz.
Rule names will be a bit strange. Maybe can use parser.name = 'some rule name' ?
For uniform optimization (tree transformation) and compiler crafting.
For example, this rule (API is still under considering) will reduce a nested parser to an optimized one:
tree [Until, [Pattern]] do |parser|
UntilPattern[parser.some.some]
end
require 'strscan'
ss = StringScanner.new "\n"
/./ =~ "\n" #=> 0
# but strscan's behavior is strange:
ss.scan /./ #=> nil
ss = StringScanner.new "a\n"
ss.scan /[.\n]/ #=> nil -- this group is interpreted as /\n/
Can not access http://rsec.herokuapp.com.
Are you OK for me to contribute to your documentation? It's a great tool, but it does need more tutorial material.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.