Namespace JXG.GeonextParser
↳ JXG.GeonextParser
Defined in: geonext.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Parser helper routines.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
JXG.GeonextParser.findDependencies(me, term, board)
Finds dependencies in a given term and resolves them by adding the
dependent object to the found objects child elements.
|
<static> |
JXG.GeonextParser.geonext2JS(term, board)
Converts the given algebraic expression in GEONExT syntax into an equivalent expression in JavaScript syntax.
|
<static> |
JXG.GeonextParser.gxt2jc(term, board)
Converts the given algebraic expression in GEONExT syntax into an equivalent expression in JessieCode syntax.
|
<static> |
JXG.GeonextParser.replaceIdByObj(term)
Replaces element ids in terms by element this.board.objects['id'].
|
<static> |
JXG.GeonextParser.replaceIf(te)
Converts expression of the form If(a,b,c) into (a)?(b):(c)/i>.
|
<static> |
JXG.GeonextParser.replaceNameById(term, board, jc)
Replace an element's name in terms by an element's id.
|
<static> |
JXG.GeonextParser.replacePow(te)
Converts expression of the form leftop^rightop into Math.pow(leftop,rightop).
|
Namespace Detail
JXG.GeonextParser
Parser helper routines. The methods in here are for parsing expressions in Geonext Syntax.
Method Detail
<static>
JXG.GeonextParser.findDependencies(me, term, board)
Finds dependencies in a given term and resolves them by adding the
dependent object to the found objects child elements.
- Parameters:
- {JXG.GeometryElement} me
- Object depending on objects in given term.
- {String} term
- String containing dependencies for the given object.
- {JXG.Board} board Optional, Default: me.board
- Reference to a board
<static>
{String}
JXG.GeonextParser.geonext2JS(term, board)
Converts the given algebraic expression in GEONExT syntax into an equivalent expression in JavaScript syntax.
- Parameters:
- {String} term
- Expression in GEONExT syntax
- {JXG.Board} board
- Returns:
- {String} Given expression translated to JavaScript.
<static>
{String}
JXG.GeonextParser.gxt2jc(term, board)
Converts the given algebraic expression in GEONExT syntax into an equivalent expression in JessieCode syntax.
- Parameters:
- {String} term
- Expression in GEONExT syntax
- {JXG.Board} board
- Returns:
- {String} Given expression translated to JavaScript.
<static>
{String}
JXG.GeonextParser.replaceIdByObj(term)
Replaces element ids in terms by element this.board.objects['id'].
- Parameters:
- {String} term
- A GEONExT function string with JSXGraph ids in it.
- Returns:
- {String} The input string with element ids replaced by this.board.objects["id"].
<static>
{String}
JXG.GeonextParser.replaceIf(te)
Converts expression of the form If(a,b,c) into (a)?(b):(c)/i>.
- Parameters:
- {String} te
- Expression of the form If(a,b,c)
- Returns:
- {String} Converted expression.
<static>
{String}
JXG.GeonextParser.replaceNameById(term, board, jc)
Replace an element's name in terms by an element's id.
- Parameters:
- {String} term
- Term containing names of elements.
- {JXG.Board} board
- Reference to the board the elements are on.
- {Boolean} jc Optional, Default: false
- If true, all id's will be surrounded by $(' and ').
- Returns:
- {String} The same string with names replaced by ids.
<static>
{String}
JXG.GeonextParser.replacePow(te)
Converts expression of the form leftop^rightop into Math.pow(leftop,rightop).
- Parameters:
- {String} te
- Expression of the form leftop^rightop
- Returns:
- {String} Converted expression.