Search Results

Search found 1 results on 1 pages for 'yodhevauhe'.

Page 1/1 | 1 

  • How to access class member from bison action

    - by yodhevauhe
    I am calling yyparse from a member function. How to access the member variables/function from the bison action. I am currently doing as %{ #include "myclass.h" #include "parse.tab.hh" MyClass *ptr=NULL; void MyClass::evaluate(string expression) { ptr=this; yy_scan_string(expression.c_str()); yyparse(); } %} %% EXPR : EXPR PLUS EXPR { $$ = ptr->memberFunction("+",$1,$3); }

    Read the article

1