Class Index | File Index

Classes


Class Expression

Represents Parser Object
Defined in: parser01.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Expression(src)
Mathematic Expression Parser Object
Method Summary
Method Attributes Method Name and Description
 
Parse Expression
expression = term, {('+' | '-'), term};
 
Parse Factor
factor = ('(', expression, ')') | real | integer;
 
Parse Integer
integer = ['-'], digit, {digit};
 
real()
Parse Real
real = ((integer, '.
 
run(src, match, parser)
Runner for Expression
 
term()
Parse Term
term = factor, {('*' | '/'), factor};
Class Detail
Expression(src)
Mathematic Expression Parser Object
Parameters:
{String} src
source string
Since:
0.1
Method Detail
{Float} expression()
Parse Expression
expression = term, {('+' | '-'), term};
Since:
0.1
Returns:
{Float} calculated value

{Float} factor()
Parse Factor
factor = ('(', expression, ')') | real | integer;
Since:
0.1
Returns:
{Float} calculated value

{Float} integer()
Parse Integer
integer = ['-'], digit, {digit};
Since:
0.1
Returns:
{Float} calculated value

{Float} real()
Parse Real
real = ((integer, '.') | (('.', digit)), {digit};
Since:
0.1
Returns:
{Float} calculated value

{Float} run(src, match, parser)
Runner for Expression
Parameters:
{String} src
source string
match
parser
Since:
0.1
Returns:
{Float} calculated value

{Float} term()
Parse Term
term = factor, {('*' | '/'), factor};
Since:
0.1
Returns:
{Float} calculated value

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Jan 10 2014 19:00:18 GMT+0900 (JST)