wave robot notes

Duncan Booth duncan.booth at invalid.invalid
Thu Dec 24 05:36:33 EST 2009


Aaron Watters <aaron.watters at gmail.com> wrote:

> I implemented a Google Wave Robot which annotates
> BNF syntax rules using railroad diagram images.
> I put notes about the implementation process
> here for the benefit of posterity.
> 
>     http://listtree.appspot.com/firstWaveRobot
> 
> The robot Id is
> 
>     whiff-gae-tutorial at appspot.com
> 
> -- if you are using wave, please add it to a wave and try it out.
> It should "respond" to a BNF rule you type in like this one:
> 
>     program ::= "begin" (statement ";")+ "end" $$
> 
> Happy Holidays everyone... I'm off to the slopes :).
>    -- Aaron Watters

Nice one.

Smooth curves would be nicer than angles if your graphics are up to it.

If you repeat an expression that already exists further up the Wave it 
looks like the robot ignores the duplicate. Is that deliberate?

This one looks nice if you want a reasonably complex example.

import_stmt ::= "import" module ["as" name]( "," module ["as" name] )*| 
"from" relative_module "import" identifier["as" name]( "," identifier 
["as"name] )*| "from" relative_module "import" "("identifier ["as" name]( 
","identifier ["as" name] )* [","] ")"| "from" module "import" "*"  

It would be really great if the diagram was interactive: I don't know if 
Wave's api lets you define anchors and jumps to anchors, but if it does 
then you could make non-terminals clickable.

P.S. could you use a standard signature separator please so I don't have to 
trim your signature off the reply by hand?



More information about the Python-list mailing list