refactoring grammar - more use of references to eliminate needless
copying of large vectors