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 |
|---|---|---|---|---|---|---|---|---|---|
8e9a1a2ea72e87e2f2a74b366cf830818c122d49 | emailaddress/emailaddress.g4 | emailaddress/emailaddress.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 the lwsp-char rule. | emailaddress: fix the lwsp-char rule.
According to the RFC 822 standard, a linear whitespace character
should either be a space or a horizontal tab. However, the current
grammar tries to match on the TAB lexer rule (which is not even
defined). The patch fixes this.
| 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 |
28ed148b4f74b304ec81e110cff2e565b7239ec2 | src/antlr/symLexer.g4 | src/antlr/symLexer.g4 | lexer grammar symLexer;
@lexer::members { // add members to generated symParser
String stops = " \t\n";
}
// standard namespaces
NS_CLJ_CORE : 'clojure.core' ;
NS_CLJ_LANG : 'clojure.lang' ;
// ...etc...
// specials
SPECIAL : DEF | DEFN | OR ;
DEF : 'def' ;
DEFN : 'defn' ;
OR : 'or' ;
/... | lexer grammar symLexer;
@lexer::members { // add members to generated symParser
String stops = " \t\n";
}
// standard namespaces
NS_CLJ_CORE : 'clojure.core' ;
NS_CLJ_LANG : 'clojure.lang' ;
// ...etc...
// specials
SPECIAL : DEF | DEFN | OR ;
DEF : 'def' ;
DEFN : 'defn' ;
OR : 'or' ;
/... | add some doc to symLexer | add some doc to symLexer
| ANTLR | epl-1.0 | mobileink/lab.antlr,mobileink/lab.clj.antlr |
f4b1b9a98348f5ec0dc525854a9ad7aee2a47f64 | 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.
//
... | Add address payable to possible typenames | Add address payable to possible typenames
| ANTLR | mit | solidityj/solidity-antlr4,federicobond/solidity-antlr4 |
a6208d9fba87c6beb8cc83177b92ec8e3f1a9baf | src/main/scala/org/interestinglab/waterdrop/configparser/Config.g4 | src/main/scala/org/interestinglab/waterdrop/configparser/Config.g4 | grammar Config;
config
: value
;
obj
: '{' pair (',' pair)* '}'
| '{' '}'
;
pair
: STRING '=' value
;
array
: '[' value (',' value)* ']'
| '[' ']'
;
value
: STRING
| NUMBER
| obj
| array
| 'true'
| 'false'
| 'null'
;
STRING
: '"' (ESC | ~ ["\\])* '"'
;... | grammar Config;
// Filter, Output 允许if else
// STRING lexer rule定义过于简单,不满足需求,包括包含引号的字符串.
// 允许comment
// [done]允许key不包含双引号
// [done] 允许多行配置没有","分割
// [done] 允许plugin中不包含任何配置
config
: input filter output
;
input
: 'input' '{' (STRING obj)* '}'
;
filter
: 'filter' '{' (STRING obj)* '}'
;
outp... | update grammer file | update grammer file
| ANTLR | apache-2.0 | InterestingLab/waterdrop,InterestingLab/waterdrop |
e4a4dfafff0482fbbbdc0a35f0a3a0575ff3bbbd | 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 mapping_var parser rule | Add mapping_var parser rule
| ANTLR | bsd-2-clause | clementval/claw-compiler,clementval/claw-compiler |
76bc8afd728213f6f96edac6490e81ef189f1f4d | 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.... | Fix ids_or_colon_list | Fix ids_or_colon_list
| ANTLR | bsd-2-clause | clementval/claw-compiler,clementval/claw-compiler |
2620459a5b3d7a577474c7d0d68d60d724c5d24a | projects/batfish/src/org/batfish/grammar/cisco/Cisco_isis.g4 | projects/batfish/src/org/batfish/grammar/cisco/Cisco_isis.g4 | parser grammar Cisco_isis;
import Cisco_common;
options {
tokenVocab = CiscoLexer;
}
address_family_iis_stanza
:
ADDRESS_FAMILY
(
IPV4
| IPV6
)
(
UNICAST
| MULTICAST
) NEWLINE common_iis_stanza*
;
address_family_is_stanza
:
ADDRESS_FAMILY
(
IPV4
| IPV6
... | parser grammar Cisco_isis;
import Cisco_common;
options {
tokenVocab = CiscoLexer;
}
address_family_iis_stanza
:
ADDRESS_FAMILY
(
IPV4
| IPV6
)
(
UNICAST
| MULTICAST
) NEWLINE common_iis_stanza*
;
address_family_is_stanza
:
ADDRESS_FAMILY
(
IPV4
| IPV6
... | fix missing reference to passive_interface_default_is_stanza | fix missing reference to passive_interface_default_is_stanza
| ANTLR | apache-2.0 | arifogel/batfish,intentionet/batfish,arifogel/batfish,intentionet/batfish,dhalperi/batfish,batfish/batfish,intentionet/batfish,intentionet/batfish,batfish/batfish,batfish/batfish,dhalperi/batfish,dhalperi/batfish,intentionet/batfish,arifogel/batfish |
94abd1d6ed04a23151ff8ef7f6e5a96c0c85b353 | 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 digits in interwiki link prefixes | Allow digits in interwiki link prefixes
| ANTLR | apache-2.0 | CoreFiling/reviki,strr/reviki,CoreFiling/reviki,CoreFiling/reviki,ashirley/reviki,ashirley/reviki,CoreFiling/reviki,ashirley/reviki,ashirley/reviki,ashirley/reviki,strr/reviki,strr/reviki,CoreFiling/reviki,strr/reviki,strr/reviki |
7191703f91c6985037e698b81a6b1af28b5de9c0 | sql/hive/grammar/FromClauseParser.g4 | sql/hive/grammar/FromClauseParser.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 join condition clause parsing | fix join condition clause parsing
| 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 |
9112118a4369f0d027afea23df390fa832ad74eb | 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.... | Allow dash to be in an IDENTIFIER | Allow dash to be in an IDENTIFIER
| ANTLR | bsd-2-clause | clementval/claw-compiler,clementval/claw-compiler |
2d40954d73e00f698cdac8b2a520d626b987c318 | refal/refal.g4 | refal/refal.g4 | /*
BSD License
Copyright (c) 2021, 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) 2021, 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... | Update refal/refal.g4 | Update refal/refal.g4
Co-authored-by: Ivan Kochurkin <7704623aa56c2b72c3121ff876cc07e7c36aec52@gmail.com> | 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 |
b20533b5e4bfda5db867a944d16fd12bfc1621a7 | src/main/java/org/apache/sysml/parser/dml/Dml.g4 | src/main/java/org/apache/sysml/parser/dml/Dml.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 ... | /*
* 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 ... | Fix dml.g4 to use semicolon after user-defined function | [SYSTEMML-639] Fix dml.g4 to use semicolon after user-defined function
Closes #166.
| ANTLR | apache-2.0 | iyounus/incubator-systemml,dhutchis/systemml,asurve/incubator-systemml,apache/incubator-systemml,gweidner/incubator-systemml,sandeep-n/incubator-systemml,dhutchis/systemml,asurve/incubator-systemml,gweidner/systemml,dusenberrymw/incubator-systemml,akchinSTC/systemml,asurve/arvind-sysml2,asurve/incubator-systemml,Wenpei... |
1368268a266cf0b21c967fd5a45e4112545a35b7 | 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 dropTable rule | modify dropTable rule
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc |
215f4c4c5db5c6fea7e4d9668d5587f6ee35a0f1 | sharding-core/sharding-core-parse/sharding-core-parse-postgresql/src/main/antlr4/imports/postgresql/Keyword.g4 | sharding-core/sharding-core-parse/sharding-core-parse-postgresql/src/main/antlr4/imports/postgresql/Keyword.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 key words | add key words
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc |
be06784384d1eba4cbcdffbc0c49673e8a74e47b | 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 tableNotExistClause_ | rename to tableNotExistClause_
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc |
3ea6ca4ddac81fc81575920af88326dbf691195e | antlr-calculator/src/main/java/net/codenest/antlr/calculator/Calculator.g4 | antlr-calculator/src/main/java/net/codenest/antlr/calculator/Calculator.g4 | grammar Calculator ;
INT
: [0-9]+ ;
DOUBLE
: [0-9]+'.'[0-9]+ ;
PI
: 'pi' ;
E
: 'e' ;
POW
: '^' ;
NL
: '\n' ;
WS
: [ \t\r]+ -> skip ;
ID
: [a-zA-Z_][a-zA-Z_0-9]* ;
PLUS
: '+' ;
EQUAL
: '=' ;
MINUS
: '-' ;
MULT
: '*' ;
DIV
: '/' ;
LPAR
: '(' ;
RPAR
... | 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 |
29ce56458c16b0bf89599ca60ce1340b599e05fd | 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
;
formalParameterDeclsRest
: ... | grammar HML;
hybridModel
: signalDeclaration*
variableDeclaration*
template*
program
EOF
;
template
: 'Template' ID formalParameters parStatement;
formalParameters
: '(' formalParameterDecls? ')'
;
formalParameterDecls
: type formalParameterDeclsRest
;
for... | modify format | modify format
| ANTLR | mit | fanghuixing/HML |
73f8ec83bcb60009474fa4edaddb3ea6528fae28 | datalog/datalog.g4 | datalog/datalog.g4 | /*
BSD License
Copyright (c) 2022, 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) 2022, 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... | update for symbol conflict | update for symbol conflict
| 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 |
d679b1d61fbd039da37ac7700b3b0a5543fa047a | projects/batfish/src/main/antlr4/org/batfish/grammar/cisco_nxos/CiscoNxos_static.g4 | projects/batfish/src/main/antlr4/org/batfish/grammar/cisco_nxos/CiscoNxos_static.g4 | parser grammar CiscoNxos_static;
import CiscoNxos_common;
options {
tokenVocab = CiscoNxosLexer;
}
ip_route
:
ROUTE
(
ip_route_network
| ip_route_static
)
;
ip_route_network
:
network = route_network
(
null0 = NULL0
| nhint = interface_name? nhip = ip_address
| nhint = interface_name... | parser grammar CiscoNxos_static;
import CiscoNxos_common;
options {
tokenVocab = CiscoNxosLexer;
}
ip_route
:
ROUTE
(
ip_route_network
| ip_route_static
)
;
ip_route_network
:
network = route_network
(
null0 = NULL0
| nhint = interface_name nhip = ip_address?
| nhip = ip_address
)
... | remove unecessary ambiguity (adaptive prediction) in the static route grammar (#4716) | NX-OS: remove unecessary ambiguity (adaptive prediction) in the static route grammar (#4716)
| ANTLR | apache-2.0 | intentionet/batfish,arifogel/batfish,intentionet/batfish,intentionet/batfish,batfish/batfish,dhalperi/batfish,dhalperi/batfish,arifogel/batfish,batfish/batfish,dhalperi/batfish,arifogel/batfish,intentionet/batfish,batfish/batfish,intentionet/batfish |
65a36a173a3e8830e2d37883bc6bc10ab82305b6 | 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,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere |
be3e175c5974e2f342b5ffb65c54fb2d8f2333c0 | 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 ... | check style | check style
| 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 |
bdcf81ae0165695a4df0957056d0b88c0a8a4d1c | robozonky-strategy-natural/src/main/antlr4/com/github/robozonky/strategy/natural/NaturalLanguageStrategy.g4 | robozonky-strategy-natural/src/main/antlr4/com/github/robozonky/strategy/natural/NaturalLanguageStrategy.g4 | grammar NaturalLanguageStrategy;
import Defaults, InvestmentSize, PortfolioStructure, MarketplaceFilters;
@header {
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Collection;
import java.util.Collections;
import org.apache.logging.log4j.LogManager;
import com.github... | grammar NaturalLanguageStrategy;
import Defaults, InvestmentSize, PortfolioStructure, MarketplaceFilters;
@header {
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Collection;
import java.util.Collections;
import org.apache.logging.log4j.LogManager;
import com.github... | Fix investment sizes parser bug | Fix investment sizes parser bug
| ANTLR | apache-2.0 | triceo/zonkybot,triceo/robozonky,triceo/robozonky,triceo/zonkybot,RoboZonky/robozonky,RoboZonky/robozonky |
57d3f465a88c56f9ca16aa43ec0eef52fee7215d | sharding-core/sharding-core-parse/sharding-core-parse-sqlserver/src/main/antlr4/imports/sqlserver/DCLStatement.g4 | sharding-core/sharding-core-parse/sharding-core-parse-sqlserver/src/main/antlr4/imports/sqlserver/DCLStatement.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,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere |
c41632f55ca2e4d8da46ea89ad14449ef5c90e39 | 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... | Remove duplicate 'on' from fragment definition | Remove duplicate 'on' from fragment definition
The 'on' work is defined on the typeCondition and isn't repeated on the fragment definition.
https://spec.graphql.org/June2018/#sec-Language.Fragments | 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 |
eb66cb75504158c1a70f939bd143d3819e2af1e7 | sharding-jdbc-ddl-parser/src/main/antlr4/io/shardingsphere/parser/antlr/postgre/PostgreDDL.g4 | sharding-jdbc-ddl-parser/src/main/antlr4/io/shardingsphere/parser/antlr/postgre/PostgreDDL.g4 | grammar PostgreDDL;
import PostgreKeyword, DataType, Keyword,BaseRule,Symbol;
createIndex:
CREATE UNIQUE? INDEX CONCURRENTLY? ((IF NOT EXISTS)? indexName)? ON tableName indexType?
keyParts
withStorageParameters?
tableSpaceClause?
whereClause?
;
alterIndex:
(alterIndexName(renameIndex | setTableSpac... | grammar PostgreDDL;
import PostgreKeyword, DataType, Keyword,BaseRule,Symbol;
createIndex:
CREATE UNIQUE? INDEX CONCURRENTLY? ((IF NOT EXISTS)? indexName)? ON tableName indexType?
keyParts
withStorageParameters?
tableSpaceClause?
whereClause?
;
alterIndex:
(alterIndexName(renameIndex | set... | add storageParametersWithParen rule | add storageParametersWithParen rule
add storageParametersWithParen rule | ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere |
6f54b4b6228b4eb7d7c39fefae0c273e4f4be1ec | 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-2019 Federico Bond <federicobond@gmail.com>
// Licensed under the MIT license. See LICENSE file in the project root for details.
grammar Solidity;
sourceUnit
: (pragmaDirective | importDirective | contractDefinition)* EOF ;
pragmaDirective
: 'pragma' pragmaName pragmaValue ';' ;
pragmaName
:... | Update license header | Update license header
| ANTLR | mit | solidityj/solidity-antlr4,federicobond/solidity-antlr4 |
329e8a3aebbf8a652cb88be3a9dd07475a1398f5 | src/grammar/Clojure.g4 | src/grammar/Clojure.g4 | /* Converted to ANTLR 4 by Terence Parr. Unsure of provence. I see
it commited by matthias.koester for clojure-eclipse project on
Oct 5, 2009:
https://code.google.com/p/clojure-eclipse/
Seems to me Laurent Petit had a version of this. I also see
Jingguo Yao submitting a link to a now-dead github projec... | // copy before editing!
// original: https://github.com/antlr/grammars-v4/blob/master/clojure/Clojure.g4
/* Converted to ANTLR 4 by Terence Parr. Unsure of provence. I see
it commited by matthias.koester for clojure-eclipse project on
Oct 5, 2009:
https://code.google.com/p/clojure-eclipse/
Seems to me La... | install read-only copy of Clojure.g4 from antlr repo | install read-only copy of Clojure.g4 from antlr repo
| ANTLR | epl-1.0 | mobileink/lab.antlr,mobileink/lab.clj.antlr |
bb37c95796c511cb63c72948afb6b3207355ce32 | 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;
permissionOnColumns
: permission columnList?
;
permission
: ID *?
;
| 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 grantGeneral | add grantGeneral
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere |
914d991160751938f9b4840911e1e815f9d9daae | prolog.g4 | prolog.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... | update TODOs | update TODOs
| 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 |
f933a3cd758610a3ba5763009c74dbb1afde7aa6 | omni-cx2x/src/cx2x/translator/language/parser/Claw.g4 | omni-cx2x/src/cx2x/translator/language/parser/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 cx2x.translator.common.ClawConstant;
import cx2x.translator.language.base.ClawDirective;
import c... | /*
* 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 cx2x.translator.common.ClawConstant;
import cx2x.translator.language.base.*;
import cx2x.translat... | Update the language object during parsing for copy/update clause | Update the language object during parsing for copy/update clause
| ANTLR | bsd-2-clause | clementval/claw-compiler,clementval/claw-compiler |
72c25638ce95d5d2ec1a150a5b6b51dbec7cb3e8 | sharding-core/src/main/antlr4/imports/PostgreBase.g4 | sharding-core/src/main/antlr4/imports/PostgreBase.g4 | grammar PostgreBase;
import PostgreKeyword, DataType, Keyword, Symbol, BaseRule;
columnDefinition
: columnName dataType collateClause? columnConstraint*
;
dataType
: typeName intervalFields? dataTypeLength? (WITHOUT TIME ZONE | WITH TIME ZONE)? (LEFT_BRACKET RIGHT_BRACKET)*
| ID
;
typeName
: DOUBLE ... | grammar PostgreBase;
import PostgreKeyword, DataType, Keyword, Symbol, BaseRule;
columnDefinition
: columnName dataType collateClause? columnConstraint*
;
dataType
: typeName intervalFields? dataTypeLength? (WITHOUT TIME ZONE | WITH TIME ZONE)? (LEFT_BRACKET RIGHT_BRACKET)*
| ID
;
typeName
: DOUBLE ... | fix postgre foreign key option | fix postgre foreign key option
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc |
7cbe4d3a8866779bffe63af7d2f110335d19db39 | src/main/resources/grammar/Goo.g4 | src/main/resources/grammar/Goo.g4 | /*
generic object-oriented programming language
a sample procedure:
rtn = foo.bar()
a.b.c().d().e.f()
a
a.b
a.b()
callback = foo:bar()
*/
grammar Goo;
@lexer::members {
public static final int WHITESPACE = 1;
public static final int COMMENTS = 2;
}
//this language don't support class
procedure :... | /*
generic object-oriented programming language
a sample procedure:
rtn = foo.bar()
a.b.c().d().e.f()
a
a.b
a.b()
callback = foo:bar()
*/
grammar Goo;
@lexer::members {
public static final int WHITESPACE = 1;
public static final int COMMENTS = 2;
}
//this language don't support class
procedure :... | change link grammar to support special characters | change link grammar to support special characters | ANTLR | apache-2.0 | jackhatedance/visual-programming,jackhatedance/visual-programming |
cdb6e1e15f691599b15a4d474952f38c7381a964 | src/grammar/RustLexer.g4 | src/grammar/RustLexer.g4 | lexer grammar RustLexer;
@lexer::members {
public boolean is_at(int pos) {
return _input.index() == pos;
}
}
tokens {
EQ, LT, LE, EQEQ, NE, GE, GT, ANDAND, OROR, NOT, TILDE, PLUT,
MINUS, STAR, SLASH, PERCENT, CARET, AND, OR, SHL, SHR, BINOP,
BINOPEQ, AT, DOT, DOTDOT, DOTDOTDOT, COMMA, SEMI, COLON... | lexer grammar RustLexer;
@lexer::members {
public boolean is_at(int pos) {
return _input.index() == pos;
}
}
tokens {
EQ, LT, LE, EQEQ, NE, GE, GT, ANDAND, OROR, NOT, TILDE, PLUS,
MINUS, STAR, SLASH, PERCENT, CARET, AND, OR, SHL, SHR, BINOP,
BINOPEQ, AT, DOT, DOTDOT, DOTDOTDOT, COMMA, SEMI, COLON... | Correct a typo in a declared token in the reference grammar | Correct a typo in a declared token in the reference grammar
This appears to not have too much of a detrimental effect, but it
doesn't seem to be what is intended either.
antlr doesn't mind that `PLUS` isn't declared in `tokens` and happily
uses the `PLUS` that appears later in the file, but the generated
RustLexer.to... | ANTLR | apache-2.0 | rohitjoshi/rust,aidancully/rust,aepsil0n/rust,carols10cents/rust,dwillmer/rust,pshc/rust,vhbit/rust,zubron/rust,pshc/rust,kwantam/rust,aidancully/rust,dwillmer/rust,krzysz00/rust,krzysz00/rust,KokaKiwi/rust,ejjeong/rust,pelmers/rust,mihneadb/rust,vhbit/rust,rohitjoshi/rust,mdinger/rust,graydon/rust,aneeshusa/rust,andar... |
527fa93f5a6e11a5218201d13dc329853df8c83a | terraform/terraform.g4 | terraform/terraform.g4 | /*
BSD License
Copyright (c) 2020, 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) 2020, 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... | Improve readability | Improve readability
| 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 |
f3d8ed1bea614dd2756d047bcc8e6bc57fc53275 | src/main/antlr4/com/kodcu/lang/Query.g4 | src/main/antlr4/com/kodcu/lang/Query.g4 | grammar Query;
/**
* Created by HAKAN on 26/06/2015.
*/
query
: queryDeclaration EOF
;
queryDeclaration
: queryTag dataLocation dataset
;
queryTag
: tag=(EXPORT|TRANSFER|COPY)
;
dataLocation
: databaseName '/' collectionName
;
databaseName
: IDENTIFIER
;
collectio... | grammar Query;
/**
* Created by HAKAN on 26/06/2015.
*/
query
: queryDeclaration EOF
;
queryDeclaration
: queryTag dataLocation dataset
;
queryTag
: tag=(EXPORT|TRANSFER|COPY)
;
dataLocation
: databaseName '/' collectionName
;
databaseName
: IDENTIFIER
;
collectio... | Update query grammar | Update query grammar
| ANTLR | mit | ozlerhakan/mongolastic |
25b1539060bfddef979b7f12106f04e0c23a2606 | mapping/core/src/main/antlr4/it/unibz/inf/ontop/spec/mapping/parser/impl/TurtleOBDA.g4 | mapping/core/src/main/antlr4/it/unibz/inf/ontop/spec/mapping/parser/impl/TurtleOBDA.g4 | /*
* #%L
* ontop-obdalib-core
* %%
* Copyright (C) 2009 - 2014 Free University of Bozen-Bolzano
* %%
* 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/lic... | /*
* #%L
* ontop-obdalib-core
* %%
* Copyright (C) 2009 - 2014 Free University of Bozen-Bolzano
* %%
* 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/lic... | fix antlr grammar | fix antlr grammar
| ANTLR | apache-2.0 | ontop/ontop,ontop/ontop,ontop/ontop,ontop/ontop,ontop/ontop |
a20218ebce88610ff4dd1f5a7d2f96ee5ac0edf5 | 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 https raw urls | Allow https raw urls
| ANTLR | apache-2.0 | ashirley/reviki,CoreFiling/reviki,strr/reviki,strr/reviki,ashirley/reviki,CoreFiling/reviki,CoreFiling/reviki,CoreFiling/reviki,strr/reviki,CoreFiling/reviki,ashirley/reviki,ashirley/reviki,ashirley/reviki,strr/reviki,strr/reviki |
43c4cdaf9e916d630fcf7bde4025af66bae2852b | 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... | Add `char` token | Add `char` token | ANTLR | mit | tkob/yokohamaunit,tkob/yokohamaunit |
f117d4549deb7549b4564542d53016b5231adea4 | src/main/antlr/com/github/oreissig/footran1/parser/Footran.g4 | src/main/antlr/com/github/oreissig/footran1/parser/Footran.g4 | /*
* A grammar for the original version of FORTRAN as described
* by IBM's programmer's reference manual from 1956:
* http://www.fortran.com/FortranForTheIBM704.pdf
*
* This grammar tries to keep its wording close to the original
* language reference, e.g. an array is called subscripted
* variable.
*/
grammar... | /*
* A grammar for the original version of FORTRAN as described
* by IBM's programmer's reference manual from 1956:
* http://www.fortran.com/FortranForTheIBM704.pdf
*
* This grammar tries to keep its wording close to the original
* language reference, e.g. an array is called subscripted
* variable.
*/
grammar... | make TODO more concrete | make TODO more concrete
| ANTLR | isc | oreissig/FOOTRAN-I |
be4c86a182e78b30b337f0c8d8194469247422aa | 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 createSpecification_ | rename to createSpecification_
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc |
05f1cc30edf8c524c55b9fcc2db3d6a180f02946 | 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 ... | modify constraintState | modify constraintState
| 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 |
8bd4cdad2f524339dd5f0376dce03c90572a5164 | PS.g4 | PS.g4 | grammar PS;
options {
language=Python2;
}
WS: [ \t\r\n]+ -> skip;
ADD: '+';
SUB: '-';
MUL: '*';
DIV: '/';
L_PAREN: '(';
R_PAREN: ')';
L_BRACE: '{';
R_BRACE: '}';
L_BRACKET: '[';
R_BRACKET: ']';
BAR: '|';
FUNC_LIM: '\\lim';
LIM_APPROACH_SYM: '\\to' | '\\rightarrow' | '\\Rightarrow';
FUNC_INT: '\\int';
FUNC_S... | grammar PS;
options {
language=Python2;
}
WS: [ \t\r\n]+ -> skip;
ADD: '+';
SUB: '-';
MUL: '*';
DIV: '/';
L_PAREN: '(';
R_PAREN: ')';
L_BRACE: '{';
R_BRACE: '}';
L_BRACKET: '[';
R_BRACKET: ']';
BAR: '|';
FUNC_LIM: '\\lim';
LIM_APPROACH_SYM: '\\to' | '\\rightarrow' | '\\Rightarrow';
FUNC_INT: '\\int';
FUNC_S... | Fix weird behavior | Fix weird behavior
| ANTLR | mit | augustt198/latex2sympy |
32cbd1599029ca66a709fdd13a41625e162b1caa | 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... | Introduce bloc | Introduce bloc
| 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 |
53cbc9fb885846107254ed34406898bb6d2b38df | 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 proxyClause | add proxyClause
| 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 |
2037acfa8be56f6ab1a55c686cdca2ea0b3fa713 | turin-parser/src/main/antlr4/me/tomassetti/parser/antlr/TurinParser.g4 | turin-parser/src/main/antlr4/me/tomassetti/parser/antlr/TurinParser.g4 | grammar TurinParser;
@header {
}
turinFile:
namespace=namespaceDecl nls
(imports+=importDeclaration)*
(members+=fileMember)+
EOF;
// Base
nls: NL+;
qualifiedId:
(parts+=ID POINT)* parts+=ID;
// Namespace
namespaceDecl:
NAMESPACE_KW name=qualifiedId;
// Imports
importDeclaration:
ty... | grammar TurinParser;
@header {
}
turinFile:
namespace=namespaceDecl nls
(imports+=importDeclaration)*
(members+=fileMember)+
EOF;
// Base
nls: NL+;
qualifiedId:
(parts+=ID POINT)* parts+=ID;
// Namespace
namespaceDecl:
NAMESPACE_KW name=qualifiedId;
// Imports
importDeclaration:
ty... | add clause "as xyz" to import declarations | add clause "as xyz" to import declarations
| ANTLR | apache-2.0 | ftomassetti/turin-programming-language,ftomassetti/turin-programming-language |
43d37089f68d0364c056dcf8131c2a8c10b13e7c | src/main/resources/syntax/LPMLN.g4 | src/main/resources/syntax/LPMLN.g4 | /**
* LPMLN 词法语法定义
* 王彬
* 2016-08-30
**/
grammar LPMLN;
/**
* 词法定义
**/
//缺省否定关键字
NAF_NOT : 'not ';
//字符串
STRING : '"' ('\\"'|~('"'))* '"';
//规则终结符
FULLSTOP : '.';
//正整数
POSITIVE_INT : [1-9][0-9]*;
//小数(点表示法)
DECIMAL : MINUS? (POSITIVE_INT* | ZERO ) FULLSTOP [0-9] ZERO* [1-9]*;
//0
ZERO : '0';
//常量
CONSTANT : [_]*[a-... | /**
* LPMLN 词法语法定义
* 王彬
* 2016-08-30
**/
grammar LPMLN;
/**
* 词法定义
**/
//缺省否定关键字
NAF_NOT : 'not ';
//字符串
STRING : '"' ('\\"'|~('"'))* '"';
//规则终结符
FULLSTOP : '.';
//正整数
POSITIVE_INT : [1-9][0-9]*;
//小数(点表示法)
DECIMAL : MINUS? (POSITIVE_INT* | ZERO ) FULLSTOP [0-9] ZERO* [1-9]*;
//0
ZERO : '0';
//identifier
IDENTIFIER... | 重构tuple,pooling,分离constant和identifier | 重构tuple,pooling,分离constant和identifier
Signed-off-by: 许鸿翔 <ebcf9462b4672da4b31ccb60a5db1234887eda71@foxmail.com>
| ANTLR | agpl-3.0 | wangbiu/lpmlnmodels |
c9d3d8ec8a990850dcac609a02734400790c3527 | src/main/antlr/SHRParser.g4 | src/main/antlr/SHRParser.g4 | parser grammar SHRParser;
options { tokenVocab=SHRLexer; }
shr: dataDefsDoc | valuesetDefsDoc /* | contentProfiles*/;
// DATA DEFINITIONS (Vocabularies, Entries, Elements)
dataDefsDoc: dataDefsHeader usesStatement? pathDefs? vocabularyDefs? dataDefs;
dataDefsHeader: KW_DATA_DEFINITIONS nam... | parser grammar SHRParser;
options { tokenVocab=SHRLexer; }
shr: dataDefsDoc | valuesetDefsDoc /* | contentProfiles*/;
// DATA DEFINITIONS (Vocabularies, Entries, Elements)
dataDefsDoc: dataDefsHeader usesStatement? pathDefs? vocabularyDefs? dataDefs;
dataDefsHeader: KW_DATA_DEFINITIONS nam... | Rename SupportingValue to Field | ANTLR4: Rename SupportingValue to Field
| ANTLR | apache-2.0 | standardhealth/shr_spec |
d5427a899dc04d2d3150461496da95a9c0563069 | src/main/antlr4/Gherkins.g4 | src/main/antlr4/Gherkins.g4 | grammar Gherkins;
@header {
package nl.eernie.jmoribus;
}
feature : NEWLINE* comment? NEWLINE* SPACE* tags? NEWLINE* SPACE* feature_keyword SPACE* line_to_eol NEWLINE+ (feature_elements .)* feature_elements ;
feature_elements
: (scenario_outline | scenario | background)* ;
background
: comment? tags? backgr... | grammar Gherkins;
@header {
package nl.eernie.jmoribus;
}
feature : NEWLINE* comment? NEWLINE* SPACE* tags? NEWLINE* SPACE* feature_keyword SPACE* line_to_eol NEWLINE+ (feature_elements .)* feature_elements ;
feature_elements
: (scenario | background)* ;
background
: comment? tags? background_keyword SPACE*... | Remove scenario outline keyword Fix comment repetition warning resulting in Antlr warning during compile time | Remove scenario outline keyword
Fix comment repetition warning resulting in Antlr warning during compile time
| ANTLR | mit | Eernie/JMoribus |
3ed95d70e990c91a3edf431be3bd56e1fd66f9d6 | 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 generalPrisOn TO ids (WITH GRANT OPTION)? (AS ID)?
;
generalPrisOn
: (ALL PRIVILEGES? | permissionOnColumns (COMMA permissionO... | grammar SQLServerDCLStatement;
import SQLServerKeyword, DataType, Keyword, SQLServerBase, BaseRule, Symbol;
grant
: grantGeneral | grantDW
;
grantGeneral
: GRANT generalPrisOn TO ids (WITH GRANT OPTION)? (AS ID)?
;
generalPrisOn
: (ALL PRIVILEGES? | permissionOnColumns (COMMA permissionO... | add sources | add sources
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere |
e68db088920f4f82963641c8baf1ccd0775cc8db | sharding-core/src/main/antlr4/io/shardingsphere/core/parsing/antlr/autogen/OracleStatement.g4 | sharding-core/src/main/antlr4/io/shardingsphere/core/parsing/antlr/autogen/OracleStatement.g4 | grammar OracleStatement;
import OracleKeyword, Keyword, OracleBase, OracleCreateIndex, OracleAlterIndex
, OracleDropIndex, OracleCreateTable, OracleAlterTable, OracleDropTable, OracleTruncateTable
, OracleTCLStatement, OracleDCLStatement
;
execute
: createIndex
| alterIndex
| dropInde... | grammar OracleStatement;
import OracleKeyword, Keyword, OracleBase, OracleCreateIndex, OracleAlterIndex
, OracleDropIndex, OracleCreateTable, OracleAlterTable, OracleDropTable, OracleTruncateTable
, OracleTCLStatement, OracleDCLStatement
;
execute
: createIndex
| alterIndex
| dropInde... | add drop user statement | add drop user statement
| 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 |
b55a6dd4ecea759e454a2bf13b45e022a69675fd | src/main/antlr4/nl/eernie/jmoribus/Gherkins.g4 | src/main/antlr4/nl/eernie/jmoribus/Gherkins.g4 | grammar Gherkins;
story
: prologue? scenario*;
prologue
: NEWLINE? prologue_keyword (NEWLINE step)+;
scenario
: NEWLINE? scenario_keyword title (NEWLINE step)+;
title
: line;
step
: step_keyword line;
line
: (SPACE|TEXT)*;
feature_keyword
: 'Feature:';
prologue_keyword
: 'Prologue... | grammar Gherkins;
story
: prologue? scenario*;
prologue
: NEWLINE? prologue_keyword (NEWLINE step)+;
scenario
: NEWLINE? scenario_keyword title (NEWLINE step)+;
title
: line;
step
: step_keyword line (NEWLINE SPACE SPACE line)*;
line
: (SPACE|TEXT)*;
feature_keyword
: 'Feature:';
prolog... | Support multiline steps | Support multiline steps
| ANTLR | mit | Eernie/JMoribus |
0f1e66f9b6ca813ed39a2f3e321be0e50bedcc8d | 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 createDefinitionClause_ | rename to createDefinitionClause_
| 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 |
d64e29583a3e9aef7dd585b02028f2998ee891ec | 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 tableNamesClause | add tableNamesClause
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere |
bc543795cef8e02e8469aeaa8f38fff79aa0a163 | terraform/terraform.g4 | terraform/terraform.g4 | /*
BSD License
Copyright (c) 2020, 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) 2020, 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 merge error | Fix merge error
| 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 |
656b506fd618ef7a90e7a7d4838180a3605a8dc7 | src/main/antlr/YokohamaUnitLexer.g4 | src/main/antlr/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_EOL);
VE... | 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_EOL);
VE... | Introduce SpacesOrComments fragment | Introduce SpacesOrComments fragment | ANTLR | mit | tkob/yokohamaunit,tkob/yokohamaunit |
294cb6e39b744139fa3841ed2276fd763c6351b3 | src/br/com/wfcreations/annms/core/sqlann/SQLANN.g4 | src/br/com/wfcreations/annms/core/sqlann/SQLANN.g4 | /*
* ANNDL - Artificial Neural Networks Definition Language
* ANNML - Artificial Neural Network Manipulation Language
* ANNQL - Artificial Neural Networks Query Language
*/
grammar SQLANN;
@header {
/*
* Copyright (c) 2013, Welsiton Ferreira (wfcreations@gmail.com)
* All rights reserved.
*
* Redistribution ... | /*
* ANNDL - Artificial Neural Networks Definition Language
* ANNML - Artificial Neural Network Manipulation Language
* ANNQL - Artificial Neural Networks Query Language
*/
grammar SQLANN;
@header {
/*
* Copyright (c) 2013, Welsiton Ferreira (wfcreations@gmail.com)
* All rights reserved.
*
* Redistribution ... | Update grammar | Update grammar
| ANTLR | bsd-3-clause | wfcreations/ANNMS |
8c88178939989907bd83b65badd620511531b08a | 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... | Add EOF token to all roots | Add EOF token to all roots
| 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 |
77e2e8320312b1a2a0345cc7837176f5b6fcbba3 | pdn/pdn.g4 | pdn/pdn.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 t... | /*
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 t... | Add EOF start rule to pdf/, fix parse with duplicate final result--apparently acceptable. | Add EOF start rule to pdf/, fix parse with duplicate final result--apparently acceptable.
| 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 |
ce7cd542c77add5fd0949f36a250d35b14e61ac9 | java/JavaParser.g4 | java/JavaParser.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 #1069 #1097 #1208 | Fix #1069 #1097 #1208
In constructor body:
- Fix calling parent constructor
- Fix calling overloaded constructor | 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 |
db9c9b38b8f8a702a578e37e94ce52a29fcdf665 | 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;
DSTRING : '"' ('\\"' | ~'"')* '"';
SSTRING : '\'' ('\\\'' | ~'\'')* '\'';
URL : 'url(' ~[)]* ')';
COMMA : ',';
SEMICOLON: ';';
LPAREN: '(';
RPAREN: ')';
LBRACE: '{';
RBRACE: ... | 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: ... | Expand IDENTIFIER to include css classes and ids | Expand IDENTIFIER to include css classes and ids
| ANTLR | mit | mr-tim/sass-compiler,mr-tim/sass-compiler |
6460d991df9285af115ec5624a55e7403888e9da | terraform/terraform.g4 | terraform/terraform.g4 | /*
BSD License
Copyright (c) 2020, 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) 2020, 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... | Reformat IDENTIFIER | Reformat 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 |
6fbbf9ff55344cbc144c7be391da85dc6ffbf3ca | Owl.g4 | Owl.g4 | /*
* Copyright 2016 Igor Demura
* 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 ... | /*
* Copyright 2016 Igor Demura
* 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 ... | Range for comment | Range for comment
| ANTLR | apache-2.0 | idemura/owl_lang,idemura/owl_lang,idemura/owl_lang,idemura/owl_lang |
1736de4054b09c1d2b947ec1c48eee93d3e0ccfb | lua/Lua.g4 | lua/Lua.g4 | /*
BSD License
Copyright (c) 2013, Kazunori Sakamoto
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... | /*
BSD License
Copyright (c) 2013, Kazunori Sakamoto
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... | Fix parser rules for comments. | Fix parser rules for comments.
| 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 |
c165a3010f155afb5a0dcf8890d4b10800dffbd6 | trans/src/wich/parser/Wich.g4 | trans/src/wich/parser/Wich.g4 | /*
The MIT License (MIT)
Copyright (c) 2015 Terence Parr, Hanzhou Shi, Shuai Yuan, Yuanyuan Zhang
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 MIT License (MIT)
Copyright (c) 2015 Terence Parr, Hanzhou Shi, Shuai Yuan, Yuanyuan Zhang
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... | allow empty {...} code blocks per Shuai | allow empty {...} code blocks per Shuai
| ANTLR | mit | hanjoes/wich-c,YuanyuanZh/wich-c,YuanyuanZh/wich-c,syuanivy/wich-c,syuanivy/wich-c,hanjoes/wich-c,langwich/wich-c,langwich/wich-c |
9cc366311dbdeaf0d5e22648352c9ceed7e315e4 | src/grammar/RustLexer.g4 | src/grammar/RustLexer.g4 | lexer grammar RustLexer;
tokens {
EQ, LT, LE, EQEQ, NE, GE, GT, ANDAND, OROR, NOT, TILDE, PLUT,
MINUS, STAR, SLASH, PERCENT, CARET, AND, OR, SHL, SHR, BINOP,
BINOPEQ, AT, DOT, DOTDOT, DOTDOTDOT, COMMA, SEMI, COLON,
MOD_SEP, RARROW, FAT_ARROW, LPAREN, RPAREN, LBRACKET, RBRACKET,
LBRACE, RBRACE, POUN... | lexer grammar RustLexer;
tokens {
EQ, LT, LE, EQEQ, NE, GE, GT, ANDAND, OROR, NOT, TILDE, PLUT,
MINUS, STAR, SLASH, PERCENT, CARET, AND, OR, SHL, SHR, BINOP,
BINOPEQ, AT, DOT, DOTDOT, DOTDOTDOT, COMMA, SEMI, COLON,
MOD_SEP, RARROW, FAT_ARROW, LPAREN, RPAREN, LBRACKET, RBRACKET,
LBRACE, RBRACE, POUN... | Update ANTLR float suffix grammar | Update ANTLR float suffix grammar
- Removes f128 from the grammar, which is no longer support in rustc
- The fragment modifier is added so it won't parse float suffix as a separate token | ANTLR | apache-2.0 | vhbit/rust,emk/rust,0x73/rust,hauleth/rust,rohitjoshi/rust,rohitjoshi/rust,KokaKiwi/rust,carols10cents/rust,ejjeong/rust,untitaker/rust,omasanori/rust,aepsil0n/rust,nwin/rust,rohitjoshi/rust,0x73/rust,defuz/rust,vhbit/rust,pshc/rust,philyoon/rust,ebfull/rust,kwantam/rust,untitaker/rust,jroesch/rust,ejjeong/rust,avdi/ru... |
cff71fbcbd3d9523c4e09d40adc1558646fcd063 | src/main/antlr/BMoThParser.g4 | src/main/antlr/BMoThParser.g4 | parser grammar BMoThParser;
options { tokenVocab=BMoThLexer; }
@header {
package de.bmoth.antlr;
}
start
: parse_unit EOF # ParseUnit
;
parse_unit
: MACHINE IDENTIFIER (clauses+=machine_clause)* END # MachineParseUnit
;
machine_clau... | parser grammar BMoThParser;
options { tokenVocab=BMoThLexer; }
@header {
package de.bmoth.antlr;
}
start
: parse_unit EOF # ParseUnit
;
parse_unit
: MACHINE IDENTIFIER (clauses+=machine_clause)* END # MachineParseUnit
;
machine_clau... | format grammar | format grammar
| ANTLR | mit | hhu-stups/bmoth |
967f6db83574560e0bba50f0507e9611203b1afc | src/main/antlr4/YokohamaUnitLexer.g4 | src/main/antlr4/YokohamaUnitLexer.g4 | lexer grammar YokohamaUnitLexer;
HASH1: '#' ;
HASH2: '##' ;
HASH3: '###' ;
HASH4: '####' ;
HASH5: '#####' ;
HASH6: '######' ;
TEST: 'Test:' -> mode(TEST_LEADING);
TABLECAPTION: '[' -> skip, mode(TABLE_NAME);
SETUP: 'Setup' -> mode(PHASE_LEADING);
EXERCISE: 'Exercise' -> mode(PHASE_LEADING);
VERIFY: 'V... | lexer grammar YokohamaUnitLexer;
HASH1: '#' ;
HASH2: '##' ;
HASH3: '###' ;
HASH4: '####' ;
HASH5: '#####' ;
HASH6: '######' ;
TEST: 'Test:' -> mode(TEST_LEADING);
TABLECAPTION: '[' -> skip, mode(TABLE_NAME);
SETUP: 'Setup' -> mode(PHASE_LEADING);
EXERCISE: 'Exercise' -> mode(PHASE_LEADING);
VERIFY: 'V... | Change mode to IN_THE_MIDDLE_OF_LINE if identifiers or literals are recognized | Change mode to IN_THE_MIDDLE_OF_LINE if identifiers or literals are recognized | ANTLR | mit | tkob/yokohamaunit,tkob/yokohamaunit |
35e624ec1f37afdf5d25716509a7d76f4e2c93ad | 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... | add parExpression as a sub-rule of expr | add parExpression as a sub-rule of expr
| ANTLR | mit | fanghuixing/HML |
2663a35a2111ef6cd832987816cc8aa4d40fbb67 | sharding-jdbc-ddl-parser/src/main/antlr4/imports/BaseRule.g4 | sharding-jdbc-ddl-parser/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;
tableOrViewName: ID;
columnNam... | //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;
tableOrViewName: ID;
columnNam... | Modify functionCall support arithmetic operation | Modify functionCall support arithmetic operation
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc |
f85aa15aaa09d313c658c3a5e3b942d981ffaa2f | dsl-parser/src/main/antlr4/com/mattunderscore/specky/parser/Specky.g4 | dsl-parser/src/main/antlr4/com/mattunderscore/specky/parser/Specky.g4 | /* Copyright © 2016 Matthew Champion
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 conditions and the follow... | /* Copyright © 2016 Matthew Champion
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 conditions and the follow... | Support empty bean and value specs. | Support empty bean and value specs.
| ANTLR | bsd-3-clause | mattunderscorechampion/specky,mattunderscorechampion/specky,mattunderscorechampion/specky |
44a997ac3c20378fd1cfe13393d602fbf08e5dec | algol60/algol60.g4 | algol60/algol60.g4 | grammar algol60;
// Derived from the authoratitive source ISO 1538
// You can download a free copy at:
// http://www.softwarepreservation.org/projects/ALGOL/report/ISO1538.pdf
// The spec, typical for most grammars at the time, do not distinguish
// BNF between the lexer and parser. The rules are divided here as:
//
... | grammar algol60;
// Derived from the authoratitive source ISO 1538
// You can download a free copy at:
// http://www.softwarepreservation.org/projects/ALGOL/report/ISO1538.pdf
// The spec, typical for most grammars at the time, do not distinguish
// BNF between the lexer and parser. The rules are divided here as:
//
... | Fix String, Open_string, Closed_string, and recursion. | Fix String, Open_string, Closed_string, and recursion.
| 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 |
e7781986cd378f26a4a2a9cb09ff98b7b57e8cdd | pymola/Modelica.g4 | pymola/Modelica.g4 | grammar Modelica;
//=========================================================
// B.2.1 Stored Definition - Within
//=========================================================
// B.2.1.1 ------------------------------------------------
stored_definition :
(WITHIN component_reference? ';')?
(stored_definition_c... | grammar Modelica;
//=========================================================
// B.2.1 Stored Definition - Within
//=========================================================
// B.2.1.1 ------------------------------------------------
stored_definition :
(WITHIN component_reference? ';')?
(stored_definition_c... | Fix typo in grammar | Fix typo in grammar
| ANTLR | bsd-3-clause | jgoppert/pymola,jgoppert/pymola |
098ce30f2b458d488070405b6f3d42908b5555a9 | src/main/antlr4/nl/basjes/parse/useragent/UserAgentTreeWalker.g4 | src/main/antlr4/nl/basjes/parse/useragent/UserAgentTreeWalker.g4 | /*
* Yet Another UserAgent Analyzer
* Copyright (C) 2013-2016 Niels Basjes
*
* 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 lat... | /*
* Yet Another UserAgent Analyzer
* Copyright (C) 2013-2016 Niels Basjes
*
* 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 lat... | Comment not yet implemented partial feature | Comment not yet implemented partial feature
| ANTLR | apache-2.0 | Innometrics/yauaa,nielsbasjes/yauaa,nielsbasjes/yauaa,nielsbasjes/yauaa,Innometrics/yauaa,nielsbasjes/yauaa |
36c5b2f564229d355713aa59f38992dcea9fd3a0 | 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 mapping_var_list parser rule | Add mapping_var_list parser rule
| ANTLR | bsd-2-clause | clementval/claw-compiler,clementval/claw-compiler |
f5c6cc11d2d9230b74952bb267c74111ef81e9cd | 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 minor warning in lexer | Fix minor warning in lexer
* Fragment rule can match empty string | 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 |
476c1bdcbc9b16ae19e5387cccc05e7b24293ebc | antlr/antlr4/Python3/ANTLRv4Lexer.g4 | antlr/antlr4/Python3/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
* ... | Fix name of Python-specific ANTLRv4 lexer grammar | Fix name of Python-specific ANTLRv4 lexer 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 |
0fee3e3e0151ec293959c64df28db6776bb4d79b | sharding-jdbc-ddl-parser/src/main/antlr4/imports/PostgreBase.g4 | sharding-jdbc-ddl-parser/src/main/antlr4/imports/PostgreBase.g4 | grammar PostgreBase;
import PostgreKeyword, DataType, Keyword, Symbol, BaseRule;
columnDefinition
: columnName dataType collateClause? columnConstraint*
;
dataType
: typeName intervalFields? dataTypeLength? (WITHOUT TIME ZONE | WITH TIME ZONE)? (LEFT_BRACKET RIGHT_BRACKET)*
| ID
;
typeName
: (SMALLI... | grammar PostgreBase;
import PostgreKeyword, DataType, Keyword, Symbol, BaseRule;
columnDefinition
: columnName dataType collateClause? columnConstraint*
;
dataType
: typeName intervalFields? dataTypeLength? (WITHOUT TIME ZONE | WITH TIME ZONE)? (LEFT_BRACKET RIGHT_BRACKET)*
| ID
;
typeName
: DOUBLE ... | Simplify typeName rule | Simplify typeName rule
| 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 |
14f44e9fee73dc25d22113cbe3741af150855dd6 | 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 |... | rename granteeClause to grantees | rename granteeClause to grantees
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere |
2481992c8fdf536248a869470bfaa7662ec8fe3c | src/main/antlr4/JmesPath.g4 | src/main/antlr4/JmesPath.g4 | grammar JmesPath;
import JSON;
query : expression EOF ;
expression
: expression '.' (IDENTIFIER | multi_select_list | multi_select_hash | function_expression | '*')
| expression bracket_specifier
| bracket_specifier
| expression '||' expression
| IDENTIFIER
| expression '&&' expression
| expression COM... | grammar JmesPath;
import JSON;
query : expression EOF ;
expression
: expression '.' (IDENTIFIER | multi_select_list | multi_select_hash | function_expression | '*')
| expression bracket_specifier
| bracket_specifier
| expression '||' expression
| IDENTIFIER
| expression '&&' expression
| expression COM... | Use JSON.g4's definition of WS, it's the same | Use JSON.g4's definition of WS, it's the same | ANTLR | bsd-3-clause | burtcorp/jmespath-java |
b3511c646e6f136a0545f49d4f8a62f122c39b1c | webidl/WebIDL.g4 | webidl/WebIDL.g4 | /*
BSD License
Copyright (c) 2013,2015 Rainer Schuster
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 conditio... | /*
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... | update to 3 May 2021 editors draft | update to 3 May 2021 editors draft
| 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 |
6f44cc2e7d64abb9db0d2236622fafefe61e7ff5 | refal/refal.g4 | refal/refal.g4 | /*
BSD License
Copyright (c) 2021, 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) 2021, 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... | Update refal/refal.g4 | Update refal/refal.g4
Co-authored-by: Ivan Kochurkin <7704623aa56c2b72c3121ff876cc07e7c36aec52@gmail.com> | 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 |
cfa8b77bb0ac7d09ab5258cfda07dafe2fd4922f | sharding-core/src/main/antlr4/imports/OracleKeyword.g4 | sharding-core/src/main/antlr4/imports/OracleKeyword.g4 | lexer grammar OracleKeyword;
import Symbol;
ADMIN
: A D M I N
;
AT
: A T
;
BATCH
: B A T C H
;
BITMAP
: B I T M A P
;
CACHE
: C A C H E
;
CASE
: C A S E
;
CHECKPOINT
: C H E C K P O I N T
;
COMMENT
: C O M M E N T
;
CONSTRAINTS
: C O N S T... | lexer grammar OracleKeyword;
import Symbol;
ADMIN
: A D M I N
;
AT
: A T
;
BATCH
: B A T C H
;
BITMAP
: B I T M A P
;
CACHE
: C A C H E
;
CASE
: C A S E
;
CHECKPOINT
: C H E C K P O I N T
;
COMMENT
: C O M M E N T
;
CONSTRAINTS
: C O N S T... | add revoke keyword | add revoke keyword
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere |
76aa78d09858d84c076831cf999e53aeca65ccb0 | grakn-graql/src/main/antlr4/ai/grakn/graql/internal/antlr/Graql.g4 | grakn-graql/src/main/antlr4/ai/grakn/graql/internal/antlr/Graql.g4 | grammar Graql;
queryList : query* EOF ;
queryEOF : query EOF ;
query : getQuery | insertQuery | defineQuery | undefineQuery | deleteQuery | aggregateQuery | computeQuery ;
matchPart : MATCH patterns # matchBase
| matchPart 'limit' INTEGER ';... | grammar Graql;
queryList : query* EOF ;
queryEOF : query EOF ;
query : getQuery | insertQuery | defineQuery | undefineQuery | deleteQuery | aggregateQuery | computeQuery ;
matchPart : MATCH patterns # matchBase
| matchPart 'limit' INTEGER ';... | Update Graql.g4 | Update Graql.g4 | ANTLR | agpl-3.0 | graknlabs/grakn,lolski/grakn,lolski/grakn,lolski/grakn,lolski/grakn,graknlabs/grakn,graknlabs/grakn,graknlabs/grakn |
57409d562963d85b6f14d8e3153d75546021ef7a | VineScript/Compiler/VineParser.g4 | VineScript/Compiler/VineParser.g4 | parser grammar VineParser;
/*
// django syntax: https://docs.djangoproject.com/en/1.10/topics/templates/#the-django-template-language
// django:
// * var: {{ foo }}
// * code: {% if foo %}
// * comment: {# comment #}
// detail: https://github.com/benjohnson/atom-django-templates/blob/master/grammars/ht... | parser grammar VineParser;
/*
// django syntax: https://docs.djangoproject.com/en/1.10/topics/templates/#the-django-template-language
// django:
// * var: {{ foo }}
// * code: {% if foo %}
// * comment: {# comment #}
// detail: https://github.com/benjohnson/atom-django-templates/blob/master/grammars/ht... | fix nested dictionary declaration (2) Forgot to commit the change in the parser's grammar in commit b567ab3e64875226c436dc13ed1603dbf9d4e4ed | Grammar: fix nested dictionary declaration (2)
Forgot to commit the change in the parser's grammar in commit b567ab3e64875226c436dc13ed1603dbf9d4e4ed
| ANTLR | mit | julsam/VineScript |
3084074200e9aac6cfb7d05cf97fedd09dc894fc | omni-cx2x/src/cx2x/translator/language/parser/Claw.g4 | omni-cx2x/src/cx2x/translator/language/parser/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 cx2x.translator.common.ClawConstant;
import cx2x.translator.language.base.*;
import cx2x.translat... | /*
* 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 cx2x.translator.common.ClawConstant;
import cx2x.translator.language.base.*;
import cx2x.translat... | Add copy/update clauses to parallelize forward | Add copy/update clauses to parallelize forward
| ANTLR | bsd-2-clause | clementval/claw-compiler,clementval/claw-compiler |
18d7325bc5668ac9b2577b66cb933953b61020e9 | sharding-core/sharding-core-parse/sharding-core-parse-postgresql/src/main/antlr4/imports/postgresql/BaseRule.g4 | sharding-core/sharding-core-parse/sharding-core-parse-postgresql/src/main/antlr4/imports/postgresql/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 ... | add tableNames rule | add tableNames rule
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere |
be6ceba788af3ffafd65e6ee9dc2a382aa837bd9 | clojure/Clojure.g4 | clojure/Clojure.g4 | /* Converted to ANTLR 4 by Terence Parr. Unsure of provence. I see
it commited by matthias.koester for clojure-eclipse project on
Oct 5, 2009:
https://code.google.com/p/clojure-eclipse/
Seems to me Laurent Petit had a version of this. I also see
Jingguo Yao submitting a link to a now-dead github proje... | /* Reworked for grammar specificity by Reid Mckenzie. Did a bunch of
work so that rather than reading "a bunch of crap in parens" some
syntactic information is preserved and recovered. Dec. 14 2014.
Converted to ANTLR 4 by Terence Parr. Unsure of provence. I see
it commited by matthias.koester for clojure-... | Improve grammar specificity | Improve grammar specificity
While the original grammar worked, the resulting tree was very hard to analyze as it had little remaining tag information. This reworked grammar supports all the existing reader macros, host expressions as proposed for Clojure 1.7 and retains significantly more context information making it... | 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 |
91a277c6ebd71997ff66fe175371d39eabadabce | 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 revokeRolesFromPrograms add programUnits use userNames roleNames | add revokeRolesFromPrograms
add programUnits
use userNames roleNames
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere |
2500d006d5ee48a32763093a5f3431afbb209629 | VineScriptLib/Compilers/Vine/VineLexer.g4 | VineScriptLib/Compilers/Vine/VineLexer.g4 | lexer grammar VineLexer;
@header {
using System;
}
@members{
//public override IToken Emit(){
// switch (_type) {
// case RESERVED_CHARS:
// //setType(RESERVED_CHARS);
// IToken result = base.Emit();
// // you'll need to define this method
// ... | lexer grammar VineLexer;
@header {
using System;
}
@members{
//public override IToken Emit(){
// switch (_type) {
// case RESERVED_CHARS:
// //setType(RESERVED_CHARS);
// IToken result = base.Emit();
// // you'll need to define this method
// ... | Rollback commit introducing 'is' and 'not' c40bceb3896dedb68c3df29bc122073f173e5d43 That was actually very confusing, didn't think things through. Couldn't tell the difference between 'foo != bar' and 'foo == !bar' as it would translate to 'foo is not bar' in both cases... | Rollback commit introducing 'is' and 'not' c40bceb3896dedb68c3df29bc122073f173e5d43
That was actually very confusing, didn't think things through.
Couldn't tell the difference between 'foo != bar' and 'foo == !bar' as it would translate to 'foo is not bar' in both cases...
| ANTLR | mit | julsam/VineScript |
ed88021e54955b0e8f58c8382b788d6efce7e311 | 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 ending a NoWiki block with a ' }}}' if it's the last thing before a newline | Allow ending a NoWiki block with a ' }}}' if it's the last thing before a newline
| ANTLR | apache-2.0 | strr/reviki,ashirley/reviki,ashirley/reviki,ashirley/reviki,ashirley/reviki,CoreFiling/reviki,CoreFiling/reviki,strr/reviki,strr/reviki,CoreFiling/reviki,strr/reviki,ashirley/reviki,strr/reviki,CoreFiling/reviki,CoreFiling/reviki |
42752dc59f1720683ce5d91cb7c3be78ca41a483 | terraform/terraform.g4 | terraform/terraform.g4 | /*
BSD License
Copyright (c) 2020, 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) 2020, 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... | Remove old code | Remove old code
| 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 |
46d6ed447d97a00244d687772b5bb33426d89064 | src/IFC-gen/Express.g4 | src/IFC-gen/Express.g4 | grammar Express;
schema_declaration
: SCHEMA Version ';' type_declaration* entity_declaration* function_declaration* END_SCHEMA';' EOF;
type_declaration
: TYPE type_name EQ (value_type|enumeration|select) FIXED? ';' type_declaration_body? END_TYPE ';' ;
type_name
: Identifier
;
value_type
: BOOLEAN
| INTE... | grammar Express;
schemaDeclaration
: SCHEMA Version ';' typeDeclaration* entityDeclaration* functionDeclaration* END_SCHEMA';' EOF;
typeDeclaration
: TYPE typeName EQ (valueType|enumeration|select) FIXED? ';' typeDeclarationBody? END_TYPE ';' ;
typeName
: Identifier
;
valueType
: BOOLEAN
| INTEGER
| LOGI... | Remove underscores from rule names. | Remove underscores from rule names.
| ANTLR | mit | ikeough/IFC-gen,ikeough/IFC-gen,ikeough/IFC-gen |
766e29ceef19c0f915dfc706fe368e60e77a682c | erlang/Erlang.g4 | erlang/Erlang.g4 | /*
[The "BSD licence"]
Copyright (c) 2013 Terence Parr
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 co... | /*
[The "BSD licence"]
Copyright (c) 2013 Terence Parr
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 co... | Update Erlang grammar to OTP 23.3 | Update Erlang grammar to OTP 23.3
| 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 |
962d8b658b4d4209b67f38064b1378e0470187c1 | sharding-jdbc-ddl-parser/src/main/resources/io/shardingsphere/parser/antlr/mysql/MySQLDDL.g4 | sharding-jdbc-ddl-parser/src/main/resources/io/shardingsphere/parser/antlr/mysql/MySQLDDL.g4 | grammar MySQLDDL;
import MySQLBase,MySQLKeyword,DDLBase,SQLBase,Keyword,Symbol;
@header{
package io.shardingsphere.parser.antlr.mysql;
}
createTableOptions:
createTableBasic
|createTableSelect
|createTableLike
;
createTableBasic:
;
createDefinition:
columnNameAndDefinition
(constraintDefinition|indexD... | grammar MySQLDDL;
import MySQLBase,MySQLKeyword,DDLBase,SQLBase,Keyword,Symbol;
@header{
package io.shardingsphere.parser.antlr.mysql;
}
createTableOptions:
createTableBasic
|createTableSelect
|createTableLike
;
createTableBasic:
LEFT_PAREN createDefinitions RIGHT_PAREN
tableOptions?
partitionOptions?
;
... | add create table rule | add create table rule
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc |
e3fa7c5b78efd0e35637ae88872b5988e83da614 | sharding-jdbc-ddl-parser/src/main/antlr4/imports/BaseRule.g4 | sharding-jdbc-ddl-parser/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:
(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... | Format BaseRule | Format BaseRule
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere |
afbab7b7ff704cfa9fb8e4eaed25abde11f8cc87 | 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 horizontal rules to be any number of -s greater than 4 long | Allow horizontal rules to be any number of -s greater than 4 long
| ANTLR | apache-2.0 | ashirley/reviki,CoreFiling/reviki,strr/reviki,CoreFiling/reviki,strr/reviki,strr/reviki,CoreFiling/reviki,strr/reviki,strr/reviki,CoreFiling/reviki,ashirley/reviki,CoreFiling/reviki,ashirley/reviki,ashirley/reviki,ashirley/reviki |
9bfbfadac8c01a8527d819a4c7e52c07ed76e4e6 | projects/batfish/src/org/batfish/grammar/flatjuniper/FlatJuniper_isis.g4 | projects/batfish/src/org/batfish/grammar/flatjuniper/FlatJuniper_isis.g4 | parser grammar FlatJuniper_isis;
import FlatJuniper_common;
options {
tokenVocab = FlatJuniperLexer;
}
isisilt_enable
:
ENABLE
;
isisilt_metric
:
METRIC DEC
;
isisilt_te_metric
:
TE_METRIC DEC
;
isisilt_null
:
(
HELLO_AUTHENTICATION_KEY
| HELLO_AUTHENTICATION_TYPE
| HELLO_INTERVAL... | parser grammar FlatJuniper_isis;
import FlatJuniper_common;
options {
tokenVocab = FlatJuniperLexer;
}
isisilt_enable
:
ENABLE
;
isisilt_metric
:
METRIC DEC
;
isisilt_te_metric
:
TE_METRIC DEC
;
isisilt_null
:
(
HELLO_AUTHENTICATION_KEY
| HELLO_AUTHENTICATION_TYPE
| HELLO_INTERVAL... | apply groups | apply groups
| ANTLR | apache-2.0 | arifogel/batfish,intentionet/batfish,batfish/batfish,dhalperi/batfish,intentionet/batfish,batfish/batfish,arifogel/batfish,batfish/batfish,arifogel/batfish,dhalperi/batfish,intentionet/batfish,intentionet/batfish,intentionet/batfish,dhalperi/batfish |
673e8b86843afc5c092b753c7c419738252a1ddd | grammars/cs652/cdecl/CDecl.g4 | grammars/cs652/cdecl/CDecl.g4 | grammar CDecl;
declaration
: typename declarator ';'
;
typename
: 'void'
| 'float'
| 'int'
| ID
;
declarator
: declarator '[' ']' # Array // right operators have highest precedence
| declarator '(' ')' # Func
| '*' declarator # Pointer
| '(' declarator ')' ... | grammar CDecl;
declaration
: typename declarator ';'
;
typename
: 'void'
| 'float'
| 'int'
| ID
;
declarator
: declarator '[' ']' # Array // right operators have highest precedence
| declarator '(' ')' # Func
| '*' declarator # Pointer
| '(' declarator ')' ... | Update CDecl.g4 | Update CDecl.g4 | ANTLR | bsd-2-clause | USF-CS652-starterkits/parrt-cdecl |
7586abf01b5c6fcbb60926c7cab7d3e5d133fa9a | src/grammar/RustLexer.g4 | src/grammar/RustLexer.g4 | lexer grammar RustLexer;
tokens {
EQ, LT, LE, EQEQ, NE, GE, GT, ANDAND, OROR, NOT, TILDE, PLUT,
MINUS, STAR, SLASH, PERCENT, CARET, AND, OR, SHL, SHR, BINOP,
BINOPEQ, AT, DOT, DOTDOT, DOTDOTDOT, COMMA, SEMI, COLON,
MOD_SEP, RARROW, FAT_ARROW, LPAREN, RPAREN, LBRACKET, RBRACKET,
LBRACE, RBRACE, POUN... | lexer grammar RustLexer;
tokens {
EQ, LT, LE, EQEQ, NE, GE, GT, ANDAND, OROR, NOT, TILDE, PLUT,
MINUS, STAR, SLASH, PERCENT, CARET, AND, OR, SHL, SHR, BINOP,
BINOPEQ, AT, DOT, DOTDOT, DOTDOTDOT, COMMA, SEMI, COLON,
MOD_SEP, RARROW, FAT_ARROW, LPAREN, RPAREN, LBRACKET, RBRACKET,
LBRACE, RBRACE, POUN... | Adjust Antlr4 lexer to include suffixes. | Adjust Antlr4 lexer to include suffixes.
This makes the formal lexical grammar (more closely) reflect the one
implemented by the compiler.
| ANTLR | apache-2.0 | 0x73/rust,rprichard/rust,pshc/rust,jashank/rust,aepsil0n/rust,kwantam/rust,untitaker/rust,GBGamer/rust,ktossell/rust,rprichard/rust,bombless/rust,mvdnes/rust,quornian/rust,cllns/rust,hauleth/rust,bombless/rust,carols10cents/rust,nwin/rust,bombless/rust,miniupnp/rust,GBGamer/rust,jroesch/rust,carols10cents/rust,zaeleus/... |
3cbeea95857b1bbee9744cf7b9024b7819b476c3 | 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 Specification | rename to Specification
| 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.