Created
June 16, 2017 09:03
-
-
Save prepor/e7ed2de16a217c627e663bdb7495e03c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| --- a/src/main/antlr/Orc.g4 | |
| +++ b/src/main/antlr/Orc.g4 | |
| @@ -31,8 +31,8 @@ | |
| */ | |
| grammar Orc; // 2.1.0 | |
| -@header { | |
| -package com.d360.xorc.antlr; | |
| +@head { | |
| +package orc.compile.antlr; | |
| } | |
| @@ -130,12 +130,8 @@ declaration | |
| | declare_type '#'? | |
| ; | |
| -declaration_expression : declaration declaration_expression?; | |
| -declarations : declaration_expression EOF; | |
| - | |
| declare_val : 'val' pattern '=' expression ; | |
| -declare_definition : declare_definition_instance+; | |
| -declare_definition_instance : 'def' ID=function_name type_parameters? '(' parameters? ')' return_type? guard? '=' expression ; | |
| +declare_definition : 'def' ID=function_name type_parameters? '(' parameters? ')' return_type? guard? '=' expression ; | |
| declare_defclass : 'def' 'class' identifier type_parameters? '(' parameters? ')' return_type? guard? '=' expression ; | |
| guard : 'if' '(' expression ')' ; | |
| declare_signature : 'def' ID=identifier type_parameters? argument_types return_type ; | |
| @@ -182,10 +178,10 @@ fragment Identifier_head : [`a-zA-Z] | |
| | [\uF900-\uFD3D] | [\uFD40-\uFDCF] | [\uFDF0-\uFE1F] | [\uFE30-\uFE44] | |
| | [\uFE47-\uFFFD] | |
| /* | |
| - | U+10000–U+1FFFD | U+20000–U+2FFFD | U+30000–U+3FFFD | U+40000–U+4FFFD | |
| - | U+50000–U+5FFFD | U+60000–U+6FFFD | U+70000–U+7FFFD | U+80000–U+8FFFD | |
| - | U+90000–U+9FFFD | U+A0000–U+AFFFD | U+B0000–U+BFFFD | U+C0000–U+CFFFD | |
| - | U+D0000–U+DFFFD or U+E0000–U+EFFFD | |
| + | U+10000–U+1FFFD | U+20000–U+2FFFD | U+30000–U+3FFFD | U+40000–U+4FFFD | |
| + | U+50000–U+5FFFD | U+60000–U+6FFFD | U+70000–U+7FFFD | U+80000–U+8FFFD | |
| + | U+90000–U+9FFFD | U+A0000–U+AFFFD | U+B0000–U+BFFFD | U+C0000–U+CFFFD | |
| + | U+D0000–U+DFFFD or U+E0000–U+EFFFD | |
| */ | |
| ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment