22 Mar 2011 fzort   » (Journeyer)

ncm: I thought that apenwarr's diary entry was a bit puzzling, too. I don't hold a candle to Avery's hacking superpowers, but isn't that, er, trivial?


parse_term()
{
  r = parse_factor();
  if (get_token() == '*')
    r *= parse_factor();
  else
    unget_token();
  return r;
}
parse_expr()
{
  r = parse_term();
  if (get_token() == '+')
    r += parse_term();
  else
    unget_token();
  return r;
}

Should make * have higher precedence than +, right?

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!