home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,190 of 2,753   
   James Harris to All   
   Re: Compiling expressions   
   06 Jan 13 00:57:52   
   
   From: james.harris.1@gmail.com   
      
   On Jan 3, 9:33 pm, James Harris  wrote:   
      
   A small correction was needed, as follows, as I had omitted the loop-   
   out condition.   
      
   > function value_parse(op1)   
   >   v1 = value() //identifier or literal   
   >   while true   
   >     op2 = current token or dummy end of expression   
   >     if lparen //parens of a function call or similar   
   >       v1 = args_parse(op2)   
   >       consume rparen   
   >     else if prec(op2) > prec(op1)   
   >       if incompatible(op1, op2)   
   >         raise "incompatible - grouping parens needed"   
   >       v1 = node(POSTFIX_OP, v1)   
       else   
         break   
   >   return v1   
      
   James   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca