- Moved dependency on
prime
to gem.
- [CHANGE] File
rley.gemspec
added runtime dependency onprime
gem (rationale: was part of stdlib, from 3.1 it is demoted to a bundled gem) - [CHANGE] File
rgn\tokenizer.rb
minor style refactoring to please Rubocop 1.27
- Refactoring of
RGN::Tokenizer
class.
- [CHANGE] Class
RGN::Tokenizer
changes.
- Added code for coming tutorial
- [NEW] Folder
tutorial
contains code used in tutorial (in wiki) - [NEW] Folders
TOML\iter_1
..TOML\iter_2
contains code for a TOML parser - [CHANGE] File
.rubocop.yml
updated to take into account new 1.25 cops. - [CHANGE] File
.rubocop.yml
updated to take into account new 1.25 cops.
- Fixes in example files, Refactored module
Notation
renamedto
RGN´
-
[CHANGE] Module
Notation
changed toRGN
. -
[FIX]
examples/general/calc_iter1/CalcLexer#initialize
now strips whitespaces at end of expression to parse. -
[FIX]
examples/general/calc_iter2/CalcLexer#initialize
now strips whitespaces at end of expression to parse. -
[FIX] File
examples/general/left.rb
Call to wrong grammar builder -
[FIX] File
examples/general/right.rb
Call to wrong grammar builder -
[FIX] File
examples/NLP/benchmark_pico_en.rb
Grammar rules used obsolete rule syntax -
[FIX] File
examples/NLP/engtagger.rb
Grammar rules used obsolete rule syntax
- Added more comment in
/examples/tokenizer
files
- [CHANGE] File
rley.gemspec
some files weren't put the gem files.
- Added example of generated scanner. Unused class removal, code re-styling to please
Rubocop
- [NEW] Folder
example\tokenizer
contains an example with a scanner that was generated. - [NEW] Class
Rley::Lexical::Literal
a specialization of Token class for literal tokens. - [CHANGE] File
.rubocop.yml
updated to take into account new 1.21 and 1.22 cops. - [DELETED] Class
Rley::Parser::ParserTracer
this class was no more in use. - [DELETED] Class
Rley::Syntax::Literal
this class was unused. - [DELETED] Class
Rley::Syntax::VerbatimSymbol
this class was unused.
- Added missing method in
ASTBaseBuilder
class
- [FIX] Added method
ParseRep::ASTBaseBuilder#reduce_children
.
- Code restyling to please Rubocop 1.19.1
- [CHANGE] File
.rubocp.yml
updated to take into account new cops. - [CHANGE] File
*.rb
files updated to fix Rubocop findings
- Unused/redundant file removal. Fix in rule generation
- [CHANGE] Removal of files in repository that were redundant/useless.
- [FIX] The rule ordering was broken by the rules implicitly generated by Rlry
- New grammar builder that accepts ? * + modifiers
- Code restyling to please rubocop 1.15.0
- Code restyling to please rubocop 0.93.1
- [CHANGE] File
.travis.yml
: updated Ruby versions, drop support for Ruby 2.3.x
- [FIX] Method
ParseForestBuilder#process_end_entry
: Added a guard expression to prevent nil error.
- [FIX] Method
GFGParsing#nullable_rule
: issue with nullable productions having at least one member in their rhs.
- Rley recognizer is about 25% faster than previous version. Kudos to the people behind the magic_frozen_string_literal gem.
- Code refactoring to use string frozen magic comments (as a consequence, Rley runs only on Rubies 2.3 or newer).
- Code restyling to please rubocop 0.7.40.
- [CHANGE] Class
ParseEntrySet
: minor code optimization - [CHANGE] File
README.md
removed allusion to Ruby 2.0.x up to 2.2.x. - [CHANGE] File
README.md
added Ruby 2.6.x up as supported version.
- Minor refactoring for parsing speed improvement.
- [CHANGE] Replacing comparison with object_id by
equal?
method - [CHANGE] Method
ParseEntry#hash
added - [CHANGE] Class
ParseEntrySet
added new Hash attribute in order to speed up membership testing.
- Removed Ruby versions older than 2.3 in CI testing because of breaking changes by Bundler 2.0
- [CHANGE] Files
Gemfile
,.travis.yml
,appveyor.yml
updated.
- Maintenance release.
- [CHANGE] Code re-styling to please Rubocop 0.62.0.
- [CHANGE] File
.travis.yml
: updated Ruby versions. - [CHANGE] File
appveyor.yml
updated Ruby versions. - [CHANGE] File
README.me
removal obsolete badge. - [CHANGE] File
LICENSE.txt
Updated copyright years.
- Version bump. Core class
Token
is changed.
- [NEW] Structure
Lexical::Position
to hold the line, column position of a token. - [NEW] Class
BaseTokenizer
: Provides basic tokenizer operations to customized through subclassing. - [CHANGE] Class
Lexical::Token
: Attributeposition
added. - [CHANGE] Method
Lexical::Token#initialize
: Add a third argument for specifying the position of the token. - [CHANGE] Many classes and examples updated to conform to
Token
class change. - [FIX] Missing methods in class
JSONPair
added.
- [FIXED] Method
GrmFlowGraph#traverse_df
now returns a meaningful message when the grammar uses a terminal symbol without declaring it first.
- [NEW] Methods
Engine#to_pforest
,Engine#pforest_visitor
added. - [NEW] Class
SPPF::AlternativeNode
Added methodaccept
to support Visitor pattern. - [NEW] Class
SPPF::EpsilonNode
Added methodaccept
to support Visitor pattern. - [CHANGE] Class
ParseForestVisitor
vastly reworked, now supports visits of cyclic structure. - [CHANGE] Class
Formatter::Debug
: Supports now visit events for both parse trees and forests. - [CHANGE] File
examples/NLP/nano_eng/nano_en_demo.rb
Added demo steps to show how to produce a parse forest.
- [CHANGE] Method
GFGEarleyParser#parse
doesn't assume that the exact sequence of tokens to be known in advance. - [FIXED] Method
GFGParsing#nullable_rule
: in very specific cases a wrong parse entry was added to the parse chart. - [FIXED] File
examples/general/left.rb
is working back.
- [ADDED] Method
done!
: added to classes involved parse tree and parse forest creation. This method signals the end of parsing. - [CHANGE] Method
ParseTreeBuilder#process_item_entry
: added an explicit message in case of ambiguous parse. - [REMOVED] Deprecated method
GFGParsing#parse_tree
, to generate parse trees use theEngine
class.
- [CHANGE] Method
ParseTreeBuilder#process_end_entry
: added an explicit message in case of ambiguous parse. - [CHANGE] Method
ParseTreeBuilder#process_item_entry
: added an explicit message in case of ambiguous parse. - [FIX] Method
ParseEntry#add_antecedent
now checks for the unicity of antecedent entries.
- [CHANGE] Method
GrammarBuilder#add_production
Simplified rule entry syntax - [CHANGE] File
examples/NML/pico_en_demo.rb
updated to reflect the simplified rule syntax. - [CHANGE] File
README.md
updated to reflect the simplified rule syntax. - [CHANGE] Struct EngineConfig added the diganose field.
- [FIX] Method
Production#initialize
: Now raises an exception when rhs is nil - [FIX] Method
ParseTreeBuilder#create_tree
: Now raises an exception when root node of tree is nil - [FIX] Method
GFGParsing#nullable_rule
: Nasty bug with antecedent link fixed.
- [CHANGE] File
lib/parser/error_reason.rb
Improved error location reporting - [CHANGE] File
README.md
updated to reflect the improved error location reporting. - [CHANGE] File
.travis.yml
: Added Ruby 2.5 build environment in Travis CI - [CHANGE] File
appveyor.yml
: Added Ruby 2.5 build environment in Appveyor CI
- [FIX] File
examples/general/NLP/engtagger.rb
code re-styling to remove most style offenses found by Rubocop 0.52.1 - [DELETE] All files
examples/general/SRL
are removed. It will become a new gem by itself.
- [FIX] Code re-styling to remove most style offenses found by Rubocop 0.52.1
Version bump. Highlights: new programming interface through facade object, improved AST generation.
- [NEW] Class
Rley::Engine
: Implementation of Facade design pattern to reach more convenient interface. - [NEW] Class
Rley::ParseRep::ASTBaseBuilder
Abstract class that simplifies the creation of custom AST (Abstract Syntax Tree) - [NEW] Module
Rley::ParseRep
hosts the classes for building parse representations (parse trees and forests) - [CHANGE] File
README.md
updated to reflect the new facade interface. - [CHANGE] Almost all the examples have been updated to use the
Rley::Engine
facade and the new AST building. - [CHANGE] All the specs have been updated to use the
Rley::Engine
facade and the new AST building. - [DEPRECATED] Method
Rley::Parser::GFGParsing#parse_tree
.
- [NEW] Files spec/rley/sppf/token_node_spec.rb
Added RSpec file for testing
SPPF::TokenNode` class. - [CHANGE] Files
lib/rley/sppf
Minor update in the YARD documentation of the SPPF node classes. - [FIX] Method
Parser::CSTRawNode#initialize
. Yard warning because of duplicate parameter names in documentation. - [FIX] Method
GFG::Edge#initialize
. Yard warning because parameter names were missing in documentation.
- [CHANGE] File `examples/general/SRL/grammar.rb added names to each production rule.
- [CHANGE] File `examples/general/SRL/ast_builder.rb Code refactoring to take profit of rule naming.
- [CHANGE] Simple Regex Language is almost fully supported!...
- [CHANGE] File `examples/general/SRL/grammar.rb added missing rule productions for Simple Regex Language.
- [CHANGE] File `examples/general/SRL/ast_builder.rb Added transformation rules missing regular expressions features.
- [CHANGE] File `examples/general/SRL/spac/integration_spec.rb Added tests for covering SRL.
- [NEW] File `examples/general/SRL/lib/anchor.rb Added support for anchors in regular expressions.
- [NEW] File `examples/general/SRL/lib/capturing_group.rb Added support for single character in regular expressions.
- [NEW] File `examples/general/SRL/lib/lookaround.rb Added support for lookaround in regular expressions.
- [NEW] File
left.rb
added inexamples/general
folder for showing use of left-recursive rules. - [NEW] File
right.rb
added inexamples/general
folder for showing use of right-recursive rules (less performant). - [NEW] File `examples/general/SRL/lib/alternation.rb Added support for alternation in regular expressions (|).
- [NEW] File `examples/general/SRL/lib/character.rb Added support for single character in regular expressions.
- [NEW] File `examples/general/SRL/lib/char_class.rb Added support for character class in regular expressions.
- [NEW] File `examples/general/SRL/lib/shorthand.rb Added support for character class shorthand in regular expressions.
- [NEW] File `examples/general/SRL/lib/concatenation.rb Added support for concatenation in regular expressions.
- [NEW] File `examples/general/SRL/lib/non_capturing_group.rb Added support for non-capturing groups in regular expressions.
- [NEW] File `examples/general/SRL/lib/wildcard.rb Added support for wilcards in regular expressions.
- [CHANGE] File `examples/general/SRL/grammar.rb increased coverage of Simple Regex Language parser.
- [CHANGE] File `examples/general/SRL/ast_builder.rb Added transformation rules for constructing regular expressions.
- [CHANGE] File `examples/general/SRL/spac/integration_spec.rb Added tests for SRL expressions.
- [FIX] Added an custom
inspect
method to several core classes. This was necessary because default implementation from Ruby got lost with object graphs.
- [CHANGE] Dir `examples/general/SRL/ Added support for digit range to Simple Regex Language parser.
- [CHANGE] Dir `examples/general/SRL/ Added support for letter range to Simple Regex Language parser.
- [NEW] Dir `examples/general/SRL/ Added an initial version of the Simple Regex Language parser. Supports the SRL quantifier syntax only.
- [FIX] Method
ParseTreeBuilder::place_TOS_child
was sometimes fooled when argumentaNode
was nil. - [FIX] Method
BaseParser::initialize
missing parameter name in doc caused a YARD warning. - [FIX] Method
GrmItemsBuilder::build_dotted_items
missing parameter name in doc caused a YARD warning. - [FIX] Method
NonTerminalVertex::initialize
missing parameter name in doc caused a YARD warning.
- [NEW] File
benchmark_mini_en.rb
added inexamples/NLP
folder for parsing performance measurements. - [CHANGE] Demo calculator in
examples/general/calc_iter2
: added support for log10 and cbrt functions. README.md slightly reworked. - [FIX] File
README.md
sample code was broken by changes in 0.5.06 (thanks to arjunmenon for pointing this).
- [CHANGE] Demo calculator in
examples/general/calc_iter2
does much than the basic arithmetic operators, it now
support trigonometric functions and their inverse, square root, exponential and natural logarithm functions!. - [CHANGE] Internal module re-organization. New module
Base
, moduleTokens
renamed toLexical
. - [CHANGE] Improved YARD Documentation for 10+ classes.
- [FIX] Method
GFGParsing#call_rule
didn't handle properly the case of nullable symbols appearing in more than one production rule. - [New] New calculator example. In addition to the basic arithmetic operators (+, -, *, /) it accepts the unary minus and the exponentiation operator. As a convenience it displays both CST and AST parse representations.
- [CHANGE] Method
ParseWalkerFactory#build_walker
added one argument that controls the way the visit when reaching anew an end vertex. - [CHANGE] Method
ParseWalkerFactory#visit_entry
when re-visit an end vertex, the jump to related start vertex is now conditional. - [CHANGE] File
parse_walker_factory_spec.rb
Added test to validate the different ways to walk over the parse entries. - [CHANGE] Class
GrmFlowGraph
: Added more documentation. - [CHANGE] Class
Vertex
: Documentation refined.
- [Fix] Method GrmFlowGraph#traverse_df code terminated prematurely with nested call edges.
- [CHANGE] Method Grammar#name_production: suffix in default production name is changed (e.g. 'expression[3]' changed to expression_3)
- [CHANGE] Refactoring code style to please Rubocop 0.50.0
- [CHANGE] File
.rubocop.yml
: Disabling heredoc cop because it produces false negatives - [FIX] File
examples/general/calc_iter1/calc_ast_builder.rb
. Method CalcASTBuilder#new_leaf_node used old signature. Fixed
- [NEW] Addedsupport for ASTs (Abstract Syntax Tree)
- [CHANGE] File
examples/data_formats/JSON/JSON_demo.rb
Added New command-line switches for details use --help option - [CHANGE] File
examples/general/calc_iter1/calc_demo.rb
Calculator now computes the value of a parsed expression
- [CHANGE] File
appveyor.yml
: Added Ruby 2.4 build environment in Appveyor CI
- [CHANGE] Concrete Syntax tree generation re-designed in prevision of customized tree generation.
- [NEW] Class
Parser::CSTBuilder
Builder class that creates Concrete Syntax (parse) Tree.
- [FIX] File
/spec/spec_helper.rb
replaced deprecated syntax forSimpleCov::Formatter::MultiFormatter
construction - [NEW] File
examples/data_formats/JSON/json_minifier.rb
Added a working JSON minifier to the demo app. - [NEW] Class
Syntax::Production
Each production can have a name. - [CHANGE] File
.travis.yml
: removal of Rubinius (rbx) in the list of Ruby versions. - [CHANGE] DRYing the classes
ParseTreeFactory
andParseForestFactory
by inheriting fromParseRepCreator
- [CHANGE] Minor documentation updates.
- [FIX] To avoid Fixnum deprecation error in Ruby 2.4 and higher, all explicit references to Fixnum has been removed.
- [FIX] File
.rubocop.yml
: folderexamples
was excluded from Rubocop control. Now it is in code analysis scope. - [NEW] File
spec/.rubocop.yml
to tune the code analysis for Rspec files - [NEW] File
examples\.rubocop.yml
to tune the code analysis for example files - [CHANGE] Code re-styling to please Rubocop 0.49.0: less than 10 offences remain (from above 200 count!)
- [CHANGE] Added support for Ruby 2.4.x. Files
.travis.yml
andREADME.md
updated.
- [FIX] File
formatter/asciitree.rb
fixed inconsistency in comments that caused Yard warnings. - [FIX] File
formatter/bracket_notation.rb
fixed inconsistency in comments that caused Yard warnings. - [FIX] File
parser/parse_entry_set.rb
fixed inconsistency in comments that caused Yard warnings. - [NEW] Method
Grammar#diagnose
performs a number of checks on the grammar. It detects whether:
there are undefined non-terminals (i.e. non-terminals without a rule that define them) there are non-productive non-terminals (i.e. non-terminals that don't derive a sting of terminals) there are nullable productions and non-terminals. - [NEW] Method
GrmFlowGraph#traverse_df
performs depth-first traversal of the GFG. - [NEW] Method
GrmFlowGraph#diagnose
determines which terminals are reachable from the start symbol. - [NEW] Method
GrmSymbol#generative?
inidcates whether the grammar symbol can produce a sequence of terminals. - [CHANGE] Class
GrammarBuilder
Improved the API documentation.
- [CHANGE] File
README.md
Added documentation on how to build parse trees and manipulate them. - [CHANGE] File
examples/NLP/mini_en_demo.rb
now emits different parse tree representations. - [NEW] Directory
www
. Contains a diagram output produced from Rley and fed to online RSyntaxTree tool.
- [NEW]
Asciitree
formatter class. Allows parse tree output in simple printable text. - [CHANGE] Major enhancements in directory
examples\data_formats\JSON
. The demo command-line tool parses JSON and outputs the parse tree in one of the supported formats.
- [FIX] File
rley.rb
reference to obsoleteEarleyParser
class removed. - [NEW]
BracketNotation
formatter class. Allows parse tree output in Labelled Bracket Notation. - [CHANGE] Code refactoring in directory
examples\data_formats\JSON
. The demo command-line tool parses JSON and converts it into LBN (Labelled Bracket Notation). There are two diagrams (in SVG format) generated from the LBN output.
- [NEW] Module re-organization for clearer dependencies: Classes
Token
andTokenRange
are moved to a separate moduleTokens
. - [CHANGE] Code, specs, examples and
README.md
adapted to reflect the module re-organization.
- [NEW] File
appveyor.yml
. Add AppVeyor CI to Github commits. AppVeyor complements Travis by running builds under Windows OS. This permits to test the portability across operating systems. - [CHANGE] File
README.md
Added AppVeyor badge. - [CHANGE] File
rley.gemspec
drop support for Ruby 1.9.3. Lowest supported Ruby version is now 2.0.0. - [CHANGE] File
.travis.yml
updated list of Ruby versions to use by Travis CI
- [CHANGE] Error reporting is vastly changed. Syntax errors don't raise exceptions.
parse error can be retrieved via an
ErrorReason
object. Such an object is returned by the methodGFGParsing#failure_reason
method. - [CHANGE] File
README.md
updated to reflect the new error reporting. - [CHANGE] Examples updated to reflect the new error reporting.
- [NEW] Directory
examples\general\calc
. A simple arithmetic expression demo parser.
- [NEW] Directory
examples\data_formats\JSON
. A JSON demo parser.
- [NEW] Method
ParseForest#ambiguous?
. Indicates whether the parse is ambiguous. - [CHANGE] File
README.md
updated with new grammar builder syntax & typo fixes. - [CHANGE] Method
GrammarBuilder#initialize
: Accepts a block argument that allows lighter construction.
- [CHANGE] File
README.md
fully rewritten and added an example. - [CHANGE] Directory
examples
completely reorganized.
- [CHANGE] File
README.md
fully rewritten and added an example. - [CHANGE] Directory
examples
completely reorganized.
- [FIX] Method
ParseWalkerFactory#select_antecedent
did not support alternative nodes creation when visiting an item entry for highly ambiguous parse. - [FIX] Method
ParseWalkerFactory#select_antecedent
did not manage properly call/return stack for alternative nodes created when visiting an item entry for highly ambiguous parse.
- [FIX] The sharing a of forest node could be repeated in a production in a revisit event.
- [CHANGE] Method
ParseWalkerFactory#process_end_entry
. Added a guard condition to avoid repeated node sharing - [NEW] RSpec file
ambiguous_parse_spec.rb
added in order to test the fix.
- [FIX] There were missing links to shared parse forest nodes for ambiguous parses.
- [NEW] RSpec file
ambiguous_parse_spec.rb
added in order to test the parse forest building for an ambiguous parse. - [CHANGE] Attribute
ParseWalkerContext#nterm2start
: previous implementation assumed -wrongly- that for each non terminal there was only one start entry. Now this attribute uses nested hashes as data structure in order to disambiguate the mapping. - [CHANGE] Method
ParseWalkerFactory#visit_entry
updated to reflect change in theParseWalkerContext#nterm2start
attribute. - [CHANGE] Method
ParseWalkerFactory#visit_entry
now emits an event if an item entry is re-visited (previously, no such event were generated)
- [CHANGE] Code re-styling to please Rubocop 0.45.0: only 2 offences remain (from a few hundreds!)
- [FIX] File
state_set_spec.rb
: Failing mock tests. Revertedexpect
toallow
expectations.
- [FIX] File
parse_forest_factory_spec.rb
: Commented out reference to local files. - [FIX] Files
*_spec.rb
: Replaced mostallow
expectations byexpect
- [CHANGE] Updated development dependency upon RSpec version 3.5
- [FIX] Method
ParseWalkerFactory#visit_entry
didn't generate events for entries with start vertex. This caused issue in parse forest generation. - [NEW] File
parse_forest_builder_spec.rb
: added more parse forest building tests. - [CHANGE] Method
ParseWalkerFactory#antecedent_of
. Code refactoring. - [CHANGE] Method
ParseForestBuilder#receive_event
. Code refactoring.
- [CHANGE] Method
ParseWalkerFactory#build_walker
. Signature change in order prevent direct dependency onGFGParsing
class. - [CHANGE] Class
ParseForestBuilder
. Removal ofparsing
attribute, no direct dependency onGFGParsing
class. - [CHANGE] Internal changed to
ParseForestFactory
class.
- [CHANGE] Many new classes. The gem bundles a second parser that copes with ambiguous grammars.
- [CHANGE] A lot of internal changes. This is the last version before a Grammar Flow Graph-based parsing implementation.
- [FIX] Method
StateSet#ambiguities
overlooked some ambiguities in parse sets.
- [NEW] method
Parsing#ambiguous?
returns true if more than one successful parse tree can be retried from parse results. - [CHANGED] method
Parsing#success?
. New implementation that relies on start symbol derivation. - [NEW] New method
Chart#start_symbol
added. Returns the start symbol of the grammar. - [NEW] New method
StateSet#ambiguities
added. Returns the parse sets that are ambiguous (= distinct derivation for same input tokens). - [FIX] In special cases the parsing didn't work correctly when there more than one production rule for the start symbol of a grammar.
- [FIX] In special cases the parsing didn't work correctly when there more than one production rule for the start symbol of a grammar.
- [CHANGE] Code re-formatted to please Rubocop 0.34.0
- [CHANGE] File
.travis.yml
: added new Rubies: MRI 2.2.0 and JRuby 9.0. - [CHANGE] File
rley.gemspec
: Upgraded gem versions in development dependencies - [CHANGE] File
Gemfile
: Upgraded gem versions in development dependencies
- [CHANGE] Code re-formatted to please Rubocop 0.32.0
- [FIX] File
.rubocop.yml
: disable some cop settings that were too loud.
- [NEW] Added folder with JSON demo parser under
examples\parsers\demo-JSON
.
- [NEW] Rake file added in
examples
folder. It allows to run all the examples at once.
- [FIX] Method
EarleyParser#handle_error
portability issue between Ruby versions.
- [NEW] Class
EarleyParser
implements a crude error detection mechanism. A syntax error causes an exception to be raised. - [CHANGE] Examplar file
parsing_err_expr.rb
: demo error message.
- [NEW] Class
ParseTracer
that helps to trace the parse steps (similar the trace format in NLTK). - [CHANGE] Method
EarleyParser#parse
takes a trace level argument.
- [FIX] File
.rubocop.yml
: removal of setting for obsolete EmptyLinesAroundBody cop. - [CHANGE] Source code re-formatted to please Rubocop 0.29.
- [CHANGE] File
README.md
added licensing badge (MIT license)
- [NEW] Examplar file
parsing_L1.rb
: demo using a (highly simplified) English grammar. - [NEW] Examplar file
parsing_amb.rb
: demo using an ambiguous grammar. - [FIX] Method
Parsing#parse_tree
now produces correct parse trees for all the examples.
- [CHANGE] File
.rubocop.yml
: AbcMetric setting relaxed. - [CHANGE] Fixed most style offenses reported by Rubocop.
Version number bump: major re-design of the parse tree generation.
- [NEW] Class
ParseTreeBuilder
: builder for creating parse tree. - [NEW] Class
ParseStateTracker
: helper class used in parse tree generation. - [NEW] Examplar file
parsing_L0.rb
: demo using a (highly simplified) English grammar. - [CHANGE] Class
ParseTree
: construction methods removed. - [CHANGE] Method
Parsing#parse_tree
completely rewritten. - [FIX] Method
Parsing#parse_tree
now handles situations where there are multiple complete parse states for a non-terminal.
- [FIX] Fixed
Parsing#parse_tree
: code couldn't cope with parse state set containing more than one parse state that expected the same symbol. - [NEW] Added one more parser example (for very basic arithmetic expression)
- [FIX] Fixed all but one YARD (documentation) warnings. Most of them were due to mismatch in method argument names between source code and documentation.
- [CHANGE] File
README.md
added Gemnasium badge (for the gem dependency checks)
- [CHANGE] Added more examples in
examples
folder (e.g. parsing then parse tree ). - [CHANGE] File
rley.rb
: added more requires of the library to ease integration.
- [CHANGE] Source code refactored to please Rubocop (0.28.0)
- [CHANGE] File
.rubucop.yml
Disabled VariableNam style cop.
- [CHANGE] File
README.md
added coveralls badge (for the test coverage)
- [NEW] Added development dependency on 'coveralls' gem (for test coverage measurement)
- [NEW] New parse tree formatting class
JSON
for parse tree rendition in JSON. - [FIX] Method
Parsing#parse_tree
now add link to Token object for last TerminalNode in tree.
- [NEW] New parse tree formatting classes
BaseFormatter
andDebug
- [CHANGE] Method
Parsing#parse_tree
now add links to Token objects in TerminalNodes.
- [CHANGE] File
parse_tree_visitor_spec.rb
. Added step-by-step test of a parse tree visit.
- [NEW]
ParseTreeVisitor
class. A class that walks through a parse tree. - [NEW] Method
accept
added toParseTree
,TerminalNode
,NonTerminalNode
classes.
- [CHANGE] Upgraded code & spec files to reach 100% code coverage again.
- [CHANGE] Restaured test coverage to above 99%
- [CHANGE] Bumped version number: it is the first version able to generate a parse tree.
- [NEW]
Grammar#name2symbol
attribute and accessor. Retrieve a grammar symbol from its name. - [NEW] Methods
DottedItem#prev_symbol
,DottedItem#prev_position
to find symbol on left of dot. - [NEW] Method
ParseState#precedes?
, predicate to check whether self is a predecessor of given parse state. - [NEW] Method
Parsing#parse_tree
returns a ParseTree object that represents the result of a parse.
- [CHANGE]
EarleyParser#parse
: Optimization prevent repeated prediction of same non-terminal for same state set. - [CHANGE] File
earley_parser_spec.rb
: Added new test for nullable grammar. - [CHANGE] Style refactoring in classes
EarleyParser
,StateSet
,Grammar
,NonTerminal
- [CHANGE] File
earley_parser_spec.rb
: Added step-by-step test of ambiguous grammar parsing.
- [NEW] Method
DottedItem#to_s
Returns a text representation of an instance. - [NEW] Method
ParseState#to_s
- [NEW] Method
GrmSymbol#to_s
- [NEW] Method
VerbatimSymbol#to_s
- [CHANGE] File
earley_parser_spec.rb
: Parse tests refactored.
- [FIX]
EarleyParser
class source code was out-of-sync.
- [NEW]
EarleyParser
now supports grammar with empty productions (i.e. nullable nonterminals). - [CHANGE] (private) method
EarleyParser#prediction
updated with Ayock-Horspool improvement. - [CHANGE] Moved class
DottedItem
under theParser
module.
- [NEW] (private) method
Grammar#compute_nullable
added. - [CHANGE]
Grammar#initialize
constructor calls the methodGrammar#compute_nullable
- [CHANGE] Classes
Terminal
andNonTerminal
added new method nullable? - [CHANGE] File
earley_parser_spec.rb
: Added spec with ambiguous grammar.
- [CHANGE] Usage of
GrammarBuilder
simplified: the call to methodGrammarBuilder#add_non_terminal
isn't necessary. Method is removed - [CHANGE] Updated the
examples
folder accordingly.
- [NEW] New folder
examples
added with two examples of grammar creation
- [NEW] New class
GrammarBuilder
added and tested, its purpose is to simplify the construction of grammars.
- [CHANGE]
EarleyParser#parse
method: Initial API documentation. - [INFO] This version was committed to force Travis CI to execute a complete build failed because Travis couldn't connect to GitHub)
- [CHANGE] spec file of
EarleyParser
class: Test added. Parser works with simple expression grammar.
- [CHANGE] File
README.md
: Added roadmap section. - [FIX]
EarleyParser#parse
: prevent call toscanning
method after last token encountered.
- [CHANGE] Code re-styling to please Rubocop 0.27.0 (less than 10 offenses).
- [CHANGE] Class
DottedItem
moved toRley
module.
- [CHANGE] File
README.md
: Added gem version badge.
- [CHANGE] File
README.md
: Added Travis CI badge.
- [CHANGE] Rley is "gemmified"!
- [FEATURE] Initial public working version