Re: a smarter form of whitespace

2006-07-06 Thread Patrick R. Michaud
On Thu, Jul 06, 2006 at 12:29:12AM -0700, Allison Randal wrote: > >$ cat xyz.pir > >.sub main :main > >load_bytecode 'PGE.pbc' > >load_bytecode 'ar.pir' > >load_bytecode 'dumper.pbc' > >load_bytecode 'PGE/Dumper.pbc' > > > >$P0 = find_global 'XYZ', 'start' > >$P1 = $P0("\n\n

Re: a smarter form of whitespace

2006-07-06 Thread Nathan Gray
On Tue, Jul 04, 2006 at 12:57:16PM -0700, Allison Randal wrote: > I'm writing a parser for a language that treats a double newline as a > statement terminator. It works if I make every rule a 'regex' (to turn > off smart whitespace). But I want spaces and tabs to act as smart > whitespace, and newl

Re: a smarter form of whitespace

2006-07-06 Thread Allison Randal
Patrick R. Michaud wrote: On Tue, Jul 04, 2006 at 12:57:16PM -0700, Allison Randal wrote: -- token start { ^*$ } regex emptyline { ^^ $$ \n } token ws { [ | \t]* } -- The above grammar doesn't have a "grammar" statement; as a result the regexes are being installed into the '' names

Re: a smarter form of whitespace

2006-07-05 Thread Patrick R. Michaud
On Tue, Jul 04, 2006 at 12:57:16PM -0700, Allison Randal wrote: > -- > > token start { ^*$ } > > regex emptyline { ^^ $$ \n } > > token ws { [ | \t]* } > > -- The above grammar doesn't have a "grammar" statement; as a result the regexes are being installed into the '' namespace. > If

Re: a smarter form of whitespace

2006-07-05 Thread Allison Randal
Nathan Gray wrote: > > Overloading and other builtins was fixed in parrot and pugs > approaching midnight (hackathon time) on 2006-06-29. If your parrot > and pugs are both more recent than that, I'm not sure where the bug > is. I have the latest checkout of Parrot (I'm not using Pugs). It may

a smarter form of whitespace

2006-07-04 Thread Allison Randal
I'm writing a parser for a language that treats a double newline as a statement terminator. It works if I make every rule a 'regex' (to turn off smart whitespace). But I want spaces and tabs to act as smart whitespace, and newlines to act as literal whitespace. I've overloaded to match only spaces