Re: Inserting extra tokens

2006-08-23 Thread Erik Sandberg
On Friday 18 August 2006 15:57, Hans Aberg wrote: > On 18 Aug 2006, at 12:12, Erik Sandberg wrote: > > My idea was to check dynamically whether 0 or 1 lookahead tokens > > has been > > read, and take different actions depending on this (either queue a > > token in >

Re: Inserting extra tokens

2006-08-18 Thread Erik Sandberg
On Friday 18 August 2006 09:24, Hans Aberg wrote: > On 17 Aug 2006, at 08:51, Erik Sandberg wrote: > > There is, in general, no good way to insert a token, as the LALR(1) > algorithm that Bison uses to create the parser may or may not need a > lookahead token in each parsing positi

Inserting extra tokens

2006-08-17 Thread Erik Sandberg
Hi, I am working with the parser of GNU LilyPond, and I want to improve the way function invocations are parsed in the language. The language uses a syntax for functions which is somewhat similar to LaTeX's syntax for macros. E.g., if \foo is declared as a binary function, then \foo a b calls t