[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lojban] Re: Computer grammar question: non-left recursive RPN?



there was no operand in the version I submitted you, so it was wrong anyway.

here is another version :

rp-expression = rp-operand rp-operand operator
rp-operand    = operand rp-operand'
rp-operand'   = rp-operand operator rp-operand' | ()


regards,
 jo
--
#include <stdio.h> /**** <wbyncnpur@serr.se> ***/
#define r(o,t)  ((c|040)>=o&&(c|040)<=o+014)?c+t:
main(void){int c;while((c=getc(stdin))!=EOF){/**/
putchar(r('a',015)(r('n',-015)c));}}/** ebg13 **/