Why not adopt me?
NAME
Gentoo::Dependency::AST::State - Temporal Tree State controller
VERSION
version 0.001001
METHODS
state
Return the current state object.
This is -1
on the stack
array.
$state
->state;
add_dep
$state
->add_dep(
$depstring
);
Tell current state controller $state->state
that a literal dependency $depstring
has been seen.
$state
->add_dep(
"dev-lang/perl"
);
→
$dep_object
= ::Node::Dependency->new(
depstring
=>
"dev-lang/perl"
);
→
$state
->state->add_dep(
$state
,
$dep_object
);
enter_notuse_group
$state
->enter_notuse_group(
$useflag
)
Tell current state controller $state->state
that a negative useflag($useflag
) group opener has been seen.
$state
->enter_notuse_group(
"aqua"
);
→
$group_object
= ::Node::Group::NotUse->new(
useflag
=>
"aqua"
);
→
$state
->state->enter_notuse_group(
$state
,
$group_object
);
enter_use_group
$state
->enter_use_group(
$useflag
)
Tell current state controller $state->state
that a useflag($useflag
) group opener has been seen.
$state
->enter_use_group(
"qt4"
);
→
$group_object
= ::Node::Group::Use->new(
useflag
=>
"qt4"
);
→
$state
->state->enter_use_group(
$state
,
$group_object
);
enter_or_group
$state
->enter_or_group()
Tell current state controller $state->state
that an or
group opener has been seen.
$state
->enter_or_group();
→
$group_object
= ::Node::Group::Or->new();
→
$state
->state->enter_or_group(
$state
,
$group_object
);
enter_and_group
$state
->enter_and_group()
Tell current state controller $state->state
that an and
group opener has been seen.
$state
->enter_and_group();
→
$group_object
= ::Node::Group::And->new();
→
$state
->state->enter_and_group(
$state
,
$group_object
);
exit_group
$state
->exit_group()
Tell current state controller $state->state
that a group exit has been seen.
$state
->exit_group();
→
$state
->state->exit_group();
ATTRIBUTES
stack
Contains an ARRAYREF
of all the states.
Starts off as:
[ Gentoo::Dependency::AST::Node::TopLevel->new() ]
PRIVATE METHODS
_pushstack
Set $element
as the new parse state, by pushing it on to the stack.
$state
->_pushstack(
$element
);
_popstack
Remove the top element from the stack, deferring control to its parent.
$discarded
=
$state
->_popstack();
AUTHOR
Kent Fredric <kentfredric@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Kent Fredric <kentfredric@gmail.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.