improve leg grammar to allow operator()
Merge remote branch 'tom/gsoc-doc' into trunk