Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Documentation

  • Loading branch information...
commit 3a9d6d24e3899c1c70ab50734a493696fafc8b93 1 parent e086913
Jeffrey Kegler authored

Showing 1 changed file with 52 additions and 0 deletions. Show diff stats Hide diff stats

  1. +52 0 r2/pod/Changes.pod
52 r2/pod/Changes.pod
Source Rendered
@@ -31,6 +31,58 @@ and tools to Marpa::R2.
31 31
32 32 =head1 CHANGES
33 33
  34 +=head2 Null actions now come from the rules
  35 +
  36 +In Marpa::XS null actions were specified by symbol.
  37 +This created a dual semantics -- one for non-nulled rules,
  38 +and another for nulled rules. The conventions and
  39 +behaviors of the two semantics were quite dissimilar.
  40 +The rules for their coordination were complicated,
  41 +and it was possible for a programmer
  42 +expecting one semantics, to be surprised by a result from
  43 +the other.
  44 +
  45 +In Marpa::R2 the semantics of nulled rules is the same
  46 +as that of non-nulled rules,
  47 +and the semantics of nulled symbols comes from the semantics
  48 +of the nulled rules.
  49 +This requires rule evaluation closures to be aware
  50 +they might be called for nulled rules.
  51 +But it greatly simplifies the semantics conceptually.
  52 +
  53 +=head2 Actions can now be constants
  54 +
  55 +If an action name resolves to a constant, that constant is the action.
  56 +The effect is the same as if the action name resolved to a function
  57 +that returned the same constant, except that it is more efficient.
  58 +
  59 +Perl cannot reliably distinguish between non-existent symbols and symbols
  60 +whose value is C<undef>, so constants whose value C<undef> are not allowed.
  61 +The C<::undef> reserved action name can be used instead.
  62 +
  63 +=head2 Actions names beginning with "C<::>" are reserved
  64 +
  65 +Action names which start with "C<::>" are reserved.
  66 +"C<::whatever>" explicitly requests "whatever" semantics.
  67 +"C<::undef>" is a safe way of specify a constant whose
  68 +value is C<undef>.
  69 +Use of a reserved name which has not yet been defined causes
  70 +an exception to be thrown.
  71 +
  72 +=head2 The "default_null_value" named argument for grammars has been removed
  73 +
  74 +Symbols no longer have null values, so the "default_null_value"
  75 +named argument of grammars has been removed.
  76 +
  77 +=head2 The "symbols" named argument for grammars has been removed
  78 +
  79 +In Marpa::XS the "symbols" named argument was used to specify null
  80 +values for symbols. It was also an alternate way of marking symbols
  81 +as terminals. Symbols no longer have null values and, as an alternate
  82 +and more cumbersome way to marking terminals is not worth cluttering
  83 +the documentation. Use of the "symbols" named argument now causes
  84 +an exception.
  85 +
34 86 =head2 The token value argument of read() has changed
35 87
36 88 The Marpa::R2 recognizer's read() method differs from its Marpa::XS

0 comments on commit 3a9d6d2

Please sign in to comment.
Something went wrong with that request. Please try again.