commit stringlengths 40 40 | old_file stringlengths 2 205 | new_file stringlengths 2 205 | old_contents stringlengths 0 32.9k | new_contents stringlengths 1 38.9k | subject stringlengths 3 9.4k | message stringlengths 6 9.84k | lang stringlengths 3 13 | license stringclasses 13
values | repos stringlengths 6 115k |
|---|---|---|---|---|---|---|---|---|---|
87d886380744b6276165c6012a8b32877a9459b5 | sharding-core/src/main/antlr4/imports/SQLServerDCLStatement.g4 | sharding-core/src/main/antlr4/imports/SQLServerDCLStatement.g4 | grammar SQLServerDCLStatement;
import SQLServerKeyword, DataType, Keyword, SQLServerBase, BaseRule, Symbol;
grantGeneral
: GRANT (ALL PRIVILEGES? | permissionOnColumns ( COMMA permissionOnColumns)*)
(ON (ID COLONCOLON)? ID )? TO ids
(WITH GRANT OPTION)? (AS ID)?
;
permissionOnColumns
: permis... | grammar SQLServerDCLStatement;
import SQLServerKeyword, DataType, Keyword, SQLServerBase, BaseRule, Symbol;
grantGeneral
: GRANT (ALL PRIVILEGES? | permissionOnColumns ( COMMA permissionOnColumns)*)
(ON (ID COLONCOLON)? ID )? TO ids
(WITH GRANT OPTION)? (AS ID)?
;
permissionOnColumns
: permis... | add grantDW | add grantDW
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc |
e5c467c0abe1f33295d600093910fe10ddb31a57 | sharding-core/src/main/antlr4/imports/SQLServerDCLStatement.g4 | sharding-core/src/main/antlr4/imports/SQLServerDCLStatement.g4 | grammar SQLServerDCLStatement;
import SQLServerKeyword, DataType, Keyword, SQLServerBase, BaseRule, Symbol;
grant
: grantGeneral | grantDW
;
grantGeneral
: GRANT (ALL PRIVILEGES? | permissionOnColumns ( COMMA permissionOnColumns)*)
(ON (ID COLON COLON)? ID)? TO ids (WITH GRANT OPTION)? (AS ID)?
... | grammar SQLServerDCLStatement;
import SQLServerKeyword, DataType, Keyword, SQLServerBase, BaseRule, Symbol;
grant
: grantGeneral | grantDW
;
grantGeneral
: GRANT (ALL PRIVILEGES? | permissionOnColumns ( COMMA permissionOnColumns)*)
(ON (ID COLON COLON)? ID)? TO ids (WITH GRANT OPTION)? (AS ID)?
... | add createUser2 | add createUser2
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere |
cac1967df081f90ea76ac162b4e1b4bc54cd2d9c | src/aa.g4 | src/aa.g4 | grammar aa;
@header {
package pt.up.fe.comp.aa.parser;
}
stmt_list : stmt*
;
stmt : (((attribution | operation) SEMICOLON) | control_expr)
;
attribution : attribution_lhs EQUAL attribution_rhs
;
attribution_lhs : IDENTIFIER
;
attri... | grammar aa;
@header {
package pt.up.fe.comp.aa.parser;
}
stmt_list : stmt*
;
stmt : (((attribution | operation) SEMICOLON) | control_expr)
;
attribution : attribution_lhs EQUAL attribution_rhs
;
attribution_lhs : IDENTIFIER
;
attri... | Clean aa.g4 grammar. | Clean aa.g4 grammar.
| ANTLR | mit | migulorama/AutoAnalyze,migulorama/AutoAnalyze |
d67b900b10fab222f6f96e7ff5e17eab9cc88a32 | pascal/pascal.g4 | pascal/pascal.g4 | /*
BSD License
Copyright (c) 2013, Tom Everett
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of condi... | /*
BSD License
Copyright (c) 2013, Tom Everett
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of condi... | clean up pascal | clean up pascal
| ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
fcbdb241316e9bc7dbadc61eea7373831b100975 | turin-parser/src/main/antlr4/me/tomassetti/parser/antlr/Turin.g4 | turin-parser/src/main/antlr4/me/tomassetti/parser/antlr/Turin.g4 | grammar Turin;
@header {
}
turinFile:
namespace=namespaceDecl nls
(members=fileMember)+
EOF;
// Base
nls: NL+;
qualifiedId:
(parts+=ID '.')* parts+=ID;
//
namespaceDecl:
'namespace' name=qualifiedId;
//
typeUsage:
ref=TID
| arrayBase=typeUsage '[]';
//
propertyDeclaration:
'p... | grammar Turin;
@header {
}
turinFile:
namespace=namespaceDecl nls
(members=fileMember)+
EOF;
// Base
nls: NL+;
qualifiedId:
(parts+=ID POINT)* parts+=ID;
//
namespaceDecl:
NAMESPACE_KW name=qualifiedId;
//
typeUsage:
ref=TID
| arrayBase=typeUsage LSQUARE RSQUARE;
//
propertyDecla... | declare all tokens | declare all tokens
| ANTLR | apache-2.0 | ftomassetti/turin-programming-language,ftomassetti/turin-programming-language |
fd577f3e157ff022746ca131bb94d53dd29a5564 | sharding-jdbc-ddl-parser/src/main/antlr4/io/shardingsphere/parser/antlr/mysql/MySQLDML.g4 | sharding-jdbc-ddl-parser/src/main/antlr4/io/shardingsphere/parser/antlr/mysql/MySQLDML.g4 | grammar MySQLDML;
import MySQLKeyword, DataType, Keyword, BaseRule, MySQLDQL, DQLBase, DMLBase,Symbol;
selectSpec:
(ALL | DISTINCT | DISTINCTROW)?
HIGH_PRIORITY?
STRAIGHT_JOIN?
SQL_SMALL_RESULT?
SQL_BIG_RESULT?
SQL_BUFFER_RESULT?
(SQL_CACHE | SQL_NO_CACHE)?
SQL_CALC_FOUND_ROWS?
;... | grammar MySQLDML;
import MySQLKeyword, DataType, Keyword, BaseRule, MySQLDQL, DQLBase, DMLBase,Symbol;
caseExpress:
caseCond
|caseComp
;
caseComp:
CASE simpleExpr caseWhenComp+ elseResult? END
;
caseWhenComp:
WHEN simpleExpr THEN caseResult
;
caseCond:
CASE whenResult+ else... | Remove repeat rule | Remove repeat rule
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere |
f4158db161e344ebea17096cbde9f3ee380c148f | projects/batfish/src/org/batfish/grammar/cisco/Cisco_aaa.g4 | projects/batfish/src/org/batfish/grammar/cisco/Cisco_aaa.g4 | parser grammar Cisco_aaa;
import Cisco_common;
options {
tokenVocab = CiscoLexer;
}
aaa_accounting
:
ACCOUNTING
(
aaa_accounting_commands
| aaa_accounting_connection
| aaa_accounting_default
| aaa_accounting_delay_start
| aaa_accounting_exec
| aaa_accounting_nested
... | parser grammar Cisco_aaa;
import Cisco_common;
options {
tokenVocab = CiscoLexer;
}
aaa_accounting
:
ACCOUNTING
(
aaa_accounting_commands
| aaa_accounting_connection
| aaa_accounting_default
| aaa_accounting_delay_start
| aaa_accounting_exec
| aaa_accounting_nested
... | fix aaa_authorization_method | fix aaa_authorization_method
| ANTLR | apache-2.0 | arifogel/batfish,dhalperi/batfish,dhalperi/batfish,intentionet/batfish,arifogel/batfish,intentionet/batfish,dhalperi/batfish,intentionet/batfish,intentionet/batfish,arifogel/batfish,batfish/batfish,batfish/batfish,intentionet/batfish,batfish/batfish |
b22b2ae4e7c660f25988f6b7a021c3d264670b79 | src/main/antlr/BrygParser.g4 | src/main/antlr/BrygParser.g4 | parser grammar BrygParser;
// TODO: Find a way to do: if (...) a else b
options {
tokenVocab = BrygLexer;
}
@header {
package io.collap.bryg.parser;
}
start
: (inDeclaration | NEWLINE)*
(statement | NEWLINE)*
(fragmentFunction | NEWLINE)*
EOF // EOF is needed for SLL(*) parsin... | parser grammar BrygParser;
// TODO: Find a way to do: if (...) a else b
options {
tokenVocab = BrygLexer;
}
@header {
package io.collap.bryg.parser;
}
start
: (inDeclaration | NEWLINE)*
(statement | NEWLINE)*
(fragmentFunction | NEWLINE)*
EOF // EOF is needed for SLL(*) parsin... | Add 'frag' keyword to id. | Add 'frag' keyword to id.
| ANTLR | mit | Collap/bryg |
758340458facc479b4c85063620827a51a18a07e | sharding-core/src/main/antlr4/imports/OracleDCLStatement.g4 | sharding-core/src/main/antlr4/imports/OracleDCLStatement.g4 | grammar OracleDCLStatement;
import OracleKeyword, Keyword, OracleBase, BaseRule, DataType, Symbol;
/**
* each statement has a url,
* each base url : https://docs.oracle.com/database/121/SQLRF/.
* no begin statement in oracle
*/
//statements_9014.htm#SQLRF01603
grant
: GRANT
(
(grantSystemPrivileges |... | grammar OracleDCLStatement;
import OracleKeyword, Keyword, OracleBase, BaseRule, DataType, Symbol;
/**
* each statement has a url,
* each base url : https://docs.oracle.com/database/121/SQLRF/.
* no begin statement in oracle
*/
//statements_9014.htm#SQLRF01603
grant
: GRANT
(
(grantSystemPrivileges |... | remove systemPrivilege | remove systemPrivilege
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc |
1a3a979189c7adbe29aaf94d41d5973d4c2d8402 | sharding-jdbc-ddl-parser/src/main/antlr4/imports/MySQLTableBase.g4 | sharding-jdbc-ddl-parser/src/main/antlr4/imports/MySQLTableBase.g4 | grammar MySQLTableBase;
import MySQLKeyword,MySQLBase, DataType, Keyword, BaseRule, Symbol;
tableOptions:
tableOption (COMMA? tableOption)*
;
tableOption:
AUTO_INCREMENT EQ_OR_ASSIGN? NUMBER
|AVG_ROW_LENGTH EQ_OR_ASSIGN? NUMBER
| DEFAULT? characterSetWithEqual
| CHECKSUM EQ_OR_ASSIGN? NUMBE... | grammar MySQLTableBase;
import MySQLKeyword,MySQLBase, DataType, Keyword, BaseRule, Symbol;
tableOptions:
tableOption (COMMA? tableOption)*
;
tableOption:
AUTO_INCREMENT EQ_OR_ASSIGN? NUMBER
|AVG_ROW_LENGTH EQ_OR_ASSIGN? NUMBER
| DEFAULT? characterSetWithEqual
| CHECKSUM EQ_OR_ASSIGN? NUMBE... | add partitionDefinitionOption | add partitionDefinitionOption
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc |
2d21618ac50b9c86cda18c923ee53f741a1628f7 | mumps/mumps.g4 | mumps/mumps.g4 | /*
BSD License
Copyright (c) 2013, Tom Everett
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of c... | /*
BSD License
Copyright (c) 2013, Tom Everett
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of c... | write fix | write fix
| ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
64a49986b46c49960a2fb37e088e35504e2b9a80 | sharding-core/src/main/antlr4/imports/SQLServerDCLStatement.g4 | sharding-core/src/main/antlr4/imports/SQLServerDCLStatement.g4 | grammar SQLServerDCLStatement;
import SQLServerKeyword, DataType, Keyword, SQLServerBase, BaseRule, Symbol;
grantGeneral
: GRANT (ALL PRIVILEGES? | permissionOnColumns ( COMMA permissionOnColumns)*)
(ON (ID COLONCOLON)? ID )? TO ids
(WITH GRANT OPTION)? (AS ID)?
;
permissionOnColumns
: permis... | grammar SQLServerDCLStatement;
import SQLServerKeyword, DataType, Keyword, SQLServerBase, BaseRule, Symbol;
grantGeneral
: GRANT (ALL PRIVILEGES? | permissionOnColumns ( COMMA permissionOnColumns)*)
(ON (ID COLONCOLON)? ID )? TO ids
(WITH GRANT OPTION)? (AS ID)?
;
permissionOnColumns
: permis... | add classType | add classType
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere |
8a6da5bc7e410cd18a035b66c8d4635e69d3e902 | src/main/antlr4/JmesPath.g4 | src/main/antlr4/JmesPath.g4 | grammar JmesPath;
import JSON;
query : expression EOF ;
expression
: expression '.' (IDENTIFIER | multiSelectList | multiSelectHash | functionExpression | '*') # chainExpression
| expression bracketSpecifier # bracketedExpression
| bracketSpecifier # bracketExpression
| expression '||' expression # orExpress... | grammar JmesPath;
import JSON;
query : expression EOF ;
expression
: expression '.' (identifier | multiSelectList | multiSelectHash | functionExpression | '*') # chainExpression
| expression bracketSpecifier # bracketedExpression
| bracketSpecifier # bracketExpression
| expression '||' expression # orExpress... | Make IDENTIFIER a parser rule to fix the `"foo"` problem | Make IDENTIFIER a parser rule to fix the `"foo"` problem
The string in `"foo"` matched both IDENTIFIER and STRING, but IDENTIFIER won, which was not what we wanted. | ANTLR | bsd-3-clause | burtcorp/jmespath-java |
18f1d838b545cbf3f3527b071651c5617aacfc87 | sharding-core/src/main/antlr4/imports/OracleCreateTable.g4 | sharding-core/src/main/antlr4/imports/OracleCreateTable.g4 | grammar OracleCreateTable;
import OracleKeyword, Keyword, DataType, OracleCreateIndex, OracleTableBase, OracleBase, BaseRule, Symbol;
createTable
: CREATE (GLOBAL TEMPORARY)? TABLE tableName relationalTable
;
relationalTable
: LEFT_PAREN relationalProperties RIGHT_PAREN
(ON COMMIT (DELETE | PRESE... | grammar OracleCreateTable;
import OracleKeyword, Keyword, DataType, OracleCreateIndex, OracleTableBase, DQLBase, OracleBase, BaseRule, Symbol;
createTable
: CREATE (GLOBAL TEMPORARY)? TABLE tableName relationalTable
;
relationalTable
: (LEFT_PAREN relationalProperties RIGHT_PAREN)?
(ON COMMIT (DE... | fix oracle create table ... as select rule | fix oracle create table ... as select rule
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere |
b03bcf256518d421adf6266c3f94d8e46527ae3a | engine/src/main/antlr4/com/impossibl/stencil/engine/parsing/StencilLexer.g4 | engine/src/main/antlr4/com/impossibl/stencil/engine/parsing/StencilLexer.g4 |
lexer grammar StencilLexer;
@members {
public static final int STEXTS = DEFAULT_MODE;
public static final int KEYWORD_FIRST=EXPORT;
public static final int KEYWORD_LAST=FALSE;
private int statementBlocks=-1;
void resetStatementBlocks() {
statementBlocks=-1;
}
void incStatementBlocks() {
statementBlocks... |
lexer grammar StencilLexer;
@members {
public static final int STEXTS = DEFAULT_MODE;
public static final int KEYWORD_FIRST=EXPORT;
public static final int KEYWORD_LAST=FALSE;
private int statementBlocks=-1;
void resetStatementBlocks() {
statementBlocks=-1;
}
void incStatementBlocks() {
statementBlocks... | Fix escaping | Fix escaping
| ANTLR | bsd-3-clause | impossibl/stencil |
16cb1697abd77400d3288361b65300f722f9a689 | impl/src/main/antlr4/com/groupon/lex/metrics/grammar/ConfigTokenizer.g4 | impl/src/main/antlr4/com/groupon/lex/metrics/grammar/ConfigTokenizer.g4 | /*
* Copyright (c) 2016, Groupon, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditio... | /*
* Copyright (c) 2016, Groupon, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditio... | Use expression lexer in config tokenizer. | Use expression lexer in config tokenizer.
| ANTLR | bsd-3-clause | groupon/monsoon,groupon/monsoon,groupon/monsoon,groupon/monsoon |
e5bfbf0feb33e7a73e3eaf5e2518fa29aab5acfa | lib/kicad/src/main/antlr4/org/marsik/elshelves/kicad/Schema.g4 | lib/kicad/src/main/antlr4/org/marsik/elshelves/kicad/Schema.g4 | grammar Schema;
// Lexer Constants
WS: (' ' | '\t')+ -> skip;
NL: '\r'? '\n' -> skip;
HEADER: 'EESchema Schematic ' ('File' | 'Spins') ' Version ' ('1' | '2');
ENDOFSCHEMA: '$EndSCHEMATC';
LIBS: 'LIBS:';
EELAYER: 'EELAYER';
END: 'END';
DESCR: '$Descr';
ENDDESCR: '$EndDescr';
COMPONENT_START: '$Comp';
COMPONENT_END: ... | grammar Schema;
// Lexer Constants
WS: (' ' | '\t')+ -> skip;
NL: '\r'? '\n' -> skip;
HEADER: 'EESchema Schematic ' ('File' | 'Spins') ' Version ' ('1' | '2');
ENDOFSCHEMA: '$EndSCHEMATC';
LIBS: 'LIBS:';
EELAYER: 'EELAYER';
END: 'END';
DESCR: '$Descr';
ENDDESCR: '$EndDescr';
COMPONENT_START: '$Comp';
COMPONENT_END: ... | Fix grammar comments | Fix grammar comments
| ANTLR | agpl-3.0 | MarSik/shelves,MarSik/shelves,MarSik/shelves,MarSik/shelves |
30f7a20da4571259881c3c7eb74e7867c985f439 | sharding-core/src/main/antlr4/imports/SQLServerDCLStatement.g4 | sharding-core/src/main/antlr4/imports/SQLServerDCLStatement.g4 | grammar SQLServerDCLStatement;
import SQLServerKeyword, DataType, Keyword, SQLServerBase, BaseRule, Symbol;
permissions
: ID *?
;
| grammar SQLServerDCLStatement;
import SQLServerKeyword, DataType, Keyword, SQLServerBase, BaseRule, Symbol;
permissionOnColumns
: permission columnList?
;
permission
: ID *?
;
| add permissionOnColumns | add permissionOnColumns
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere |
aba1c22c7062279a3bd26f81413cf5bf72a21b91 | javascript/JavaScriptParser.g4 | javascript/JavaScriptParser.g4 | /*
* The MIT License (MIT)
*
* Copyright (c) 2014 by Bart Kiers (original author) and Alexandre Vitorelli (contributor -> ported to CSharp)
* Copyright (c) 2017 by Ivan Kochurkin (Positive Technologies):
added ECMAScript 6 support, cleared and transformed to the universal grammar.
* Copyright (c) 2018 by Juan ... | /*
* The MIT License (MIT)
*
* Copyright (c) 2014 by Bart Kiers (original author) and Alexandre Vitorelli (contributor -> ported to CSharp)
* Copyright (c) 2017 by Ivan Kochurkin (Positive Technologies):
added ECMAScript 6 support, cleared and transformed to the universal grammar.
* Copyright (c) 2018 by Juan ... | Update JavaScriptParser.g4 | Update JavaScriptParser.g4
Fixed invalid rules ordering in statement | ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
16b072457354016d96ca98cbd44e21306cd8e1e0 | antlr/antlr4/ANTLRv4Lexer.g4 | antlr/antlr4/ANTLRv4Lexer.g4 | /*
* [The "BSD license"]
* Copyright (c) 2012-2015 Terence Parr
* Copyright (c) 2012-2015 Sam Harwell
* Copyright (c) 2015 Gerald Rosenberg
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* ... | /*
* [The "BSD license"]
* Copyright (c) 2012-2015 Terence Parr
* Copyright (c) 2012-2015 Sam Harwell
* Copyright (c) 2015 Gerald Rosenberg
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* ... | Update ANTLRv4Lexer.g4 | Update ANTLRv4Lexer.g4 | ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
c64d5540ec6cf65cafaefbf98e52a316c88f107c | sharding-core/sharding-core-parse/sharding-core-parse-mysql/src/main/antlr4/imports/mysql/BaseRule.g4 | sharding-core/sharding-core-parse/sharding-core-parse-mysql/src/main/antlr4/imports/mysql/BaseRule.g4 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | rename to stringLiterals | rename to stringLiterals
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere |
649adb3d4c79d0987fa4f14406fa78e21cc6b49f | src/main/antlr/Graphql.g4 | src/main/antlr/Graphql.g4 | grammar Graphql;
@header {
package graphql.parser.antlr;
}
// Document
document : definition+;
definition:
operationDefinition |
fragmentDefinition
;
operationDefinition:
selectionSet |
operationType NAME? variableDefinitions? directives? selectionSet;
operationType : 'query' | 'mutation';
variableDefinition... | grammar Graphql;
@header {
package graphql.parser.antlr;
}
// Document
document : definition+;
definition:
operationDefinition |
fragmentDefinition
;
operationDefinition:
selectionSet |
operationType NAME? variableDefinitions? directives? selectionSet;
operationType : NAME;
variableDefinitions : '(' variable... | Update ANTLR grammar to fix #213 | Update ANTLR grammar to fix #213
| ANTLR | mit | blevandowski-lv/graphql-java,dminkovsky/graphql-java,fderose/graphql-java,graphql-java/graphql-java,blevandowski-lv/graphql-java,graphql-java/graphql-java,fderose/graphql-java,dminkovsky/graphql-java |
bcd7751bb78f37a6d938a873f491a7b1c5f1e69c | src/main/antlr/BrygParser.g4 | src/main/antlr/BrygParser.g4 | parser grammar BrygParser;
// TODO: Find a way to do: if (...) a else b
// TODO: Rename ifExpression and eachExpression to *Statement, because they aren't expressions.
options {
tokenVocab = BrygLexer;
}
@header {
package io.collap.bryg.parser;
}
start
: (inDeclaration | NEWLINE)*
(statement ... | parser grammar BrygParser;
// TODO: Find a way to do: if (...) a else b
// TODO: Rename ifExpression and eachExpression to *Statement, because they aren't expressions.
options {
tokenVocab = BrygLexer;
}
@header {
package io.collap.bryg.parser;
}
start
: (inDeclaration | NEWLINE)*
(statement ... | Fix multiple package levels not being allowed in template ids. | Fix multiple package levels not being allowed in template ids.
| ANTLR | mit | Collap/bryg |
20e5049b3ee7accd5b586c591b277fb714ec0081 | rexx/RexxLexer.g4 | rexx/RexxLexer.g4 | lexer grammar RexxLexer;
// Main rules
// %INCLUDE statement
STMT_INCLUDE : Include_Statement ;
// Skippable stuff
LINE_COMMENT : Line_Comment_
-> channel(HIDDEN);
BLOCK_COMMENT : Block_Comment_
... | lexer grammar RexxLexer;
// Main rules
// %INCLUDE statement
STMT_INCLUDE : Include_Statement ;
// Skippable stuff
LINE_COMMENT : Line_Comment_
-> channel(HIDDEN);
BLOCK_COMMENT : Block_Comment_
... | Support constant symbol starting with period | Support constant symbol starting with period
| ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
0c6c88c1eab251a0d529b152d8a931a95b0baaa5 | sharding-core/sharding-core-parse/sharding-core-parse-postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4 | sharding-core/sharding-core-parse/sharding-core-parse-postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | add concurrentlyClause_ | add concurrentlyClause_
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc |
8ad34bfed8d75f90cc07f7e74b7c51196de8710a | sharding-core/sharding-core-parse/sharding-core-parse-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 | sharding-core/sharding-core-parse/sharding-core-parse-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | add createIndexDefinitionClause_ | add createIndexDefinitionClause_
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc |
b3db9eff07236d15e4409e74932d6b725b95677e | Compiler/src/grammar/Receipt.g4 | Compiler/src/grammar/Receipt.g4 | /**
* @author ariehfabbro, lucasdavid
*/
grammar Receipt;
@header {
import infrastructure.json.*;
}
receipt
returns [JsonStructure e]
@init { $e = new JsonStructure("receipt"); }
:
( basic { $e.add($basic.e); } )+
;
basic
returns [JsonElement e]
: id { $e = $id.e; }
... | /**
* @author ariehfabbro, lucasdavid
*/
grammar Receipt;
@header {
import infrastructure.json.*;
}
receipt
returns [JsonStructure e]
@init { $e = new JsonStructure("receipt"); }
:
( basic { $e.add($basic.e); } )+
;
basic
returns [JsonElement e]
: id { $e = $id.e; }
... | Update Receipt.g4: fix address parse | Update Receipt.g4: fix address parse
| ANTLR | mit | lucasdavid/Compilers-2-assignment-2,lucasdavid/Compilers-2-assignment-2,lucasdavid/Compilers-2-assignment-2,lucasdavid/Compilers-2-assignment-2,lucasdavid/Compilers-2-assignment-2 |
c7f66cf9f80ecf50fda3bfb706fb0fc599d4cb48 | sharding-jdbc-ddl-parser/src/main/antlr4/io/shardingsphere/parser/antlr/oracle/OracleAlterTable.g4 | sharding-jdbc-ddl-parser/src/main/antlr4/io/shardingsphere/parser/antlr/oracle/OracleAlterTable.g4 | grammar OracleAlterTable;
import OracleKeyword, DataType, Keyword,OracleIndexBase, OracleTableBase,OracleBase,BaseRule,Symbol;
alterTable:
ALTER TABLE tableName
( alterTableProperties
| columnClauses
| constraintClauses
| alterTablePartitioning
| alterExternalTable
| moveTableClause
... | grammar OracleAlterTable;
import OracleKeyword, DataType, Keyword,OracleIndexBase, OracleTableBase,OracleBase,BaseRule,Symbol;
alterTable:
ALTER TABLE tableName
( alterTableProperties
| columnClauses
| constraintClauses
| alterTablePartitioning
| alterExternalTable
| moveTableClause
... | Update addColumn to support add one column Update addColumn to add multi column | Update addColumn to support add one column
Update addColumn to add multi column
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc |
a25e94e790e547a4c01f916bb139ab0bb94e5a23 | sharding-core/sharding-core-parse/sharding-core-parse-mysql/src/main/antlr4/imports/mysql/DDLStatement.g4 | sharding-core/sharding-core-parse/sharding-core-parse-mysql/src/main/antlr4/imports/mysql/DDLStatement.g4 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | fix mysql DDLStatement.g4 | fix mysql DDLStatement.g4
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere |
90267ea949d87a8c45f1254be5468dabfeeb53db | presto-parser/src/main/antlr4/com/facebook/presto/sql/parser/SqlBase.g4 | presto-parser/src/main/antlr4/com/facebook/presto/sql/parser/SqlBase.g4 | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distribut... | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distribut... | Improve lexer matching of invalid characters | Improve lexer matching of invalid characters
This variant is functionally equivalent but faster than the non-greedy match.
| ANTLR | apache-2.0 | zofuthan/presto,tellproject/presto,nezihyigitbasi/presto,toxeh/presto,ebyhr/presto,mandusm/presto,sunchao/presto,avasilevskiy/presto,smartpcr/presto,sunchao/presto,xiangel/presto,joy-yao/presto,jekey/presto,propene/presto,miniway/presto,ipros-team/presto,miquelruiz/presto,martint/presto,Svjard/presto,miquelruiz/presto,... |
6d912a05a32f7c46f6e0a6623ac9e801f8cb7761 | sharding-core/sharding-core-parse/sharding-core-parse-postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4 | sharding-core/sharding-core-parse/sharding-core-parse-postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | modify alterTable | modify alterTable
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc |
8766c0a46fd823b0a868d69da2ba414428ff9e80 | dcct/src/main/antlr4/Dcct.g4 | dcct/src/main/antlr4/Dcct.g4 | grammar Dcct;
// Parser
program
: schema EOF
;
schema
: cloudDataDecl*
;
// Types
// TODO just use generic identifier and rely on type checking to rule out wrong
// identifiers? Before we had entityIdent and arrayIdent now just ident. It
// seems to be more sensible for this to be a type error rather tha... | grammar Dcct;
// Parser
program
: schema expression* EOF
;
schema
: cloudDataDecl*
;
// Types
// TODO just use generic identifier and rely on type checking to rule out wrong
// identifiers? Before we had entityIdent and arrayIdent now just ident. It
// seems to be more sensible for this to be a type erro... | Add further source constructs | Add further source constructs
| ANTLR | bsd-3-clause | amanjpro/languages-a-la-carte,amanjpro/languages-a-la-carte |
acef67b2ed6b2553dfff6828c0521c0805a05390 | python2/Python2.g4 | python2/Python2.g4 |
/*
* Taken from official Python 2.7.13 grammar:
* https://docs.python.org/2/reference/grammar.html
*
* Only minor syntactical changes (instances of [X] changed to (X)?, and
* semicolons added to ends of rules), and added lexer rules and whitespace
* handling.
*
* Compiles with ANTLR 4.7, generated lexer/par... |
/*
* Taken from official Python 2.7.13 grammar:
* https://docs.python.org/2/reference/grammar.html
*
* Only minor syntactical changes (instances of [X] changed to (X)?, and
* semicolons added to ends of rules), and added lexer rules and whitespace
* handling.
*
* Compiles with ANTLR 4.7, generated lexer/par... | Update Python2.g4 | Update Python2.g4
Added handling for line continuations.. and a temporary fix to the NUMBERS rule. | ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
07518e5c5d3a43c75e17f0c196be93eab21d6c83 | antlr/antlr4/ANTLRv4Lexer.g4 | antlr/antlr4/ANTLRv4Lexer.g4 | /*
* [The "BSD license"]
* Copyright (c) 2012-2015 Terence Parr
* Copyright (c) 2012-2015 Sam Harwell
* Copyright (c) 2015 Gerald Rosenberg
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* ... | /*
* [The "BSD license"]
* Copyright (c) 2012-2015 Terence Parr
* Copyright (c) 2012-2015 Sam Harwell
* Copyright (c) 2015 Gerald Rosenberg
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* ... | Add "TODO". | Add "TODO".
| ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
35c25ed7873349fecfa994f24947ac7b2b1f31f5 | sharding-core/sharding-core-parse/sharding-core-parse-mysql/src/main/antlr4/imports/mysql/BaseRule.g4 | sharding-core/sharding-core-parse/sharding-core-parse-mysql/src/main/antlr4/imports/mysql/BaseRule.g4 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | delete newline | delete newline
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere |
ecd2f96d0d54722d4c206b27404704f254393643 | watertemplate-engine/grammar.g4 | watertemplate-engine/grammar.g4 | prop_name_head
: [a-zA-Z]
;
prop_name_body
: '_'
| [0-9]
| prop_name_head
;
prop_name
: prop_name_head
| prop_name_head prop_name_body
;
id
: prop_name
| prop_name '.' id
;
// ---------------------------------------------
prop_eval
: '~' id '~'
;
if
: '~if' id ':' statements ':~'
| '~if' id ':' st... | prop_name_head
: [a-zA-Z]
;
prop_name_body
: '_'
| [0-9]
| prop_name_head
;
prop_name
: prop_name_head
| prop_name_head prop_name
;
id
: prop_name
| prop_name '.' id
;
// ---------------------------------------------
prop_eval
: '~' id '~'
;
if
: '~if' id ':' statements ':~'
| '~if' id ':' stateme... | Update grammar.g4 | Update grammar.g4 | ANTLR | apache-2.0 | codefacts/watertemplate-engine,tiagobento/watertemplate-engine,tiagobento/watertemplate-engine,codefacts/watertemplate-engine |
a61c8c7f65b97f69cd7a6b9442dfad6a3ea8bffd | watertemplate-engine/grammar.g4 | watertemplate-engine/grammar.g4 | prop_name_head
: Upper- or lowercase letter A through Z
;
prop_name_body
: _
| prop_name_head
;
prop_name
: prop_name_head
| prop_name_head prop_name_body
;
id
: prop_name
| prop_name.id
;
// ---------------------------------------------
prop_eval
: ~id~
;
if
: ~if id: statements :~
| ~if id: state... | prop_name_head
: Upper- or lowercase letter A through Z
;
prop_name_body
: '_'
| prop_name_head
;
prop_name
: prop_name_head
| prop_name_head prop_name_body
;
id
: prop_name
| prop_name '.' id
;
// ---------------------------------------------
prop_eval
: ~id~
;
if
: '~if' id ':' statements ':~'
| ... | Update grammar.g4 | Update grammar.g4 | ANTLR | apache-2.0 | codefacts/watertemplate-engine,tiagobento/watertemplate-engine,codefacts/watertemplate-engine,tiagobento/watertemplate-engine |
d217882226ff6b900ef63fd96a1d2537fcf9c0e5 | antlr4/ANTLRv4Lexer.PythonTarget.g4 | antlr4/ANTLRv4Lexer.PythonTarget.g4 | /*
* [The "BSD license"]
* Copyright (c) 2012-2015 Terence Parr
* Copyright (c) 2012-2015 Sam Harwell
* Copyright (c) 2015 Gerald Rosenberg
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* ... | /*
* [The "BSD license"]
* Copyright (c) 2012-2015 Terence Parr
* Copyright (c) 2012-2015 Sam Harwell
* Copyright (c) 2015 Gerald Rosenberg
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* ... | Fix int options parsing in ANTLRv4Lexer.g4 | Fix int options parsing in ANTLRv4Lexer.g4 | ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
0eb83d9481f9aacbeba910b05ca81b5764b0b581 | sharding-core/sharding-core-parse/sharding-core-parse-mysql/src/main/antlr4/imports/mysql/DDLStatement.g4 | sharding-core/sharding-core-parse/sharding-core-parse-mysql/src/main/antlr4/imports/mysql/DDLStatement.g4 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | modify commonDataTypeOption_ | modify commonDataTypeOption_
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc |
646900c83c6f7ae600f8cd1342a6067082074c9e | sharding-core/sharding-core-parse/sharding-core-parse-sqlserver/src/main/antlr4/imports/sqlserver/DDLStatement.g4 | sharding-core/sharding-core-parse/sharding-core-parse-sqlserver/src/main/antlr4/imports/sqlserver/DDLStatement.g4 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | modify alterTable rule | modify alterTable rule
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere |
1b96bf6e5f77cde915d9f7625e5b3e0abdfc61a3 | rexx/RexxParser.g4 | rexx/RexxParser.g4 | parser grammar RexxParser;
options { tokenVocab=RexxLexer; }
file : program_ EOF ;
program_ : ncl? instruction_list? ;
ncl : null_clause+ ;
null_clause : delim+ label_list?
| label_list
... | parser grammar RexxParser;
options { tokenVocab=RexxLexer; }
file : program_ EOF ;
program_ : ncl? instruction_list? ;
ncl : null_clause+ ;
null_clause : delim+ label_list?
| label_list
... | Support optional assignment expression | Support optional assignment expression
| ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
b369f9f8edc525113eb66d8c9f867609790254ef | toml/toml.g4 | toml/toml.g4 | /*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this f... | /*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this f... | allow leading zeroes in float exponent | [TOML] allow leading zeroes in float exponent
| ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
9931f78ad75b4d0fbbba65c77d5981edb01b7f44 | java/JavaLexer.g4 | java/JavaLexer.g4 | /*
[The "BSD licence"]
Copyright (c) 2013 Terence Parr, Sam Harwell
Copyright (c) 2017 Ivan Kochurkin (upgrade to Java 8)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of sou... | /*
[The "BSD licence"]
Copyright (c) 2013 Terence Parr, Sam Harwell
Copyright (c) 2017 Ivan Kochurkin (upgrade to Java 8)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of sou... | Fix unicode escape in fast java grammar | Fix unicode escape in fast java grammar
| ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
28849feebe6d9ab357c7421fdd0e67169ee0a436 | webidl/WebIDL.g4 | webidl/WebIDL.g4 | /*
BSD License
Copyright (c) 2013,2015 Rainer Schuster
Copyright (c) 2021 ethanmdavidson
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyrigh... | /*
BSD License
Copyright (c) 2013,2015 Rainer Schuster
Copyright (c) 2021 ethanmdavidson
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyrigh... | resolve todo | resolve todo
I think I was misreading the spec
| ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
aaed70a1bb3ebdde9ad1fab8c8a3d1e57db937d2 | pattern_grammar/STIXPattern.g4 | pattern_grammar/STIXPattern.g4 |
grammar STIXPattern;
pattern
: observationExpressions
;
observationExpressions
: <assoc=left> observationExpressions FOLLOWEDBY observationExpressions
| observationExpressionOr
;
observationExpressionOr
: <assoc=left> observationExpressionOr OR observationExpressionOr
| observationExpressionAnd
;
o... | // This is an ANTLR4 grammar for the STIX Patterning Language.
//
// http://docs.oasis-open.org/cti/stix/v2.0/stix-v2.0-part5-stix-patterning.html
grammar STIXPattern;
pattern
: observationExpressions
;
observationExpressions
: <assoc=left> observationExpressions FOLLOWEDBY observationExpressions
| observati... | Add link to (eventual) spec location. | Add link to (eventual) spec location.
| ANTLR | bsd-3-clause | oasis-open/cti-stix2-json-schemas |
c986ffd6b7bea6308b849848ec854efda483195c | sharding-core/src/main/antlr4/imports/OracleDCLStatement.g4 | sharding-core/src/main/antlr4/imports/OracleDCLStatement.g4 | grammar OracleDCLStatement;
import OracleKeyword, Keyword, OracleBase, BaseRule, DataType, Symbol;
/**
* each statement has a url,
* each base url : https://docs.oracle.com/database/121/SQLRF/.
* no begin statement in oracle
*/
//statements_9014.htm#SQLRF01603
grant
: GRANT
(
(grantSystemPrivileges |... | grammar OracleDCLStatement;
import OracleKeyword, Keyword, OracleBase, BaseRule, DataType, Symbol;
/**
* each statement has a url,
* each base url : https://docs.oracle.com/database/121/SQLRF/.
* no begin statement in oracle
*/
//statements_9014.htm#SQLRF01603
grant
: GRANT
(
(grantSystemPrivileges |... | add alterRole | add alterRole
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere |
d741352b566954d918f066e63aa20ad400f04bb1 | src/main/antlr/WorkflowCatalogQueryLanguage.g4 | src/main/antlr/WorkflowCatalogQueryLanguage.g4 | grammar WorkflowCatalogQueryLanguage;
@header {
package org.ow2.proactive.workflow_catalog.rest.query.parser;
}
// PARSER
start // start rule, begin parsing here
: expression
;
expression // ANTLR resolves ambiguities in favor of the alternative given first
: expression AND expression #andExpression... | grammar WorkflowCatalogQueryLanguage;
@header {
package org.ow2.proactive.workflow_catalog.rest.query.parser;
}
// PARSER
start // start rule, begin parsing here
: expression
;
expression // ANTLR resolves ambiguities in favor of the alternative given first
: expression AND expression #andExpression... | Update WorkflowCatalogQueryLanguage.g4 | Update WorkflowCatalogQueryLanguage.g4 | ANTLR | agpl-3.0 | laurianed/catalog,ShatalovYaroslav/catalog,ow2-proactive/catalog,ShatalovYaroslav/catalog,laurianed/catalog,ow2-proactive/catalog,ow2-proactive/catalog,yinan-liu/workflow-catalog,paraita/workflow-catalog,ShatalovYaroslav/catalog,laurianed/workflow-catalog,ow2-proactive/workflow-catalog,gparanthoen/workflow-catalog,laur... |
d6359122f471d1a70981d32bb3a4a1df41d341ce | SQLParser/Grammar/SQL.g4 | SQLParser/Grammar/SQL.g4 | grammar SQL;
options
{
language=CSharp;
}
//Everything inside the @header section will be placed at the start of your Parser class
@header {
using System;
}
@parser::members
{
protected const int EOF = Eof;
}
@lexer::members
{
protected const int EOF = Eof;
protected const int HIDDEN = Hidden;
}
... | grammar SQL;
options
{
language=CSharp;
}
//Everything inside the @header section will be placed at the start of your Parser class
@header {
using System;
}
@parser::members
{
protected const int EOF = Eof;
}
@lexer::members
{
protected const int EOF = Eof;
protected const int HIDDEN = Hidden;
}
... | Remove GROUP BY Clause | Remove GROUP BY Clause
| ANTLR | bsd-3-clause | migaman/prefSQL,taschnue/prefSQL,tcchrist/prefSQL |
c8847c6328d62833e24eb92162d7dbe68066875f | src/net/hillsdon/reviki/wiki/renderer/creole/CreoleTokens.g4 | src/net/hillsdon/reviki/wiki/renderer/creole/CreoleTokens.g4 | /* Todo:
* - Comments justifying and explaining every rule.
*/
lexer grammar CreoleTokens;
options { superClass=ContextSensitiveLexer; }
@members {
Formatting bold;
Formatting italic;
Formatting strike;
public void setupFormatting() {
bold = new Formatting("**");
italic = new Formatting("//");
... | /* Todo:
* - Comments justifying and explaining every rule.
*/
lexer grammar CreoleTokens;
options { superClass=ContextSensitiveLexer; }
@members {
Formatting bold;
Formatting italic;
Formatting strike;
public void setupFormatting() {
bold = new Formatting("**");
italic = new Formatting("//");
... | Terminate links by linebreaks as well as ending tokens | Terminate links by linebreaks as well as ending tokens
| ANTLR | apache-2.0 | strr/reviki,strr/reviki,CoreFiling/reviki,CoreFiling/reviki,ashirley/reviki,strr/reviki,CoreFiling/reviki,ashirley/reviki,strr/reviki,CoreFiling/reviki,ashirley/reviki,ashirley/reviki,strr/reviki,ashirley/reviki,CoreFiling/reviki |
8a4ba6caf8aae49486f99073092a02e37610832c | Solidity.g4 | Solidity.g4 | // Copyright 2016-2017 Federico Bond <federicobond@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
... | // Copyright 2016-2017 Federico Bond <federicobond@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
... | Remove useless 'from' from Identifier lexer rule | Remove useless 'from' from Identifier lexer rule
| ANTLR | mit | solidityj/solidity-antlr4,federicobond/solidity-antlr4 |
5a3fba7a67400ba82cc942f43a0c9996c27612e9 | kotlin/KotlinParser.g4 | kotlin/KotlinParser.g4 | /**
* Kotlin Grammar for ANTLR v4
*
* Based on:
* http://jetbrains.github.io/kotlin-spec/#_grammars_and_parsing
* and
* http://kotlinlang.org/docs/reference/grammar.html
*
* Tested on
* https://github.com/JetBrains/kotlin/tree/master/compiler/testData/psi
*/
parser grammar KotlinParser;
options { tokenVocab... | /**
* Kotlin Grammar for ANTLR v4
*
* Based on:
* http://jetbrains.github.io/kotlin-spec/#_grammars_and_parsing
* and
* http://kotlinlang.org/docs/reference/grammar.html
*
* Tested on
* https://github.com/JetBrains/kotlin/tree/master/compiler/testData/psi
*/
parser grammar KotlinParser;
options { tokenVocab... | Align rule names with the ones in Kotlin documentation | Align rule names with the ones in Kotlin documentation
| ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
d737aadba7160857fde076aad731a2e03ba883a7 | src/net/hillsdon/reviki/wiki/renderer/creole/CreoleTokens.g4 | src/net/hillsdon/reviki/wiki/renderer/creole/CreoleTokens.g4 | /* Todo:
* - Comments justifying and explaining every rule.
*/
lexer grammar CreoleTokens;
options { superClass=ContextSensitiveLexer; }
@members {
Formatting bold;
Formatting italic;
Formatting strike;
public void setupFormatting() {
bold = new Formatting("**");
italic = new Formatting("//");
... | /* Todo:
* - Comments justifying and explaining every rule.
*/
lexer grammar CreoleTokens;
options { superClass=ContextSensitiveLexer; }
@members {
Formatting bold;
Formatting italic;
Formatting strike;
public void setupFormatting() {
bold = new Formatting("**");
italic = new Formatting("//");
... | Allow raw URLs to contain //s | Allow raw URLs to contain //s
| ANTLR | apache-2.0 | strr/reviki,ashirley/reviki,CoreFiling/reviki,strr/reviki,CoreFiling/reviki,strr/reviki,strr/reviki,CoreFiling/reviki,strr/reviki,CoreFiling/reviki,ashirley/reviki,CoreFiling/reviki,ashirley/reviki,ashirley/reviki,ashirley/reviki |
fe5c760047d3ea0826885e9594379da0ffffa057 | src/main/antlr4/YokohamaUnitLexer.g4 | src/main/antlr4/YokohamaUnitLexer.g4 | lexer grammar YokohamaUnitLexer;
STAR_LBRACKET: '*[' [ \t]* -> mode(ABBREVIATION);
HASHES: Hashes [ \t]* -> mode(UNTIL_EOL) ;
TEST: Hashes [ \t]* 'Test:' [ \t]* -> mode(UNTIL_EOL);
SETUP: Hashes [ \t]* 'Setup:' [ \t]* -> mode(UNTIL_EOL);
EXERCISE: Hashes [ \t]* 'Exercise:' [ \t]* -> mode(UNTIL_EO... | lexer grammar YokohamaUnitLexer;
STAR_LBRACKET: '*[' [ \t]* -> mode(ABBREVIATION);
HASHES: Hashes [ \t]* -> mode(UNTIL_EOL) ;
TEST: Hashes [ \t]* 'Test:' [ \t]* -> mode(UNTIL_EOL);
SETUP: Hashes [ \t]* 'Setup:' [ \t]* -> mode(UNTIL_EOL);
EXERCISE: Hashes [ \t]* 'Exercise:' [ \t]* -> mode(UNTIL_EO... | Add regexp literal and verbs | Add regexp literal and verbs | ANTLR | mit | tkob/yokohamaunit,tkob/yokohamaunit |
73c60f9d631104bb313819ebd84bfb041a2b135d | protobuf3/Protobuf3.g4 | protobuf3/Protobuf3.g4 | // SDPX-License-Ientifier: Apache-2.0
/**
* A Protocol Buffers 3 grammar
*
* Original source: https://developers.google.com/protocol-buffers/docs/reference/proto3-spec
* Original source is published under Apache License 2.0.
*
* Changes from the source above:
* - rewrite to antlr
* - extract some group to rule.... | // SPDX-License-Identifier: Apache-2.0
/**
* A Protocol Buffers 3 grammar
*
* Original source: https://developers.google.com/protocol-buffers/docs/reference/proto3-spec
* Original source is published under Apache License 2.0.
*
* Changes from the source above:
* - rewrite to antlr
* - extract some group to rule... | fix typo of SPDX-License-Identifier | fix typo of SPDX-License-Identifier
| ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
da2ea698702130df2f6f9e43ef25bb8333b02abf | sharding-core/src/main/antlr4/imports/SQLServerDCLStatement.g4 | sharding-core/src/main/antlr4/imports/SQLServerDCLStatement.g4 | grammar SQLServerDCLStatement;
import SQLServerKeyword, DataType, Keyword, SQLServerBase, BaseRule, Symbol;
grant
: grantGeneral | grantDW
;
grantGeneral
: GRANT (ALL PRIVILEGES? | permissionOnColumns ( COMMA permissionOnColumns)*)
(ON (ID COLON COLON)? ID)? TO ids
(WITH GRANT OPTION)? (AS ID... | grammar SQLServerDCLStatement;
import SQLServerKeyword, DataType, Keyword, SQLServerBase, BaseRule, Symbol;
grant
: grantGeneral | grantDW
;
grantGeneral
: GRANT (ALL PRIVILEGES? | permissionOnColumns ( COMMA permissionOnColumns)*)
(ON (ID COLON COLON)? ID)? TO ids (WITH GRANT OPTION)? (AS ID)?
... | add limitedOptionsList | add limitedOptionsList
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc |
0e816dd594d7e1175ab290486883808e04493e18 | antlr/antlr4/ANTLRv4Lexer.g4 | antlr/antlr4/ANTLRv4Lexer.g4 | /*
* [The "BSD license"]
* Copyright (c) 2012-2015 Terence Parr
* Copyright (c) 2012-2015 Sam Harwell
* Copyright (c) 2015 Gerald Rosenberg
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* ... | /*
* [The "BSD license"]
* Copyright (c) 2012-2015 Terence Parr
* Copyright (c) 2012-2015 Sam Harwell
* Copyright (c) 2015 Gerald Rosenberg
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* ... | Update ANTLRv4Lexer.g4 | Update ANTLRv4Lexer.g4
Changed the Action mode to TargetLanguageAction to prevent a conflict with the Lexer built-in Action function | ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
d47e1f7beaa85dfec8da2a478e2e0bf095d61b7a | src/main/antlr4/YokohamaUnitLexer.g4 | src/main/antlr4/YokohamaUnitLexer.g4 | lexer grammar YokohamaUnitLexer;
HASH1: '#' ;
HASH2: '##' ;
HASH3: '###' ;
HASH4: '####' ;
HASH5: '#####' ;
HASH6: '######' ;
TEST: 'Test:' -> mode(TEST_LEADING);
TABLE: 'Table:' -> mode(TABLE_LEADING);
SETUP: 'Setup' -> mode(PHASE_LEADING);
EXERCISE: 'Exercise' -> mode(PHASE_LEADING);
VERIFY: 'Verify' -> mode(P... | lexer grammar YokohamaUnitLexer;
HASH1: '#' ;
HASH2: '##' ;
HASH3: '###' ;
HASH4: '####' ;
HASH5: '#####' ;
HASH6: '######' ;
TEST: 'Test:' -> mode(TEST_LEADING);
TABLE: 'Table:' -> mode(TABLE_LEADING);
SETUP: 'Setup' -> mode(PHASE_LEADING);
EXERCISE: 'Exercise' -> mode(PHASE_LEADING);
VERIFY: 'Verify' -> mode(P... | Remove "according" and "to" tokens | Remove "according" and "to" tokens | ANTLR | mit | tkob/yokohamaunit,tkob/yokohamaunit |
a14bbb54a6f0a46cb74db918a45ca570d8d03c2e | agc/agc.g4 | agc/agc.g4 | /*
BSD License
Copyright (c) 2013, Tom Everett
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and t... | /*
BSD License
Copyright (c) 2013, Tom Everett
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and t... | fix to agc | fix to agc
| ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
41116f80391e397b85c6bb4566c1d3163dfa29b7 | grammars/SimpleXML.g4 | grammars/SimpleXML.g4 | grammar SimpleXML;
document : prolog? comment? element
;
prolog : '<?xml ' attribute* '?>';
comment : '<!--' TEXT '-->'
;
element : LT Name attribute* '>' content* '</' Name '>'
| '<' Name attribute* '/>'
;
attribute : Name '="' TEXT '"'... | grammar SimpleXML;
document : prolog? comment? element
;
prolog : '<?xml ' attribute* '?>';
comment : '<!--' TEXT '-->'
;
element : '<' Name attribute* '>' content* '</' Name '>'
| '<' Name attribute* '/>'
;
attribute : Name '="' TEXT '"... | Fix up SimpleXML grammar as it appears in the thesis | Fix up SimpleXML grammar as it appears in the thesis
| ANTLR | apache-2.0 | premun/ingrid |
b45ce1cb43f9c45881caa583b054f2e72943e44c | pattern_grammar/STIXPattern.g4 | pattern_grammar/STIXPattern.g4 | // This is an ANTLR4 grammar for the STIX Patterning Language.
//
// http://docs.oasis-open.org/cti/stix/v2.0/stix-v2.0-part5-stix-patterning.html
grammar STIXPattern;
pattern
: observationExpressions
;
observationExpressions
: <assoc=left> observationExpressions FOLLOWEDBY observationExpressions
| observati... | // This is an ANTLR4 grammar for the STIX Patterning Language.
//
// http://docs.oasis-open.org/cti/stix/v2.0/stix-v2.0-part5-stix-patterning.html
grammar STIXPattern;
pattern
: observationExpressions
;
observationExpressions
: <assoc=left> observationExpressions FOLLOWEDBY observationExpressions
| observati... | Update to disallow unquoted hyphens in property names. | Update to disallow unquoted hyphens in property names.
| ANTLR | bsd-3-clause | oasis-open/cti-stix2-json-schemas |
3f401b10a3033427efb06360d2ad3738c8512df9 | src/main/antlr/mrtim/sasscompiler/grammar/Sass.g4 | src/main/antlr/mrtim/sasscompiler/grammar/Sass.g4 | grammar Sass;
NL : '\r'? '\n' -> skip;
WS : (' ' | '\t' | NL) -> skip;
COMMENT_START: '/*';
COMMENT_END: '*/';
COMMENT: COMMENT_START .*? COMMENT_END;
LINE_COMMENT : '//' ~[\r\n]* NL? -> skip;
DSTRING : '"' ('\\"' | ~'"')* '"';
SSTRING : '\'' ('\\\'' | ~'\'')* '\'';
URL : 'url(' ~[)]* ')';
COMMA : ',';
SEMICOLON: ';';... | grammar Sass;
NL : '\r'? '\n' -> skip;
WS : (' ' | '\t' | NL) -> skip;
COMMENT_START: '/*';
COMMENT_END: '*/';
COMMENT: COMMENT_START .*? COMMENT_END;
LINE_COMMENT : '//' ~[\r\n]* NL? -> skip;
DSTRING : '"' ('\\"' | ~'"')* '"';
SSTRING : '\'' ('\\\'' | ~'\'')* '\'';
URL : 'url(' ~[)]* ')';
COMMA : ',';
SEMICOLON: ';';... | Tidy up definition of value a little | Tidy up definition of value a little
| ANTLR | mit | mr-tim/sass-compiler,mr-tim/sass-compiler |
afd2e3c374e716f9d32ed8df3d730c09e8c6c463 | src/main/antlr4/YokohamaUnitParser.g4 | src/main/antlr4/YokohamaUnitParser.g4 | parser grammar YokohamaUnitParser;
options { tokenVocab=YokohamaUnitLexer; }
group: abbreviation* definition* ;
abbreviation: STAR_LBRACKET ShortName RBRACKET_COLON Line ;
definition: test
| fourPhaseTest
| tableDef
| codeBlock
| heading
;
test: TEST... | parser grammar YokohamaUnitParser;
options { tokenVocab=YokohamaUnitLexer; }
group: abbreviation* definition* ;
abbreviation: STAR_LBRACKET ShortName RBRACKET_COLON Line ;
definition: test
| fourPhaseTest
| tableDef
| codeBlock
| heading
;
test: TEST... | STOP was missing | Fix: STOP was missing | ANTLR | mit | tkob/yokohamaunit,tkob/yokohamaunit |
cf8befd558627f94d4b30db32a9c2b8531d60f95 | source/src/HML.g4 | source/src/HML.g4 | grammar HML;
hybridModel
: signalDeclaration*
variableDeclaration*
template*
program
EOF
;
template
: 'Template' ID formalParameters parStatement;
formalParameters
: '(' formalParameterDecls? ')'
;
formalParameterDecls
: type formalParameterDeclsRest
;
for... | grammar HML;
hybridModel
: signalDeclaration*
variableDeclaration*
template*
program
EOF
;
template
: 'Template' ID formalParameters parStatement;
formalParameters
: '(' formalParameterDecls? ')'
;
formalParameterDecls
: type formalParameterDeclsRest
;
for... | set when statement as : when{ a -> skip [] b->skip } | set when statement as :
when{ a -> skip [] b->skip }
| ANTLR | mit | fanghuixing/HML |
f5812ef2b28c129db366c8a7488991154ce8a053 | graphql/GraphQL.g4 | graphql/GraphQL.g4 | /*
The MIT License (MIT)
Copyright (c) 2015 Joseph T. McBride
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modif... | /*
The MIT License (MIT)
Copyright (c) 2015 Joseph T. McBride
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modif... | Fix issue in GraphQL grammar limiting the enum value definition only to 1 (the spec allows for multiple enum value definitions). | Fix issue in GraphQL grammar limiting the enum value definition only to 1 (the spec allows for multiple enum value definitions).
| ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
41b5f4ef97f86ad5ad33853389ac0276782f0635 | python/PythonParser.g4 | python/PythonParser.g4 | // Header included from Python site:
/*
* Grammar for Python
*
* Note: Changing the grammar specified in this file will most likely
* require corresponding changes in the parser module
* (../Modules/parsermodule.c). If you can't make the changes to
* that module yourself, please co-ordinate... | // Header included from Python site:
/*
* Grammar for Python
*
* Note: Changing the grammar specified in this file will most likely
* require corresponding changes in the parser module
* (../Modules/parsermodule.c). If you can't make the changes to
* that module yourself, please co-ordinate... | Use CheckVersion() and SetVersion() in PythonParser.g4 | Use CheckVersion() and SetVersion() in PythonParser.g4
| ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
f042500462a36144f0b777ccaf3ea77bb0a0b17b | projects/batfish/src/main/antlr4/org/batfish/grammar/cisco_nxos/CiscoNxosParser.g4 | projects/batfish/src/main/antlr4/org/batfish/grammar/cisco_nxos/CiscoNxosParser.g4 | parser grammar CiscoNxosParser;
import
CiscoNxos_common,
CiscoNxos_aaa,
CiscoNxos_bgp,
CiscoNxos_class_map,
CiscoNxos_crypto,
CiscoNxos_eigrp,
CiscoNxos_evpn,
CiscoNxos_fex,
CiscoNxos_interface,
CiscoNxos_ip_access_list,
CiscoNxos_ip_as_path_access_list,
CiscoNxos_ip_community_list,
CiscoNxos... | parser grammar CiscoNxosParser;
import
CiscoNxos_common,
CiscoNxos_aaa,
CiscoNxos_bgp,
CiscoNxos_class_map,
CiscoNxos_crypto,
CiscoNxos_eigrp,
CiscoNxos_evpn,
CiscoNxos_fex,
CiscoNxos_interface,
CiscoNxos_ip_access_list,
CiscoNxos_ip_as_path_access_list,
CiscoNxos_ip_community_list,
CiscoNxos... | remove parse ambiguity with s_boot vs s_null (#4678) | NX-OS: remove parse ambiguity with s_boot vs s_null (#4678)
| ANTLR | apache-2.0 | dhalperi/batfish,batfish/batfish,intentionet/batfish,arifogel/batfish,arifogel/batfish,intentionet/batfish,batfish/batfish,intentionet/batfish,batfish/batfish,dhalperi/batfish,intentionet/batfish,intentionet/batfish,dhalperi/batfish,arifogel/batfish |
c25d27cf9fb2d02db7ce3598f938a86c279d3ba7 | sharding-core/sharding-core-parse/sharding-core-parse-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 | sharding-core/sharding-core-parse/sharding-core-parse-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | check style | check style
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere |
5c0250f1922abe3a80f535a08033a63213ecf18b | projects/batfish/src/org/batfish/grammar/cisco/Cisco_routemap.g4 | projects/batfish/src/org/batfish/grammar/cisco/Cisco_routemap.g4 | parser grammar Cisco_routemap;
import Cisco_common;
options {
tokenVocab = CiscoLexer;
}
ip_policy_list_stanza
:
IP POLICY_LIST name = variable access_list_action NEWLINE match_rm_stanza*
;
match_as_path_access_list_rm_stanza
:
MATCH AS_PATH
(
name_list += variable
)+ NEWLINE
;
match_community... | parser grammar Cisco_routemap;
import Cisco_common;
options {
tokenVocab = CiscoLexer;
}
ip_policy_list_stanza
:
IP POLICY_LIST name = variable access_list_action NEWLINE match_rm_stanza*
;
match_as_path_access_list_rm_stanza
:
MATCH AS_PATH
(
name_list += variable
)+ NEWLINE
;
match_community... | allow 'community-list'? for set community-list in route-map | allow 'community-list'? for set community-list in route-map
| ANTLR | apache-2.0 | dhalperi/batfish,batfish/batfish,intentionet/batfish,intentionet/batfish,intentionet/batfish,batfish/batfish,arifogel/batfish,arifogel/batfish,arifogel/batfish,dhalperi/batfish,dhalperi/batfish,intentionet/batfish,intentionet/batfish,batfish/batfish |
b6c3e88c50f94eefd7b25c33647657cd9633795b | java-vtl-parser/src/main/antlr4/no/ssb/vtl/parser/VTL.g4 | java-vtl-parser/src/main/antlr4/no/ssb/vtl/parser/VTL.g4 | /*-
* #%L
* Java VTL
* %%
* Copyright (C) 2016 Hadrien Kohl
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... | /*-
* #%L
* Java VTL
* %%
* Copyright (C) 2016 Hadrien Kohl
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requi... | Use reference in the grammar | Use reference in the grammar
| ANTLR | apache-2.0 | statisticsnorway/java-vtl,statisticsnorway/java-vtl,statisticsnorway/java-vtl,hadrienk/java-vtl,hadrienk/java-vtl,statisticsnorway/java-vtl,hadrienk/java-vtl |
657917c5241ca51027246e65755c629329b50bf4 | src/main/antlr/UimaTokenRegex.g4 | src/main/antlr/UimaTokenRegex.g4 | /*******************************************************************************
* Copyright 2015-2017 - CNRS (Centre National de Recherche Scientifique)
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for ad... | /*******************************************************************************
* Copyright 2015-2017 - CNRS (Centre National de Recherche Scientifique)
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for ad... | improve lexer error printing by hiding whitespaces instead of skipping | improve lexer error printing by hiding whitespaces instead of skipping
| ANTLR | apache-2.0 | JuleStar/uima-tokens-regex |
adb5be432935f6179a47fcd6e835815f30d99af5 | css3/css3.g4 | css3/css3.g4 | grammar css3;
stylesheet
: importRule* (nested | ruleset)+
;
importRule
: ('@import' | '@include') STRING
;
nested
: '@' nest '{' properties? nested* '}'
;
nest
: IDENT IDENT* pseudo*
;
ruleset
: selectors '{' properties? '}'
;
selectors
: selector (',' selector)*
;
selector
: elem selector... | grammar css3;
stylesheet
: importRule* (nested | ruleset)+
;
import_css
: ('@import' | '@include') (STRING|URI) ';'?
;
nested
: '@' nest '{' properties? nested* '}'
;
nest
: IDENT IDENT* pseudo*
;
ruleset
: selectors '{' properties? '}'
;
selectors
: selector (',' selector)*
;
selector
:... | Update css3.g4 | Update css3.g4
Adding suport to @import url(STRING)
Ex.:
@import url("Style.css");
@import "Style.css";
.c {
color: black;
} | ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
cdae579d5c4e017a762467573a088590d387e445 | sharding-core/sharding-core-parse/sharding-core-parse-mysql/src/main/antlr4/imports/mysql/BaseRule.g4 | sharding-core/sharding-core-parse/sharding-core-parse-mysql/src/main/antlr4/imports/mysql/BaseRule.g4 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | fix GROUP_CONCAT's syntax | fix GROUP_CONCAT's syntax
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere |
68ede897e2ccb52a8dd1e7a784e5402fc915c246 | MATLAB.g4 | MATLAB.g4 | grammar MATLAB;
fileDecl : functionDecl // (functionDecl | classDecl)? functionDecl*
// | stat* // Script
;
functionDecl
: 'function' outArgs? ID inArgs? NL
;
outArgs
: ID '='
| '[' ID (',' ID)* ']' '='
;
inArgs
: '(' ID (',' ID)* ')'
;
fragment
DIGIT
: [0-9] ;
NL : '\... | grammar MATLAB;
fileDecl
: (functionDecl | classDecl)? functionDecl*
| stat* // Script
;
functionDecl
: 'function' outArgs? ID inArgs? NL stat* 'end' NL+
;
classDecl
: 'classdef' ID NL (propDecl|methodDecl)* 'end' NL+
;
propDecl
: 'properties' NL prop* 'end' NL+
;
methodDecl
... | Add simple classdef rule. | Add simple classdef rule.
| ANTLR | apache-2.0 | mattmcd/ParseMATLAB,mattmcd/ParseMATLAB |
103c3b87deac72960f106bb15130aa28b09d380b | cache/src/main/antlr4/net/runelite/cache/script/assembler/rs2asm.g4 | cache/src/main/antlr4/net/runelite/cache/script/assembler/rs2asm.g4 | /*
* Copyright (c) 2017, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* li... | /*
* Copyright (c) 2017, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* li... | Allow scripts to start with comments | cache: Allow scripts to start with comments
| ANTLR | bsd-2-clause | runelite/runelite,Sethtroll/runelite,l2-/runelite,abelbriggs1/runelite,l2-/runelite,abelbriggs1/runelite,devinfrench/runelite,runelite/runelite,devinfrench/runelite,abelbriggs1/runelite,KronosDesign/runelite,Sethtroll/runelite,runelite/runelite,Noremac201/runelite,KronosDesign/runelite,Noremac201/runelite |
b58291b299b4bc469ffc0b54757177157a028fa1 | omni-cx2x/src/cx2x/translator/language/Claw.g4 | omni-cx2x/src/cx2x/translator/language/Claw.g4 | /*
* This file is released under terms of BSD license
* See LICENSE file for more information
*/
/**
* ANTLR 4 Grammar file for the CLAW directive language.
*
* @author clementval
*/
grammar Claw;
@header
{
import java.util.List;
import java.util.ArrayList;
}
/*-----------------------------------------------... | /*
* This file is released under terms of BSD license
* See LICENSE file for more information
*/
/**
* ANTLR 4 Grammar file for the CLAW directive language.
*
* @author clementval
*/
grammar Claw;
@header
{
import java.util.List;
import java.util.ArrayList;
}
/*-----------------------------------------------... | Update whitespace skipping rule | Update whitespace skipping rule
| ANTLR | bsd-2-clause | clementval/claw-compiler,clementval/claw-compiler |
b6c7fc00b715a99b6ccdb0e9d0204df1d0f5d6ad | sharding-core/sharding-core-parse/sharding-core-parse-sqlserver/src/main/antlr4/imports/sqlserver/DDLStatement.g4 | sharding-core/sharding-core-parse/sharding-core-parse-sqlserver/src/main/antlr4/imports/sqlserver/DDLStatement.g4 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | rename to generatedColumnNameClause | rename to generatedColumnNameClause
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc |
4716ae1161b66a976dc22b94b98cbae1f272aafa | omni-cx2x/src/cx2x/translator/language/Claw.g4 | omni-cx2x/src/cx2x/translator/language/Claw.g4 | /*
* This file is released under terms of BSD license
* See LICENSE file for more information
*/
/**
* ANTLR 4 Grammar file for the CLAW directive language.
*
* @author clementval
*/
grammar Claw;
@header
{
import java.util.List;
import java.util.ArrayList;
import cx2x.translator.common.Constant;
import cx2x.... | /*
* This file is released under terms of BSD license
* See LICENSE file for more information
*/
/**
* ANTLR 4 Grammar file for the CLAW directive language.
*
* @author clementval
*/
grammar Claw;
@header
{
import java.util.List;
import java.util.ArrayList;
import cx2x.translator.common.Constant;
import cx2x.... | Add comment + set mapping_option | Add comment + set mapping_option
| ANTLR | bsd-2-clause | clementval/claw-compiler,clementval/claw-compiler |
bd582b12847fed01cbf57fae061cc87b01755c93 | src/main/antlr4/PluginDoc.g4 | src/main/antlr4/PluginDoc.g4 | grammar PluginDoc;
// TODO: pluginOption default value 不支持element是string(即包含quote)的array
// TODO: 允许包含空格的字符串,目前的解决方案是quoted_string, TEXT与IDENTIFIER容易混淆
// TODO: 丰富的plugin description, option description无法用简单的rule来表达, 需要直接引入markdown
// TODO: udfs
// 内容类型: string, url, quote_string, code, markdown
// 能够写原始的markdown,能够指... | grammar PluginDoc;
// TODO: pluginOption default value 不支持element是string(即包含quote)的array
// TODO: 允许包含空格的字符串,目前的解决方案是quoted_string, TEXT与IDENTIFIER容易混淆,
// see: https://stackoverflow.com/questions/6847971/antlr-identifier-with-whitespace
// https://stackoverflow.com/questions/29060496/allow-whitespace-sections-antlr4
... | update TODOs in PluginDoc.g4 | update TODOs in PluginDoc.g4
| ANTLR | apache-2.0 | InterestingLab/waterdrop,InterestingLab/waterdrop |
9578ca325f966a72432158eb663ce2561a7695a6 | pattern_grammar/STIXPattern.g4 | pattern_grammar/STIXPattern.g4 | // This is an ANTLR4 grammar for the STIX Patterning Language.
//
// http://docs.oasis-open.org/cti/stix/v2.0/stix-v2.0-part5-stix-patterning.html
grammar STIXPattern;
pattern
: observationExpressions EOF
;
observationExpressions
: <assoc=left> observationExpressions FOLLOWEDBY observationExpressions
| obser... | // This is an ANTLR4 grammar for the STIX Patterning Language.
//
// http://docs.oasis-open.org/cti/stix/v2.0/stix-v2.0-part5-stix-patterning.html
grammar STIXPattern;
pattern
: observationExpressions EOF
;
observationExpressions
: <assoc=left> observationExpressions FOLLOWEDBY observationExpressions
| obser... | Revert "Each Qualifier can only appear once" | Revert "Each Qualifier can only appear once"
This reverts commit e25a0f5da3d2a85c338165c00a1a7434862ed8ff.
In that commit the Exists operator was ambiguous if there are two
qualifiers. Also, the approach taken in that commit would not
scale well as more qualifiers are added. There is another way to
implement this in ... | ANTLR | bsd-3-clause | oasis-open/cti-stix2-json-schemas |
5ab6d544c004e5653f1c9f484a5b314fd0506623 | grammars/cs652/j/parser/J.g4 | grammars/cs652/j/parser/J.g4 | grammar J;
@header {
import cs652.j.semantics.*; // You will need these for stuff in "returns" clauses
import org.antlr.symbols.*;
}
file returns [GlobalScope scope] // this allows us to annotate trees with symtab info
: ... EOF
;
expression returns [Type type] // annotate all expression nodes with type in... | grammar J;
@header {
import cs652.j.semantics.*; // You will need these for stuff in "returns" clauses
import org.antlr.symtab.*;
}
file returns [GlobalScope scope] // this allows us to annotate trees with symtab info
: ... EOF
;
expression returns [Type type] // annotate all expression nodes with type inf... | change package | change package
| ANTLR | bsd-2-clause | USF-CS652-starterkits/parrt-vtable-symtab |
6f4a547ff7472ace9640e0b72cd290d2e4de3438 | sharding-core/sharding-core-parse/sharding-core-parse-postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4 | sharding-core/sharding-core-parse/sharding-core-parse-postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | rename to inheritClause_ | rename to inheritClause_
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere |
b0f13b2bee121bcdf175ef25cca5bfcffd7b1ab1 | antlr-calculator/src/main/java/net/codenest/antlr/calculator/Calculator.g4 | antlr-calculator/src/main/java/net/codenest/antlr/calculator/Calculator.g4 | grammar Calculator ;
/***********************************************************
* Parser rules: define grammars
**********************************************************/
input
: setVar NL input # ToSetVar
| plusOrMinus NL? EOF # Calculate ;
setVar
: ID EQUAL plusOrMinus #... | grammar Calculator ;
/***********************************************************
* Parser rules: define grammars
**********************************************************/
input
: setVar NL input # ToSetVar
| plusOrMinus NL? EOF # Calculate ;
setVar
: ID EQUAL plusOrMinus #... | update grammar layout | update grammar layout | ANTLR | apache-2.0 | sunke/codenest,sunke/codenest |
287a1fd22191c7b29c36ee3024ab2b97d2bc0cf9 | json5/JSON5.g4 | json5/JSON5.g4 |
/** Taken from "The Definitive ANTLR 4 Reference" by Terence Parr */
// Derived from http://json.org
grammar JSON5;
json5
: value
;
obj
: '{' pair (',' pair)* ','? '}'
| '{' '}'
;
pair
: key ':' value
;
key
: STRING
| IDENTIFIER
;
arr
: '[' value (',' value)* ','? ']'
| '[' ']... |
/** Taken from "The Definitive ANTLR 4 Reference" by Terence Parr */
// Derived from http://json.org
grammar JSON5;
json5
: value
;
obj
: '{' pair (',' pair)* ','? '}'
| '{' '}'
;
pair
: key ':' value
;
key
: STRING
| IDENTIFIER
;
arr
: '[' value (',' value)* ','? ']'
| '[' ']... | comment support | json5: comment support
| ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
d48fb7165f8671eba77db390e44f8a1cee9cda5e | sharding-core/src/main/antlr4/imports/BaseRule.g4 | sharding-core/src/main/antlr4/imports/BaseRule.g4 | //rule in this file does not allow override
grammar BaseRule;
import DataType,Keyword,Symbol;
ID:
(BACK_QUOTA?[a-zA-Z_$][a-zA-Z0-9_$]* BACK_QUOTA? DOT)?
(BACK_QUOTA?[a-zA-Z_$][a-zA-Z0-9_$]* BACK_QUOTA?)
|[a-zA-Z_$0-9]+ DOT ASTERISK
;
schemaName: ID;
tableName: ID;
columnName: ID;
tablespaceName: I... | //rule in this file does not allow override
grammar BaseRule;
import DataType,Keyword,Symbol;
ID:
(BQ_?[a-zA-Z_$][a-zA-Z0-9_$]* BQ_? DOT)?
(BQ_?[a-zA-Z_$][a-zA-Z0-9_$]* BQ_?)
| [a-zA-Z_$0-9]+ DOT ASTERISK
;
schemaName: ID;
tableName: ID;
columnName: ID;
tablespaceName: ID;
collationName: STRING | I... | fix BaseRule | fix BaseRule
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc |
84a145590f265ccadcca912d8c47f3affa9594d8 | mysql/MySQL.g4 | mysql/MySQL.g4 | grammar MySQL;
options {
tokenVocab=MySQLBase;
}
@header {
package jp.co.future.parser.antlr4.mysql;
}
stat:
select_clause+
;
schema_name:
ID
;
select_clause:
SELECT
column_list_clause
(FROM table_references)?
(where_clause)?
;
table_name:
ID
;
table_alias:
ID
;
column_name:
... | grammar MySQL;
options {
tokenVocab=MySQLBase;
}
stat:
select_clause+
;
schema_name:
ID
;
select_clause:
SELECT
column_list_clause
(FROM table_references)?
(where_clause)?
;
table_name:
ID
;
table_alias:
ID
;
column_name:
((schema_name DOT)? ID DOT)? ID (column_name_alias)?... | Update MySQL.g4 | Update MySQL.g4 | ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
f08fcdd41841b5b7b1f0cc8c81dbb8ed75896443 | src/main/antlr/mrtim/sasscompiler/grammar/Sass.g4 | src/main/antlr/mrtim/sasscompiler/grammar/Sass.g4 | grammar Sass;
NL : '\r'? '\n' -> skip;
WS : (' ' | '\t' | NL) -> skip;
COMMENT: '/*' .*? '*/' -> skip;
LINE_COMMENT : '//' ~[\r\n]* NL? -> skip;
STRING : '"' ('\\"' | ~'"')* '"';
URL : 'url(' ~[)]* ')';
COMMA : ',';
SEMICOLON: ';';
LPAREN: '(';
RPAREN: ')';
LBRACE: '{';
RBRACE: '}';
LSQBRACKET: '[';
RSQBRACKET: ']';
D... | grammar Sass;
NL : '\r'? '\n' -> skip;
WS : (' ' | '\t' | NL) -> skip;
COMMENT: '/*' .*? '*/' -> skip;
LINE_COMMENT : '//' ~[\r\n]* NL? -> skip;
DSTRING : '"' ('\\"' | ~'"')* '"';
SSTRING : '\'' ('\\\'' | ~'\'')* '\'';
URL : 'url(' ~[)]* ')';
COMMA : ',';
SEMICOLON: ';';
LPAREN: '(';
RPAREN: ')';
LBRACE: '{';
RBRACE: ... | Allow strings to be single or double quoted | Allow strings to be single or double quoted
| ANTLR | mit | mr-tim/sass-compiler,mr-tim/sass-compiler |
7815a5a8ef4360f64bc790e73dd4aa3360ddb261 | robozonky-strategy-natural/src/main/antlr4/imports/InvestmentSize.g4 | robozonky-strategy-natural/src/main/antlr4/imports/InvestmentSize.g4 | grammar InvestmentSize;
import Tokens;
@header {
import com.github.robozonky.strategy.natural.*;
}
investmentSizeExpression returns [Collection<InvestmentSize> result]:
{ Collection<InvestmentSize> result = new LinkedHashSet<>(); }
(i=investmentSizeRatingExpression { result.add($i.result); })+
{ $result = res... | grammar InvestmentSize;
import Tokens;
@header {
import com.github.robozonky.strategy.natural.*;
}
investmentSizeExpression returns [Collection<InvestmentSize> result]:
{ Collection<InvestmentSize> result = new LinkedHashSet<>(); }
(i=investmentSizeRatingExpression { result.add($i.result); })*
{ $result = res... | Make investment size spec optional | Make investment size spec optional
| ANTLR | apache-2.0 | triceo/zonkybot,triceo/zonkybot,triceo/robozonky,RoboZonky/robozonky,triceo/robozonky,RoboZonky/robozonky |
455776b1be8fc8163ea274b34f246a1d43ad5ce0 | pattern_grammar/STIXPattern.g4 | pattern_grammar/STIXPattern.g4 | // This is an ANTLR4 grammar for the STIX Patterning Language.
//
// http://docs.oasis-open.org/cti/stix/v2.0/stix-v2.0-part5-stix-patterning.html
grammar STIXPattern;
pattern
: observationExpressions
;
observationExpressions
: <assoc=left> observationExpressions FOLLOWEDBY observationExpressions
| observati... | // This is an ANTLR4 grammar for the STIX Patterning Language.
//
// http://docs.oasis-open.org/cti/stix/v2.0/stix-v2.0-part5-stix-patterning.html
grammar STIXPattern;
pattern
: observationExpressions EOF
;
observationExpressions
: <assoc=left> observationExpressions FOLLOWEDBY observationExpressions
| obser... | Add an EOF token at the end of the top-level pattern rule, so that parsers are forced to match all tokens in a sequence (instead of only an initial prefix of them). | Add an EOF token at the end of the top-level pattern rule,
so that parsers are forced to match all tokens in a sequence
(instead of only an initial prefix of them).
| ANTLR | bsd-3-clause | oasis-open/cti-stix2-json-schemas |
a13af4ad00de08c52eefab4bc1f9b931b9b5da56 | toml/toml.g4 | toml/toml.g4 | /*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this f... | /*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this f... | allow more than two digits in octal integers | [TOML] allow more than two digits in octal integers
| ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
e1b9c9441cd5b3050dcbcd6d1b3bbf90baf775f4 | java-vtl-parser/src/main/antlr4/imports/Relational.g4 | java-vtl-parser/src/main/antlr4/imports/Relational.g4 | grammar Relational;
relationalExpression : unionExpression ;
unionExpression : 'union' '(' datasetExpression (',' datasetExpression )* ')' ;
datasetExpression : 'datasetExpr' NUM+;
NUM : '0'..'9' ;
WS : [ \t\n\t] -> skip ;
| grammar Relational;
relationalExpression : unionExpression | joinExpression ;
unionExpression : 'union' '(' datasetExpression (',' datasetExpression )* ')' ;
datasetExpression : 'datasetExpr' NUM+;
joinExpression : '[' (INNER | OUTER | CROSS ) datasetExpression (',' datasetExpression )* ']' joinClause (',' joinClau... | Add joinExpression to the relationalExpression | Add joinExpression to the relationalExpression
| ANTLR | apache-2.0 | statisticsnorway/java-vtl,hadrienk/java-vtl,hadrienk/java-vtl,statisticsnorway/java-vtl,statisticsnorway/java-vtl,hadrienk/java-vtl,statisticsnorway/java-vtl |
de0303db24af747f9c80753dc72a3ac48776f673 | chabuildly.g4 | chabuildly.g4 | grammar chabuildly;
options {
language=JavaScript;
}
program : function* mainFunction;
mainFunction: 'start' '{' vars* block '}' 'end';
function: 'function' ID ':' params '{' vars* block '}' 'end';
vars : ('var' type ID | list) ';';
block : '{' statement* '}';
statement : (conditional|assignment|write|loop| r... | grammar chabuildly;
options {
language=JavaScript;
}
program : function* mainFunction;
mainFunction: 'start' '{' vars* block '}' 'end';
function: 'function' type ID ':' params '{' vars* block '}' 'end';
vars : ('var' type ID | list) ';';
block : '{' statement* '}';
statement : (conditional|assignment|write|lo... | add type to function | add type to function
| ANTLR | mit | montselozanod/ChabuScript,montselozanod/ChabuScript,montselozanod/ChabuScript |
82557f60b22937a4ac4b8f5a8b12d63bcff1af08 | src/main/antlr4/JmesPath.g4 | src/main/antlr4/JmesPath.g4 | grammar JmesPath;
import JSON;
query : expression EOF ;
expression
: expression '.' (identifier | multiSelectList | multiSelectHash | functionExpression | '*') # chainExpression
| expression bracketSpecifier # bracketedExpression
| bracketSpecifier # bracketExpression
| expression '||' expression # orExpress... | grammar JmesPath;
import JSON;
query : expression EOF ;
expression
: expression '.' (identifier | multiSelectList | multiSelectHash | functionExpression | '*') # chainExpression
| expression bracketSpecifier # bracketedExpression
| bracketSpecifier # bracketExpression
| expression '||' expression # orExpress... | Use NAME directly in function expressions | Use NAME directly in function expressions
This was not possible before when identifier was a lexer rule, but now when it's a parser rule there's no ambiguity and NAME works. | ANTLR | bsd-3-clause | burtcorp/jmespath-java |
1cc5edf0d021213e9d08816731553376c399c06a | sharding-core/src/main/antlr4/imports/OracleDCLStatement.g4 | sharding-core/src/main/antlr4/imports/OracleDCLStatement.g4 | grammar OracleDCLStatement;
import OracleKeyword, Keyword, OracleBase, BaseRule, DataType, Symbol;
/**
* each statement has a url,
* each base url : https://docs.oracle.com/database/121/SQLRF/.
* no begin statement in oracle
*/
//statements_9014.htm#SQLRF01603
grant
: GRANT
(
(grantSystemPrivileges |... | grammar OracleDCLStatement;
import OracleKeyword, Keyword, OracleBase, BaseRule, DataType, Symbol;
/**
* each statement has a url,
* each base url : https://docs.oracle.com/database/121/SQLRF/.
* no begin statement in oracle
*/
//statements_9014.htm#SQLRF01603
grant
: GRANT
(
(grantSystemPrivileges |... | add dropRole | add dropRole
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere |
297c0ffaf2a1ada851414c4f39cc856407a9fd80 | sharding-core/sharding-core-parse/sharding-core-parse-mysql/src/main/antlr4/imports/mysql/DDLStatement.g4 | sharding-core/sharding-core-parse/sharding-core-parse-mysql/src/main/antlr4/imports/mysql/DDLStatement.g4 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | rename to tableNotExistClause_ | rename to tableNotExistClause_
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc |
423e75c75ee9b981f9746c0949ee6b3e5c9c30c6 | sharding-core/src/main/antlr4/imports/OracleDCLStatement.g4 | sharding-core/src/main/antlr4/imports/OracleDCLStatement.g4 | grammar OracleDCLStatement;
import OracleKeyword, Keyword, OracleBase, BaseRule, DataType, Symbol;
/**
* each statement has a url,
* each base url : https://docs.oracle.com/database/121/SQLRF/.
* no begin statement in oracle
*/
//statements_9014.htm#SQLRF01603
grant
: GRANT
(
(grantSystemPrivileges |... | grammar OracleDCLStatement;
import OracleKeyword, Keyword, OracleBase, BaseRule, DataType, Symbol;
/**
* each statement has a url,
* each base url : https://docs.oracle.com/database/121/SQLRF/.
* no begin statement in oracle
*/
//statements_9014.htm#SQLRF01603
grant
: GRANT
(
(grantSystemPrivileges |... | add revokeSystemPrivileges | add revokeSystemPrivileges
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere |
664bf582118659d4993643cc76d377aebd04cc9c | smiles/smiles.g4 | smiles/smiles.g4 | /*
BSD License Copyright (c) 2017, Tom Everett All rights reserved. Redistribution and use in source
and binary forms, with or without modification, are permitted provided that the following
conditions are met: 1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the... | /*
BSD License Copyright (c) 2017, Tom Everett All rights reserved. Redistribution and use in source
and binary forms, with or without modification, are permitted provided that the following
conditions are met: 1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the... | Remove unnecessary parenthesis | Remove unnecessary parenthesis
| ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
3dc5bf34a677d6ef81034603257a13ed63758d06 | sharding-core/src/main/antlr4/imports/SQLServerDCLStatement.g4 | sharding-core/src/main/antlr4/imports/SQLServerDCLStatement.g4 | grammar SQLServerDCLStatement;
import SQLServerKeyword, DataType, Keyword, SQLServerBase, BaseRule, Symbol;
grant
: grantGeneral | grantDW
;
grantGeneral
: GRANT (ALL PRIVILEGES? | permissionOnColumns ( COMMA permissionOnColumns)*)
(ON (ID COLON COLON)? ID)? TO ids (WITH GRANT OPTION)? (AS ID)?
... | grammar SQLServerDCLStatement;
import SQLServerKeyword, DataType, Keyword, SQLServerBase, BaseRule, Symbol;
grant
: grantGeneral | grantDW
;
grantGeneral
: GRANT (ALL PRIVILEGES? | permissionOnColumns ( COMMA permissionOnColumns)*)
(ON (ID COLON COLON)? ID)? TO ids (WITH GRANT OPTION)? (AS ID)?
... | add createUser1 | add createUser1
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc |
0617223b2483293621a91785e231fcbb332eb8fd | lang/src/main/antlr4/org/kaazing/k3po/lang/parser/v2/Robot.g4 | lang/src/main/antlr4/org/kaazing/k3po/lang/parser/v2/Robot.g4 | /**
* Copyright (c) 2007-2014, Kaazing Corporation. All rights reserved.
*/
grammar Robot;
/* Parser rules */
// A robot script is comprised of a list of commands, events and barriers for
// each stream. Note that we deliberately allow empty scripts, in order to
// handle scripts which are comprised of nothing but ... | /**
* Copyright (c) 2007-2014, Kaazing Corporation. All rights reserved.
*/
grammar Robot;
/* Parser rules */
// A robot script is comprised of a list of commands, events and barriers for
// each stream. Note that we deliberately allow empty scripts, in order to
// handle scripts which are comprised of nothing but ... | Remove unused token labels from grammar | Remove unused token labels from grammar
| ANTLR | apache-2.0 | jfallows/k3po,StCostea/k3po,cmebarrow/k3po,jfallows/k3po,k3po/k3po,cmebarrow/k3po,StCostea/k3po,k3po/k3po |
9fa590fcde6137df5ffc1125c7a1855850f4f593 | sharding-core/src/main/antlr4/imports/BaseRule.g4 | sharding-core/src/main/antlr4/imports/BaseRule.g4 | //rule in this file does not allow override
grammar BaseRule;
import DataType,Keyword,Symbol;
ID:
(BQ_?[a-zA-Z_$][a-zA-Z0-9_$]* BQ_? DOT)?
(BQ_?[a-zA-Z_$][a-zA-Z0-9_$]* BQ_?)
|[a-zA-Z_$0-9]+ DOT ASTERISK
;
schemaName: ID;
tableName: ID;
columnName: ID;
tablespaceName: ID;
collationName: STRING | I... | //rule in this file does not allow override
grammar BaseRule;
import DataType,Keyword,Symbol;
ID:
(BQ_?[a-zA-Z_$][a-zA-Z0-9_$]* BQ_? DOT)?
(BQ_?[a-zA-Z_$][a-zA-Z0-9_$]* BQ_?)
|[a-zA-Z_$0-9]+ DOT ASTERISK
;
schemaName: ID;
tableName: ID;
columnName: ID;
tablespaceName: ID;
collationName: STRING | I... | add userNames roleNames | add userNames roleNames
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc |
01594e3e783bfb5c96b53faef8ad856ab905d32b | container-search/src/main/antlr4/com/yahoo/search/yql/yqlplus.g4 | container-search/src/main/antlr4/com/yahoo/search/yql/yqlplus.g4 | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
grammar yqlplus;
options {
superClass = ParserBase;
language = Java;
}
@header {
import java.util.Stack;
import com.yahoo.search.yql.*;
}
@parser::members {
protected static class expressio... | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
grammar yqlplus;
options {
superClass = ParserBase;
language = Java;
}
@header {
import java.util.Stack;
import com.yahoo.search.yql.*;
}
@parser::members {
protected static class expressio... | Remove unsupported constructs | Remove unsupported constructs
| ANTLR | apache-2.0 | vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.