SHARE
TWEET

grammar

a guest Jul 10th, 2018 173 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. <% @TinyPG Language="C#" %>
  3.  
  4. INT     -> @"[0-9]+";
  5. FLOAT       -> @"[0-9]+\.[0-9]+";
  6. BOOL        -> @"true|false";
  7. IDENTIFIER  -> @"[a-zA-Z]+";
  8. BROPEN  -> @"\(";
  9. BRCLOSE     -> @"\)";
  10. KOMMA       -> @",";
  11. DOT     -> @".";
  12. SEMI        -> @";";
  13. EQUAL       -> @"=";
  14.  
  15. VALUE       -> BOOL|FLOAT|INT|IDENTIFIER;
  16. ARGS        -> (VALUE KOMMA? WS?)*;
  17.  
  18. VARNAME -> IDENTIFIER;
  19.  
  20. EOF             -> @"^$";
  21.  
  22. [Skip] WS   -> @"\s+";
  23. CALL        -> IDENTIFIER BROPEN ARGS BRCLOSE SEMI;
  24. VARDEF      -> VARNAME WS? EQUAL WS? VALUE;
  25.  
  26. Start       -> (CALL*)| (VARDEF*) EOF;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top