aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL_parser.c
blob: c6026e2fbcec3a733e34b31ed0874f94692882de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "LuaSL_LSL_tree.h"
#include <stdio.h>


int main(void)
{
    char test[]=" 4 + 2*10 + 3*( 5 + 1 )";
    SExpression *e = NULL;
    int result = 0;

    e = getAST(test);
    result = evaluate(e);
    printf("Result of '%s' is %d\n", test, result);
    deleteExpression(e);

    return 0;
}