GeonextParser

Namespace

JXG.GeonextParser namespce with Parser helper routines. The methods in here are for parsing expressions in Geonext syntax.

Methods

Own

(static) findDependencies(me, term, boardopt)

Finds dependencies in a given term and resolves them by adding the dependent object to the found objects child elements.

Parameters

Name Type Attributes Default Description
me JXG.GeometryElement

Object depending on objects in given term.

term String

String containing dependencies for the given object.

board JXG.Board <optional>
me.board

Reference to a board

Details

Source
parser/geonext.js, line 484

(static) geonext2JS(term, board) → {String}

Converts the given algebraic expression in GEONExT syntax into an equivalent expression in JavaScript syntax.

Parameters

Name Type Description
term String

Expression in GEONExT syntax

board JXG.Board

Returns

Given expression translated to JavaScript.

Type
String

Details

Source
parser/geonext.js, line 405

(static) gxt2jc(term, board) → {String}

Converts the given algebraic expression in GEONExT syntax into an equivalent expression in JessieCode syntax.

Parameters

Name Type Description
term String

Expression in GEONExT syntax

board JXG.Board

Returns

Given expression translated to JavaScript.

Type
String

Details

Source
parser/geonext.js, line 536

(static) replaceIdByObj(term) → {String}

Replaces element ids in terms by element this.board.objects['id'].

Parameters

Name Type Description
term String

A GEONExT function string with JSXGraph ids in it.

Returns

The input string with element ids replaced by this.board.objects["id"].

Type
String

Details

Source
parser/geonext.js, line 373

(static) replaceIf(te) → {String}

Converts expression of the form If(a,b,c) into (a)?(b):(c).

Parameters

Name Type Description
te String

Expression of the form If(a,b,c)

Returns

Converted expression.

Type
String

Details

Source
parser/geonext.js, line 153

(static) replaceNameById(term, board, jcopt) → {String}

Replace an element's name in terms by an element's id.

Parameters

Name Type Attributes Default Description
term String

Term containing names of elements.

board JXG.Board

Reference to the board the elements are on.

jc Boolean <optional>
false

If true, all id's will be surrounded by $(' and ').

Returns

The same string with names replaced by ids.

Type
String

Details

Source
parser/geonext.js, line 243

(static) replacePow(te) → {String}

Converts expression of the form leftop^rightop into Math.pow(leftop,rightop).

Parameters

Name Type Description
te String

Expression of the form leftop^rightop

Returns

Converted expression.

Type
String

Details

Source
parser/geonext.js, line 49

Inherited

none

Details

GeonextParser

Source
parser/geonext.js, line 43