Created
November 5, 2015 17:51
-
-
Save rprichard/b9833a5f17126ae3cdf4 to your computer and use it in GitHub Desktop.
Menhir test grammar (also works with yacc)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%token ID | |
%token DOT | |
%token DOTDOT | |
%token EOF | |
%start prog | |
%type <Prog> prog | |
%nonassoc DOTDOT | |
%nonassoc DOT | |
%% | |
prog : expr EOF {}; | |
expr | |
: DOTDOT | |
| expr DOT ID | |
| ID | |
{} | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment