hi,

i've already written you an e-mail asking for some help to modify SDCC in a way to add a new token and then add new productions to define a new grammar;

so, i modified the SDCC.lex file in a way to add a token named PROB, to recognize the 'reserved' word 'prob':
"prob"         { count(); return(PROB); }

and the SDCC.y file to accept this token:
prob  : PROB  {      }   ;
  (...)
iteration_statement 
   : while '(' expr ')' { seqPointNo++;}  statement
                         {
               noLineno++ ;
               $$ = createWhile ( $1, STACK_POP(continueStack),
                          STACK_POP(breakStack), $3, $6 );
               $$->lineno = $1->lineDef ;
               noLineno-- ;
             }
   | prob ';' { }
   | do statement   WHILE '(' expr ')' ';'
   (...)

Nevertheless, i want to write C code like this:
if (condition1 (prob 50) && condition2 (prob 30)){...}
while (condition (prob 80)){...}

and i'm in troubles. when i try to modify the .y to:
prob  : PROB  {      }   ;
  (...)
iteration_statement 
   : while '(' expr '('prob INT')'  ')'  { seqPointNo++;}  statement
       {...}

i'm getting the follow erro:
bison -y -d -v -o SDCCy.c SDCC.y
SDCC.y:1596.74-75: $6 of `iteration_statement' has no declared type
make[1]: *** [SDCCy.c] Error 1

can somebody help me?

how can i change the code to get the value of INT after recognizing it and keep it in the AST?

regards,
Emanuel Pessoa