NAME

MarpaX::Languages::ECMAScript::AST::Impl - Implementation of Marpa's interface

VERSION

version 0.020

SYNOPSIS

    use strict;
    use warnings FATAL => 'all';
    use MarpaX::Languages::ECMAScript::AST::Impl;

    my $marpaImpl = MarpaX::Languages::ECMAScript::AST::Impl->new();

DESCRIPTION

This modules implements all needed Marpa calls using its Scanless interface. Please be aware that logging is done via Log::Any.

SUBROUTINES/METHODS

new($class, $grammarOptionsHashp, $recceOptionsHashp)

Instantiate a new object. Takes as parameter two references to hashes: the grammar options, the recognizer options. In the recognizer, there is a grammar internal option that will be forced to the grammar object. If the environment variable MARPA_TRACE_TERMINALS is set to a true value, then internal Marpa trace on terminals is activated. If the environment MARPA_TRACE_VALUES is set to a true value, then internal Marpa trace on values is activated. If the environment variable MARPA_TRACE is set to a true value, then both terminals and values internal Marpa traces are activated.

Please note that Marpa::R2::Scanless:G grammar object are systematically cached or reuse.

No Marpa::R2::Scanless:R recognizer will be created, but $recceOptionsHashp is nevertheless kept for further see (see method make_R()).

make_R($self)

Creates a Marpa::R2::Scanless::R recognizer object and store it together with the grammar.

destroy_R($self)

Destroy an eventual Marpa::R2::Scanless::R recognizer object stored together with the grammar.

value($self)

Returns Marpa's recognizer's value.

read($self, $inputp)

Returns Marpa's recognizer's read. Argument is a reference to input.

resume($self)

Returns Marpa's recognizer's resume.

last_completed($self, $symbol)

Returns Marpa's recognizer's last_completed for symbol $symbol.

last_completed_range($self, $symbol)

Returns Marpa's recognizer's last_completed_range for symbol $symbol.

range_to_string($self, $start, $end)

Returns Marpa's recognizer's range_to_string for a start value of $start and an end value of $end.

event($self, $eventNumber)

Returns Marpa's recognizer's event for event number $eventNumber.

events($self)

Returns Marpa's recognizer's events.

pause_lexeme($self)

Returns Marpa's recognizer's pause_lexeme.

pause_span($self)

Returns Marpa's recognizer's pause_span.

literal($self, $start, $length)

Returns Marpa's recognizer's literal.

line_column($self, $start)

Returns Marpa's recognizer's line_column at eventual $start location in the input stream. Default location is current location.

substring($self, $start, $length)

Returns Marpa's recognizer's substring corresponding to g1 span ($start, $length).

lexeme_read($self, $lexeme, $start, $length, $value)

Returns Marpa's recognizer's lexeme_read for lexeme $lexeme, at start position $start, length $length and value $value.

current_g1_location($self)

Returns Marpa's recognizer's current_g1_location.

g1_location_to_span($self, $g1)

Returns Marpa's recognizer's g1_location_to_span for a g1 location $g1.

terminals_expected($self)

Returns Marpa's recognizer's terminals_expected.

show_progress($self)

Returns Marpa's recognizer's show_progress.

progress($self)

Returns Marpa's recognizer's progress.

grammar($self)

Returns a Marpa::R2::Scanless::G object of this grammar.

G($self)

Alias of the grammar() method.

recce($self)

Returns a Marpa::R2::Scanless::R object of this grammar.

R($self)

Alias of the recce() method.

rule_ids($self, $subgrammar)

Returns Marpa's grammar's rule_ids.

rule_expand($self, $ruleId)

Returns Marpa's grammar's rule_expand.

symbol_name($self, $symbolId)

Returns Marpa's grammar's symbol_name.

SEE ALSO

Marpa::R2::Scanless::G

Marpa::R2::Scanless::R

AUTHOR

Jean-Damien Durand <jeandamiendurand@free.fr>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Jean-Damien Durand.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.