Navigation: Developing Apps > BINETIX® AGE™ API > The Node > Toolkits > age_parser
run_scan/2
Description
run_scan/2 is an Erlang function exported by "age_parser" module.
This function combines at run-time the result provided by the tokenizer to the language generator.
References
•scan/2
•run/2
Parameters
Name
Type
Source
string()
Input string
Grammar
#age_grammar{}
Optional LALR grammar definition. Defaults to simple predefined grammar.
Result
Value or Type
list()
Returns a list with meta-language tokens.
Code Sample
> age_parser:run_scan("Result = a * [12 + (4.5 - 2)];"). [ {identifier,"Result"}, assign, {identifier, "a"}, multiply, [ 12, plus, {params,[ open_parenthesis, 4.5, minus, 2, close_parenthesis ]} ], semicolon ]