MarpaX::ESLIF::Grammar::Symbol::Properties - ESLIF Grammar Symbol Properties
version 3.0.32
use MarpaX::ESLIF; my $eslif = MarpaX::ESLIF->new(); my $data = do { local $/; <DATA> }; my $eslifGrammar = MarpaX::ESLIF::Grammar->new($eslif, $data); my $symbolProperties = $eslifGrammar->symbolProperties(0); my $symbolPropertiesByLevel = $eslifGrammar->symbolPropertiesByLevel(0, 0); __DATA__ # # This is an example of a calculator grammar # :start ::= Expression :default ::= action => do_op symbol-action => do_symbol free-action => do_free # Supported but useless :desc ::= 'Calculator' :discard ::= whitespaces event => discard_whitespaces$ :discard ::= comment event => discard_comment$ event ^Number = predicted Number event Number$ = completed Number Number ::= NUMBER action => ::shift event Expression$ = completed Expression event ^Expression = predicted Expression Expression ::= Number action => do_int | '(' Expression ')' assoc => group action => ::copy[1] || Expression '**' Expression assoc => right || Expression '*' Expression | Expression '/' Expression || Expression '+' Expression | Expression '-' Expression whitespaces ::= WHITESPACES comment ::= /(?:(?:(?:\/\/)(?:[^\n]*)(?:\n|\z))|(?:(?:\/\*)(?:(?:[^\*]+|\*(?!\/))*)(?:\*\/)))/u :lexeme ::= NUMBER pause => before event => ^NUMBER :lexeme ::= NUMBER pause => after event => NUMBER$ :desc ~ 'Calculator Tokens' NUMBER ~ /[\d]+/ name => 'NUMBER Lexeme' WHITESPACES ~ [\s]+ name => 'WHITESPACES Lexeme'
Returns the type, c.f. MarpaX::ESLIF::Symbol::Type
Returns if this is the start symbol
Alias to isStart()
Returns if this is the discard symbol
Alias to isDiscard()
Returns if this is a RHS of a discard rule
Alias to isDiscardRhs()
Returns if this is an LHS
Alias to isLhs()
Returns if this is the first symbol of the grammar
Alias to isTop()
Returns the id
Returns the description
Returns the event before name, null if there is none
Returns if the event before initial state is on, meaningless if there is no event before
Alias to isEventBeforeInitialState()
Returns the event after name, null if there is none
Returns if the event after initial state is on, meaningless if there is no event after
Alias to isEventAfterInitialState()
Returns the event predicted name, null if there is none
Returns if the event predicted initial state is on, meaningless if there is no prediction event
Alias to isEventPredictedInitialState()
Returns the null event name, null if there is none - used internally for ":discard[on]" and ":discard[off]" in particular
Returns the nulled event initial state, meaningless if there is nulled event
Alias isEventNulledInitialState()
Returns the completion event name, null if there is none
Returns the completion event initial state, meaningless if there is no completion event
Alias to isEventCompletedInitialState()
Returns the discard event, null if there is none
Returns the discard event initial state, meaningless if there is no discard event
Alias to isDiscardEventInitialState()
Returns the grammar level to which it is resolved, can be different to the grammar used when this is a lexeme
Returns the symbol priority
Returns the nullable action, null if there is none
Returns the low-level properties (combination of MarpaX::ESLIF::Symbol::PropertyBitSet values)
Returns the low-level events (combination of MarpaX::ESLIF::Symbol::EventBitSet values)
Returns the symbol specific action, null if there is none
Returns the symbol if action, null if there is none
ESLIF Grammar Symbol Properties.
Calls to grammar's currentSymbolProperties() or symbolPropertiesByLevel() methods outputs an instance of this class.
MarpaX::ESLIF::Symbol::Type, MarpaX::ESLIF::Symbol::PropertyBitSet, MarpaX::ESLIF::Symbol::EventBitSet
1;
Jean-Damien Durand <jeandamiendurand@free.fr>
This software is copyright (c) 2017 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.
To install MarpaX::ESLIF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MarpaX::ESLIF
CPAN shell
perl -MCPAN -e shell install MarpaX::ESLIF
For more information on module installation, please visit the detailed CPAN module installation guide.