Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Decapitalize and rewrite a bit
  • Loading branch information
JJ committed Jul 27, 2018
1 parent afd5944 commit be4208a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions doc/Language/grammars.pod6
Expand Up @@ -83,7 +83,7 @@ into effect for the Regex:
say so 'once upon a time' ~~ &space-y; # OUTPUT: «True␤»
=end code
=head1 X<Creating Grammars>
=head1 X<Creating grammars>
=SUBTITLE Group of named regexes that form a formal grammar
L<Grammar|/type/Grammar> is the superclass that classes automatically get when
Expand Down Expand Up @@ -177,7 +177,7 @@ calculator:
All we had to add are additional rule and action to the C<calc-op> group and
the thing works—all thanks to proto regexes.
=head2 Special Tokens
=head2 Special tokens
=head3 X<C<TOP>|TOP>
Expand Down Expand Up @@ -257,7 +257,7 @@ adverb for that particular regex:
This comes in handy when you're already differentiating the proto regexes with the strings
you're going to match, as using C«<sym>» token prevents repetition of those strings.
=head3 X«Always Succeed Assertion| <?>»
=head3 X«"Always succeed" assertion| <?>»
The C«<?>» is the I<always succeed> assertion. When used as a grammar
token, it can be used to trigger an Action class method. In the following
Expand Down Expand Up @@ -409,7 +409,7 @@ attributes can be accessed in the match returned after parsing if made public:
say $<field>».invalid;
# OUTPUT: [(Bool) True]
=head1 X<Action Objects|Actions>
=head1 X<Action objects|Actions>
A successful grammar match gives you a parse tree of L<Match|/type/Match>
objects, and the deeper that match tree gets, and the more branches in the
Expand Down
4 changes: 2 additions & 2 deletions doc/Type/Sub.pod6
Expand Up @@ -36,7 +36,7 @@ operators separate the two parts by white space.
Note that subs that go by the same name as
L<coercers|/language/typesystem#Coercion> will not take precedence over
coercers. To call them use the C<&>-sigil.
them. Use the C<&>-sigil to call them.
sub Int(Str $s){'what?'};
say [Int, Int('42'),&Int('42')];
Expand All @@ -51,7 +51,7 @@ Any sub can be accessed via a closure from any outer scope.
=head1 Traits
X<|trait_mod (declarator)>
A Trait is a sub that is applied at compile time to various objects like
A C<Trait> is a sub that is applied at compile time to various objects like
classes, routines or L<containers|/language/phasers#index-entry-will_trait>. It
is declared with the C<trait_mod> declarator followed by a colon and a string
literal containing the name of the trait. A single positional parameter defines
Expand Down

0 comments on commit be4208a

Please sign in to comment.