Permalink
Commits on Feb 22, 2012
  1. Add a GrammarMethods#parse_file method.

    While the parse method already accepts Pathname instances and the
    like, some users might prefer making explicit the fact that they
    want to parse from a file. A Pathname instance is automatically
    created if needed.
    blambeau committed Feb 21, 2012
  2. Add Match#source as a shortcut for input.source.

    This method allows locating the original parsed source during the
    production of semantic values. It is roughly a shortcut for
    `input.source` but is robust to situations where matches would be
    created with strings (such as in the tests).
    blambeau committed Feb 22, 2012
  3. Let Input support multiple sources of parsed text.

    This commit makes the Input class supporting various text sources,
    such as a String, a Path, a File, etc. The real source passed at
    construction is kept under @source for traceability.
    
    Common rubyisms are used to recognize those sources. In particular,
    Pathname instances will be recognized through respond_to?(:to_path),
    which is standard in ruby 1.9.x. Files and IO are recognized through
    :read. Strings and StringIO through :to_str.
    blambeau committed Feb 21, 2012
  4. Keep input instead of string in Match.

    For traceability of matches inside the parsed string, we now keep
    the Input instance instead of the source text in matches. This is
    transparent for the Match class, as it simply expects its input to
    behave like a String (to_str). That method has been added to Input
    accordingly.
    blambeau committed Feb 21, 2012
Commits on Feb 21, 2012
  1. Keep a master offset in Match instead of slicing.

    Instead of successively slicing strings in matches, we keep the
    parsed text under @source, and an offset in the later in @offset.
    
    Btw, that @offset might be very useful for keeping trace of the
    localisation of the match in the source text (e.g. for subsequent
    semantic passes; semantic error detection for instance).
    blambeau committed Feb 21, 2012
Commits on Dec 29, 2011
  1. Better definition of super keyword

    Fixes #36.
    committed Dec 29, 2011
Commits on Nov 4, 2011
  1. Version 2.4.1

    committed Nov 4, 2011
  2. Updated CHANGES

    committed Nov 4, 2011
Commits on Nov 1, 2011
  1. Merge pull request #35 from mwilden/master

    Rename README
    committed Nov 1, 2011
  2. Rename README in gemspec

    mwilden committed Nov 1, 2011
Commits on Oct 27, 2011
  1. Updated CHANGES

    committed Oct 27, 2011
  2. Allow rule names to begin with super*

    Fixes #24
    committed Oct 27, 2011
  3. Updated copyright/license

    committed Oct 27, 2011
Commits on Aug 29, 2011
  1. Merge pull request #27 from kylc/master

    Fix an old examples link in the README
    committed Aug 29, 2011
Commits on Jul 22, 2011
Commits on Jul 17, 2011
  1. Fixed an old link in the README.

    kylc committed Jul 17, 2011
Commits on Jul 11, 2011
  1. Fixed bad example

    committed Jul 11, 2011
Commits on Jul 5, 2011
Commits on May 26, 2011
  1. Fixed typo

    committed May 26, 2011
Commits on May 12, 2011
  1. Bumped to version 2.4.0

    committed May 12, 2011
  2. Updated CHANGES

    committed May 12, 2011
  3. Added lib/citrus/grammars.rb

    Also, moved all example grammars and tests into the main library tree so
    that they may easily be used by client code.
    committed May 12, 2011
  4. Don't check for space after {

    Fixes #21
    committed May 12, 2011
Commits on Mar 18, 2011
  1. Added URI example

    committed Mar 18, 2011
Commits on Mar 17, 2011
  1. Added several eql? aliases

    committed Mar 17, 2011
Commits on Feb 20, 2011
  1. Bumped version to 2.3.7

    committed Feb 20, 2011
  2. Added email address example

    committed Feb 20, 2011
  3. Updated CHANGES for 2.3.6

    committed Feb 20, 2011
Commits on Feb 19, 2011
  1. Bumped version to 2.3.6

    committed Feb 19, 2011
  2. Remember to update the input position when restoring a memoized rule …

    …from the cache.
    
    Also update tests to verify this behavior.
    joachimm committed with Feb 12, 2011
Commits on Feb 11, 2011
  1. Add a command that automatically generates empty rules for unimplemen…

    …ted rule references, accessible via command-I
    joachimm committed Feb 11, 2011