Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Work on Perl parser: t+
  • Loading branch information
Jeffrey Kegler authored and Jeffrey Kegler committed Jul 22, 2012
1 parent d399939 commit 9b611d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion r2/pperl/Marpa/R2/Perl.pm
Expand Up @@ -486,6 +486,8 @@ my %symbol_name = (

my %perl_type_by_cast = (
q{\\} => 'REFGEN',
q{*} => 'ASTERISK',
q{&} => 'AMPERSAND',
q{$} => 'DOLLAR',
q{@} => 'ATSIGN',
q{%} => 'PERCENT',
Expand Down Expand Up @@ -1135,6 +1137,7 @@ sub read_PPI_token {
my $PPI_type = ref $token;
return 1 if $PPI_type eq 'PPI::Token::Whitespace';
return 1 if $PPI_type eq 'PPI::Token::Comment';
return 1 if $PPI_type eq 'PPI::Token::Pod';

my $perl_type = undef;

Expand Down Expand Up @@ -1318,6 +1321,7 @@ sub read_PPI_token {

if ( $PPI_type eq 'PPI::Token::Number'
or $PPI_type eq 'PPI::Token::Number::Float'
or $PPI_type eq 'PPI::Token::Magic'
or $PPI_type eq 'PPI::Token::Number::Version' )
{
my $content = $token->{content};
Expand All @@ -1333,7 +1337,8 @@ sub read_PPI_token {

if ( $PPI_type eq 'PPI::Token::Quote::Single'
or $PPI_type eq 'PPI::Token::Quote::Double'
or $PPI_type eq 'PPI::Token::Regexp::Match' )
or $PPI_type eq 'PPI::Token::Regexp::Match'
or $PPI_type eq 'PPI::Token::Magic')
{
my $content = $token->{content};
defined $recce->alternative( 'THING', \$content )
Expand Down
2 changes: 1 addition & 1 deletion r2/ucurly.pl
Expand Up @@ -64,7 +64,7 @@ sub linecol {
say join q{ }, ( '=' x 20 ), linecol( $tokens->[$start] ), 'to',
linecol( $tokens->[$end] ), ( '=' x 20 );
say map { $_->content() } @{$tokens}[ $start .. $end ];
find_curly($parser, $start, $end);
# find_curly($parser, $start, $end);
$next_start = $end + 1;
} ## end PERL_CODE: while (1)

Expand Down

0 comments on commit 9b611d8

Please sign in to comment.