Commit bb992c3c authored by Sergio Costas's avatar Sergio Costas

Little fix to the closing parentheses searcher, to make it more generic

parent bf2f2949
......@@ -48,7 +48,7 @@ int current_line = 1;
char *current_file = NULL;
char do_verbose = 0;
void find_close_parentheses(void);
void find_close_parentheses(int);
%}
......@@ -102,12 +102,12 @@ void find_close_parentheses(void);
"__prog__" { count(); }
"__restrict" { count(); }
"__inline" { count(); }
"__attribute__"{WS}*"(" { find_close_parentheses(); count(); }
"__asm__"{WS}*"(" { find_close_parentheses(); count(); }
"__asm__"{WS}+"volatile"{WS}*"(" { find_close_parentheses(); count(); }
"__asm__"{WS}+"__volatile__"{WS}*"(" { find_close_parentheses(); count(); }
"asm"{WS}+"volatile"{WS}*"(" { find_close_parentheses(); count(); }
"asm"{WS}*"(" { find_close_parentheses(); count(); }
"__attribute__"{WS}*"(" { find_close_parentheses(1); count(); }
"__asm__"{WS}*"(" { find_close_parentheses(1); count(); }
"__asm__"{WS}+"volatile"{WS}*"(" { find_close_parentheses(1); count(); }
"__asm__"{WS}+"__volatile__"{WS}*"(" { find_close_parentheses(1); count(); }
"asm"{WS}+"volatile"{WS}*"(" { find_close_parentheses(1); count(); }
"asm"{WS}*"(" { find_close_parentheses(1); count(); }
"__crust_t__" { return prepare_leaf(0,0.0,CRUST_T); }
"__crust_borrow__" { return prepare_leaf(0,0.0,CRUST_BORROW); }
"__crust_recycle__" { return prepare_leaf(0,0.0,CRUST_RECYCLE); }
......@@ -424,10 +424,10 @@ int prepare_leaf(unsigned long long int v1, double v2, int current_token) {
return current_token;
}
void find_close_parentheses(void) {
void find_close_parentheses(int init_counter) {
char c;
int counter = 1;
int counter = init_counter;
bool inside_quotes = false;
while ((counter != 0) && ((c = input()) != 0)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment