Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- parser grammar wrbparser;
- @header{
- package parser;
- }
- options {
- language = Java;
- tokenVocab = wrblexer;
- }
- prog : variable;
- variable : ( LETTER CONNECT )? term;
- term : term ( ADD | SUB ) atom
- | atom;
- atom : atom ( MUL | DIV ) ( number | clipped )
- | ( number | clipped );
- clipped : LBRACKET clipped ( ADD | SUB | MUL | DIV ) clippedterm RBRACKET
- | LBRACKET clippedterm ( ADD | SUB | MUL | DIV ) clipped RBRACKET
- | LBRACKET clippedterm RBRACKET;
- clippedterm : clippedterm ( ADD | SUB ) clippedatom
- | clippedatom;
- clippedatom : clippedatom ( MUL | DIV ) number
- | number;
- number : ( SIGN )? PNUMBER ( POINT PNUMBER )?;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement