Grammar implementation

Implement select