Language::Basic::Expression 1.44 reviewDownload
Language::Basic::Expression is a Perl package to handle string, numeric, and boolean expressions. SYNOPSIS See Language::Basic
Language::Basic::Expression is a Perl package to handle string, numeric, and boolean expressions.
See Language::Basic for the overview of how the Language::Basic module works. This pod page is more technical.
# Given an LB::Token::Group, create an expression I parse it
my $exp = new LB::Expression::Arithmetic $token_group;
# What's the value of the expression?
# Perl equivalent of the BASIC expression
Expressions are basically the building blocks of Statements, in that every BASIC statement is made up of keywords (like GOTO, TO, STEP) and expressions. So expressions include not just the standard arithmetic and boolean expressions (like 1 + 2), but also lvalues (scalar variables or arrays), functions, and constants. See Language::Basic::Syntax for details on the way expressions are built.
BASIC expressions are represented by various objects of subclasses of Language::Basic::Expression. Most LB::Expressions are in turn made up of other LB::Expressions. For example an LBE::Arithmetic may be made up of two LBE::Multiplicative and a "plus". "Atoms" (indivisible LBE's) include things like LBE::Constants and LBE::Lvalues (variables).
Language::Basic::Expression 1.44 search tags