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 |
|---|---|---|---|---|---|---|---|---|---|
494f5c5edd607c283f5a789ca9f4c48eea84bf68 | webidl/WebIDL.g4 | webidl/WebIDL.g4 | /*
BSD License
Copyright (c) 2013, 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 conditions a... | /*
BSD License
Copyright (c) 2013, 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 conditions a... | Update to newest draft version. | Update to newest draft version. | 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 |
62cf0091a869a4830fd9cb81e005c3f0447d1a53 | sharding-jdbc-ddl-parser/src/main/resources/io/shardingsphere/parser/antlr/Keyword.g4 | sharding-jdbc-ddl-parser/src/main/resources/io/shardingsphere/parser/antlr/Keyword.g4 | lexer grammar Keyword;
import Symbol;
SELECT: S E L E C T;
ALL: A L L;
ANY: A N Y;
DISTINCT: D I S T I N C T;
FROM: F R O M;
PARTITION: P A R T I T I O N;
WHERE: W H E R E;
GROUP: G R O U P;
BY: B Y;
ASC: A S C;
DESC: D E S C;
WITH: W I T H;
RECURSIVE: R E C U R S I V E;
ROLLUP: R O L L U P;
HAVING: H A V I N G;... | lexer grammar Keyword;
import Symbol;
SELECT: S E L E C T;
ALL: A L L;
ANY: A N Y;
DISTINCT: D I S T I N C T;
FROM: F R O M;
PARTITION: P A R T I T I O N;
WHERE: W H E R E;
GROUP: G R O U P;
BY: B Y;
ASC: A S C;
DESC: D E S C;
WITH: W I T H;
RECURSIVE: R E C U R S I V E;
ROLLUP: R O L L U P;
HAVING: H A V I N G;... | add data type keyword | add data type keyword
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere |
d0c82768eb9ec99b6d6748f97036c5b861dc890b | 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... | add 'unset' to the 'reservedKeyword' rule | Grammar: add 'unset' to the 'reservedKeyword' rule
| ANTLR | mit | julsam/VineScript |
04735aef115efd3497afae0402b8edb74927a236 | sickbay/sickbay.g4 | sickbay/sickbay.g4 | /*
BSD License
Copyright (c) 2019, 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) 2019, 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 sickbay/ for NL on various platforms. | Fix sickbay/ for NL on various platforms.
| 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 |
7c9652ddc5c9d690e47faf2dfc0c0b50618c4c90 | watertemplate-engine/grammar.g4 | watertemplate-engine/grammar.g4 | prop_name_head
: [a-zA-Z]
;
prop_name_body
: '_'
| [0-9]
| prop_name_head
;
prop_name
: prop_name_head
| prop_name_head prop_name
;
id
: prop_name
| prop_name '.' id
;
// ---------------------------------------------
prop_eval
: '~' id '~'
;
if
: '~if' id ':' statements ':~'
| '~if' id ':' stateme... | prop_name_head
: [a-zA-Z]
;
prop_name_body_char
: '_'
| [0-9]
| prop_name_head
;
prop_name_body
: prop_name_body_char
| prop_name_body_char prop_name_body
prop_name
: prop_name_head
| prop_name_head prop_name_body
;
id
: prop_name
| prop_name '.' id
;
// ---------------------------------------------... | Update grammar.g4 | Update grammar.g4 | ANTLR | apache-2.0 | tiagobento/watertemplate-engine,tiagobento/watertemplate-engine,codefacts/watertemplate-engine,codefacts/watertemplate-engine |
b988eb855c8a513696866236ad2095ff3c9807f4 | java/monasca-common-model/src/main/resources/monasca/common/model/alarm/AlarmExpression.g4 | java/monasca-common-model/src/main/resources/monasca/common/model/alarm/AlarmExpression.g4 | /*
* (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
* Copyright 2016 FUJITSU LIMITED
*
* 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/li... | /*
* (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
* Copyright 2016 FUJITSU LIMITED
*
* 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/li... | Fix crash-loop in thresholder caused by floating point numbers used as dimension filter | Fix crash-loop in thresholder caused by floating point numbers used as dimension filter
Example: avg(some_timer{quantile=0.99}) > 0.1)
Changes:
* add DECIMAL (floating point value) to allowed tokens for dimensions
Without this fix, an alarm-definition like the above one once injected
through the Python API will brea... | ANTLR | apache-2.0 | stackforge/monasca-common,openstack/monasca-common,openstack/monasca-common,openstack/monasca-common,stackforge/monasca-common,stackforge/monasca-common |
c7a33b1f01b572531bbbdc394cb2061f86694950 | 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,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere |
1e73800cc811873231cead0d6710bc65b5696a50 | src/main/antlr/PythonLexer.g4 | src/main/antlr/PythonLexer.g4 | lexer grammar PythonLexer;
tokens {
INDENT, DEDENT, NEWLINE
}
DOT : '.';
ELLIPSIS : '...';
STAR : '*';
OPEN_PAREN : '(';
CLOSE_PAREN : ')';
COMMA : ',';
COLON : ':';
SEMI_COLON : ';';
POWER : '**';
ASSIGN : '=';
OPEN_BRACK : '[';
CLOSE_BRACK : ']';
OR_OP : '|';
XOR : '^';
AND_OP : '&';
LEFT_SHIFT : '<<';
RIGHT_SHIF... | lexer grammar PythonLexer;
tokens {
INDENT, DEDENT, NEWLINE
}
DOT : '.';
ELLIPSIS : '...';
STAR : '*';
OPEN_PAREN : '(';
CLOSE_PAREN : ')';
COMMA : ',';
COLON : ':';
SEMI_COLON : ';';
POWER : '**';
ASSIGN : '=';
OPEN_BRACK : '[';
CLOSE_BRACK : ']';
OR_OP : '|';
XOR : '^';
AND_OP : '&';
LEFT_SHIFT : '<<';
RIGHT_SHIF... | Add '_' to lexer ID | Add '_' to lexer ID
| ANTLR | bsd-3-clause | yotchang4s/cafebabepy |
cf359076efd862aa4eb23eccd5c99a07d78e7260 | src/main/antlr4/Config.g4 | src/main/antlr4/Config.g4 | grammar Config;
// [done] STRING lexer rule定义过于简单,不满足需求, 包括其中包含Quote(',")的String
// [done] nested bool expression中的字段引用
// [done] nested bool expression
// [done] Filter, Output 允许if else, 包含nested if..else
// [done] 允许key不包含双引号
// [done] 允许多行配置没有","分割
// [done] 允许plugin中不包含任何配置
// notes: lexer rule vs parser rule
//... | grammar Config;
// [done] STRING lexer rule定义过于简单,不满足需求, 包括其中包含Quote(',")的String
// [done] nested bool expression中的字段引用
// [done] nested bool expression
// [done] Filter, Output 允许if else, 包含nested if..else
// [done] 允许key不包含双引号
// [done] 允许多行配置没有","分割
// [done] 允许plugin中不包含任何配置
// notes: lexer rule vs parser rule
//... | update parser rule | update parser rule
| ANTLR | apache-2.0 | InterestingLab/waterdrop,InterestingLab/waterdrop |
61e42b424dd33fdb87a3a377c25d8b64ff3c8284 | 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("//");
... | Break out of lists properly upon exiting a block. | Break out of lists properly upon exiting a block.
| ANTLR | apache-2.0 | ashirley/reviki,strr/reviki,strr/reviki,ashirley/reviki,strr/reviki,CoreFiling/reviki,strr/reviki,ashirley/reviki,CoreFiling/reviki,strr/reviki,CoreFiling/reviki,CoreFiling/reviki,CoreFiling/reviki,ashirley/reviki,ashirley/reviki |
1ddb133a8e241aa8a861d88f35a719498f422d23 | src/grammars/org/antlr/intellij/plugin/parser/ANTLRv4Lexer.g4 | src/grammars/org/antlr/intellij/plugin/parser/ANTLRv4Lexer.g4 | /*
* [The "BSD license"]
* Copyright (c) 2012 Terence Parr
* Copyright (c) 2012 Sam Harwell
* 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 s... | /*
* [The "BSD license"]
* Copyright (c) 2012 Terence Parr
* Copyright (c) 2012 Sam Harwell
* 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 s... | Remove the DOUBLE_QUOTE_STRING_LITERAL rule since ANTLR 4 doesn't allow it anywhere | Remove the DOUBLE_QUOTE_STRING_LITERAL rule since ANTLR 4 doesn't allow it anywhere
| ANTLR | bsd-3-clause | rojaster/intellij-plugin-v4,antlr/intellij-plugin-v4,parrt/intellij-plugin-v4,bjansen/intellij-plugin-v4,Maccimo/intellij-plugin-v4,consulo/consulo-antlr4,Maccimo/intellij-plugin-v4,sharwell/intellij-plugin-v4,bjansen/intellij-plugin-v4,antlr/intellij-plugin-v4,rojaster/intellij-plugin-v4,parrt/intellij-plugin-v4 |
21b0dee2c3c1a35da4b92a43f5912a940c03cac3 | golang/Go/GoParser.g4 | golang/Go/GoParser.g4 | /*
[The "BSD licence"] Copyright (c) 2017 Sasa Coh, Michał Błotniak Copyright (c) 2019 Ivan Kochurkin,
kvanttt@gmail.com, Positive Technologies Copyright (c) 2019 Dmitry Rassadin,
flipparassa@gmail.com,Positive Technologies All rights reserved. Copyright (c) 2021 Martin Mirchev,
mirchevmartin2203@gmail.com
Redist... | /*
[The "BSD licence"] Copyright (c) 2017 Sasa Coh, Michał Błotniak Copyright (c) 2019 Ivan Kochurkin,
kvanttt@gmail.com, Positive Technologies Copyright (c) 2019 Dmitry Rassadin,
flipparassa@gmail.com,Positive Technologies All rights reserved. Copyright (c) 2021 Martin Mirchev,
mirchevmartin2203@gmail.com
Redist... | adjust grammar for Go target | adjust grammar for Go target
| 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 |
30b20a8fdd3fee543dce4071fc42f89da60553c6 | solidity/Solidity.g4 | solidity/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.
//
... | update solidity grammar | feat(solidity): update solidity 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 |
bb7d5c05285141034f6738d8d3a4e4a07f7f18e2 | projects/batfish/src/org/batfish/grammar/flatjuniper/FlatJuniper_bgp.g4 | projects/batfish/src/org/batfish/grammar/flatjuniper/FlatJuniper_bgp.g4 | parser grammar FlatJuniper_bgp;
import FlatJuniper_common;
options {
tokenVocab = FlatJuniperLexer;
}
bfi6t_null
:
LABELED_UNICAST s_null_filler
;
bfi6t_unicast
:
UNICAST bfi6t_unicast_tail
;
bfi6t_unicast_tail
:
//intentional blank
| bfi6ut_prefix_limit
;
bfi6ut_prefix_limit
:
PREFIX_LIMIT s_null... | parser grammar FlatJuniper_bgp;
import FlatJuniper_common;
options {
tokenVocab = FlatJuniperLexer;
}
bfi6t_null
:
LABELED_UNICAST s_null_filler
;
bfi6t_unicast
:
UNICAST bfi6t_unicast_tail
;
bfi6t_unicast_tail
:
//intentional blank
| bfi6ut_prefix_limit
;
bfi6ut_prefix_limit
:
PREFIX_LIMIT s_null... | allow multi-ary disjunctions and conjunctions in juniper policy expressions | allow multi-ary disjunctions and conjunctions in juniper policy
expressions
| ANTLR | apache-2.0 | batfish/batfish,arifogel/batfish,dhalperi/batfish,intentionet/batfish,intentionet/batfish,intentionet/batfish,batfish/batfish,arifogel/batfish,arifogel/batfish,dhalperi/batfish,dhalperi/batfish,batfish/batfish,intentionet/batfish,intentionet/batfish |
21abc4a2c9df6e99e47183b2b419f958f2565e93 | 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... | Add new keywords "a temp file" and "a temporary file" | Add new keywords "a temp file" and "a temporary file" | ANTLR | mit | tkob/yokohamaunit,tkob/yokohamaunit |
2f793fe17876da89f5b48434dd53d212077dfe19 | src/net/hillsdon/reviki/wiki/renderer/creole/parser/CreoleTokens.g4 | src/net/hillsdon/reviki/wiki/renderer/creole/parser/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("//");
... | Handle NoWiki in exactly the same way as code | Handle NoWiki in exactly the same way as code
| ANTLR | apache-2.0 | CoreFiling/reviki,ashirley/reviki,CoreFiling/reviki,CoreFiling/reviki,strr/reviki,ashirley/reviki,strr/reviki,ashirley/reviki,CoreFiling/reviki,CoreFiling/reviki,ashirley/reviki,strr/reviki,strr/reviki,ashirley/reviki,strr/reviki |
cfbf6e0ef7965fd0f9f46a4dd6f4ac4ba6ae5d57 | projects/batfish/src/main/antlr4/org/batfish/grammar/flatjuniper/FlatJuniperParser.g4 | projects/batfish/src/main/antlr4/org/batfish/grammar/flatjuniper/FlatJuniperParser.g4 | parser grammar FlatJuniperParser;
import
FlatJuniper_applications, FlatJuniper_common, FlatJuniper_fabric, FlatJuniper_firewall, FlatJuniper_forwarding_options, FlatJuniper_interfaces, FlatJuniper_policy_options, FlatJuniper_protocols, FlatJuniper_routing_instances, FlatJuniper_security, FlatJuniper_snmp, FlatJuniper_... | parser grammar FlatJuniperParser;
import
FlatJuniper_applications, FlatJuniper_common, FlatJuniper_fabric, FlatJuniper_firewall, FlatJuniper_forwarding_options, FlatJuniper_interfaces, FlatJuniper_policy_options, FlatJuniper_protocols, FlatJuniper_routing_instances, FlatJuniper_security, FlatJuniper_snmp, FlatJuniper_... | stop flatjuniper s_vlan rule incorrectly allowing blank 'set' line | stop flatjuniper s_vlan rule incorrectly allowing blank 'set' line
| ANTLR | apache-2.0 | intentionet/batfish,dhalperi/batfish,intentionet/batfish,batfish/batfish,batfish/batfish,arifogel/batfish,intentionet/batfish,dhalperi/batfish,intentionet/batfish,batfish/batfish,arifogel/batfish,arifogel/batfish,intentionet/batfish,dhalperi/batfish |
8234fdc9680a8ada7de13ebcb708c406c5992d48 | parser/Cel.g4 | parser/Cel.g4 | // Common Expression Language grammar for C++
// Based on Java grammar with the following changes:
// - rename grammar from CEL to Cel to generate C++ style compatible names.
grammar Cel;
// Grammar Rules
// =============
start
: e=expr EOF
;
expr
: e=conditionalOr (op='?' e1=conditionalOr ':' e2=expr)?... | // Common Expression Language grammar for C++
// Based on Java grammar with the following changes:
// - rename grammar from CEL to Cel to generate C++ style compatible names.
grammar Cel;
// Grammar Rules
// =============
start
: e=expr EOF
;
expr
: e=conditionalOr (op='?' e1=conditionalOr ':' e2=expr)?... | Add underscore to names | Add underscore to names | ANTLR | apache-2.0 | google/cel-cpp,google/cel-cpp |
7ef1fede9cb4c6c038d61abea8c3322ccf35eda0 | pattern_grammar/STIXPattern.g4 | pattern_grammar/STIXPattern.g4 | // This is an ANTLR4 grammar for the STIX Patterning Language.
//
// http://docs.oasis-open.org/cti/stix/v2.0/stix-v2.0-part5-stix-patterning.html
grammar STIXPattern;
pattern
: observationExpressions
;
observationExpressions
: <assoc=left> observationExpressions FOLLOWEDBY observationExpressions
| observati... | // This is an ANTLR4 grammar for the STIX Patterning Language.
//
// http://docs.oasis-open.org/cti/stix/v2.0/stix-v2.0-part5-stix-patterning.html
grammar STIXPattern;
pattern
: observationExpressions
;
observationExpressions
: <assoc=left> observationExpressions FOLLOWEDBY observationExpressions
| observati... | Change the keyword tokens to require correct case (mostly upper case), and remove the single letter lexer grammar fragments. | Change the keyword tokens to require correct case (mostly
upper case), and remove the single letter lexer grammar
fragments.
| ANTLR | bsd-3-clause | oasis-open/cti-stix2-json-schemas |
34686e76ad702eb05e156fb047e6c852300aed63 | 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);
TABLE_CAPTION: '[' -> skip, mode(TABLE_NAME);
SETUP: 'Setup' -> mode(PHASE_LEADING);
EXERCISE: 'Exercise' -> mode(PHASE_LEADING);
VERIFY: '... | Use snake stype identifiyer for upper case identifiers | Use snake stype identifiyer for upper case identifiers | ANTLR | mit | tkob/yokohamaunit,tkob/yokohamaunit |
4dfd2917d91a32b1d5008018c7a6c63af8e3251b | python3-cs/Python3Parser.g4 | python3-cs/Python3Parser.g4 | /*
* The MIT License (MIT)
*
* Copyright (c) 2014 by Bart Kiers
*
* 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... | /*
* The MIT License (MIT)
*
* Copyright (c) 2014 by Bart Kiers
*
* 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... | Fix error in Python3Parser grammar | Fix error in Python3Parser 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 |
88272816f3029a6660babec32674c6dc61ac3dbb | 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 usesStatements* dataDefs;
dataDefsHeader: KW_DATA_DEFINITIONS namespace;
usesStatements: ... | parser grammar SHRParser;
options { tokenVocab=SHRLexer; }
shr: dataDefsDoc | valuesetDefsDoc /* | contentProfiles*/;
// DATA DEFINITIONS (Vocabularies, Entries, Elements)
dataDefsDoc: dataDefsHeader usesStatement? dataDefs;
dataDefsHeader: KW_DATA_DEFINITIONS namespace;
usesStatement: ... | Fix ANTLR4 grammar for 'Uses' | Fix ANTLR4 grammar for 'Uses'
Fix grammar to reflect that `Uses:` puts all used namespaces in a single comma-separated statement. Also allow `Uses:` for value set def files.
| ANTLR | apache-2.0 | standardhealth/shr_spec |
b102b81b64bd21b74b76b1683f4bd6488f4a022a | sharding-core/sharding-core-parse/sharding-core-parse-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 | sharding-core/sharding-core-parse/sharding-core-parse-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | add createIndexClause_ | add createIndexClause_
| 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 |
a734b4572060b250744f15a06a0498920fb0addd | DogeSharp/DogeSharp.g4 | DogeSharp/DogeSharp.g4 | grammar DogeSharp;
prog:
useNamespace* declareClass*;
stmt:
expr+ ';';
expr:
'such' ID=Ident Expr=expr # Declare
| Left=expr 'so' Right=expr # Assign
| Pre=('plz'|'gimme') (Expr=expr '.')? ID=Ident ('many' expr+)? # Call
| 'fetch' Target=expr '.' ID=Ident # GetField
| 'wow' Expr=exp... | grammar DogeSharp;
prog:
useNamespace* declareClass*;
stmt:
expr+ ';';
expr:
'such' ID=Ident Expr=expr # Declare
| Left=expr 'so' Right=expr # Assign
| Pre=('plz'|'gimme') (Expr=expr '.')? ID=Ident ('many' expr+)? # Call
| 'fetch' Target=expr '.' ID=Ident # GetField
| 'wow' Expr=exp... | Support for virtual, override and protected | [lang] Support for virtual, override and protected
| ANTLR | mit | returnString/DogeSharp,returnString/DogeSharp |
be76f72643d95cf6bb08d23ac5516c6f2e4ed54d | de.peeeq.wurstscript/parserspec/Wurst.g4 | de.peeeq.wurstscript/parserspec/Wurst.g4 | grammar Wurst;
compilationUnit : NL* decls+=topLevelDeclaration*;
topLevelDeclaration:
wpackage
| jassTopLevelDeclaration
;
jassTopLevelDeclaration:
jassGlobalsBlock
| jassFuncDef
| jassTypeDecl
| jassNativeDecl
;
jassGlobalsBlock:
'globals' NL vars+=ja... | grammar Wurst;
compilationUnit : NL* decls+=topLevelDeclaration*;
topLevelDeclaration:
wpackage
| jassTopLevelDeclaration
;
jassTopLevelDeclaration:
jassGlobalsBlock
| jassFuncDef
| jassTypeDecl
| jassNativeDecl
;
jassGlobalsBlock:
'globals' NL vars+=ja... | allow newline after annotations and modifiers | allow newline after annotations and modifiers
| ANTLR | apache-2.0 | Cokemonkey11/WurstScript,wurstscript/WurstScript,peq/WurstScript,Cokemonkey11/WurstScript,Cokemonkey11/WurstScript,wurstscript/WurstScript,Cokemonkey11/WurstScript,Crigges/WurstScript,wurstscript/WurstScript,peq/WurstScript,Cokemonkey11/WurstScript,Crigges/WurstScript,Crigges/WurstScript,peq/WurstScript,Crigges/WurstSc... |
59cb8b24ee16cc04d523e07330359851c63b15c1 | kquery/KQuery.g4 | kquery/KQuery.g4 | /*
[The "BSD licence"]
Copyright (c) 2013 Sumit Lahiri
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
... | /*
[The "BSD licence"]
Copyright (c) 2013 Sumit Lahiri
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
... | Update KQuery.g4 | Update KQuery.g4 | ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
54bdd611119013f3b8094a681883f58ef261c6c2 | Code/src/main/antlr4/nl/utwente/group10/haskell/typeparser/Type.g4 | Code/src/main/antlr4/nl/utwente/group10/haskell/typeparser/Type.g4 | grammar Type;
CT : [A-Z][a-z]+ ;
VT : [a-z]+ ;
WS : [ \t\r\n]+ -> skip ;
baseType : typeClasses ? type ;
type : functionType | compoundType ; // function type
functionType : compoundType '->' type ;
compoundType : constantType | variableType | tupleType | listType | parenType ;
tupleType : '(' type (',' type)+ ')' ;... | grammar Type;
CT : [A-Z][a-z]+ ;
VT : [a-z]+ ;
WS : [ \t\r\n]+ -> skip ;
type : typeClasses ? innerType ;
innerType : functionType | compoundType ; // function type
functionType : compoundType '->' innerType ;
compoundType : constantType | variableType | tupleType | listType | parenType ;
tupleType : '(' innerType (... | Fix bug in Antlr grammar | Fix bug in Antlr grammar
| ANTLR | mit | viskell/viskell,andrewdavidmackenzie/viskell,wandernauta/viskell |
3a779f34b286a4d30ed89e0c2b042dc589cced83 | grakn-graql/src/main/antlr4/ai/grakn/graql/internal/antlr/GraqlTemplate.g4 | grakn-graql/src/main/antlr4/ai/grakn/graql/internal/antlr/GraqlTemplate.g4 | grammar GraqlTemplate;
@lexer::members {
public static final int WHITESPACE = 1;
public static final int COMMENTS = 2;
}
template
: blockContents EOF
;
block
: '{' blockContents '}'
;
blockContents
: (statement | graqlVariable | keyword | ID)*
;
statement
: forStatement
| ifStatement
| replaceStat... | grammar GraqlTemplate;
@lexer::members {
public static final int WHITESPACE = 1;
public static final int COMMENTS = 2;
}
template
: blockContents EOF
;
block
: '{' blockContents '}'
;
blockContents
: (statement | graqlVariable | keyword | ID)*
;
statement
: forStatement
| ifStatement
| replaceStat... | Remove undefined tokens from Graql template syntax | Remove undefined tokens from Graql template syntax
| ANTLR | agpl-3.0 | graknlabs/grakn,lolski/grakn,graknlabs/grakn,lolski/grakn,graknlabs/grakn,lolski/grakn,lolski/grakn,graknlabs/grakn |
8bc2e6652288852b0e451878fa85562d7e3a5eaa | versions/1.0/parsers/antlr4/WdlLexer.g4 | versions/1.0/parsers/antlr4/WdlLexer.g4 | lexer grammar WdlLexer;
channels { WdlComments, SkipChannel }
// Keywords
VERSION: 'version' -> pushMode(Version);
IMPORT: 'import';
WORKFLOW: 'workflow';
TASK: 'task';
STRUCT: 'struct';
SCATTER: 'scatter';
CALL: 'call';
IF: 'if';
THEN: 'then';
ELSE: 'else';
ALIAS: 'alias';
AS: 'as';
In: 'in';
INPUT: 'input';
OUTPUT:... | lexer grammar WdlLexer;
channels { WdlComments, SkipChannel }
// Keywords
VERSION: 'version' -> pushMode(Version);
IMPORT: 'import';
WORKFLOW: 'workflow';
TASK: 'task';
STRUCT: 'struct';
SCATTER: 'scatter';
CALL: 'call';
IF: 'if';
THEN: 'then';
ELSE: 'else';
ALIAS: 'alias';
AS: 'as';
In: 'in';
INPUT: 'input';
OUTPUT:... | Update WdlLexer.g4 | Update WdlLexer.g4 | ANTLR | bsd-3-clause | openwdl/wdl,openwdl/wdl,openwdl/wdl,openwdl/wdl |
29e286cdb0dc0bb8a6d0d99b1b242ef585778f03 | 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... | Introduce LPAREN and RPAREN | Introduce LPAREN and RPAREN
| 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 |
33847c87b5e8e0600c4d568f0cadc0488d536fef | golang/GoParser.g4 | golang/GoParser.g4 | parser grammar GoParser;
options {
tokenVocab=GoLexer;
superClass=GoBaseParser;
}
sourceFile
: packageClause eos (importDecl eos)* (topLevelDecl eos)*
;
packageClause
: 'package' IDENTIFIER
;
importDecl
: 'import' (importSpec | '(' (importSpec eos)* ')')
;
importSpec
: ('.' | ID... | parser grammar GoParser;
options {
tokenVocab=GoLexer;
superClass=GoBaseParser;
}
sourceFile
: packageClause eos (importDecl eos)* (topLevelDecl eos)*
;
packageClause
: 'package' IDENTIFIER
;
importDecl
: 'import' (importSpec | '(' (importSpec eos)* ')')
;
importSpec
: ('.' | ID... | Fix binary operators priority; fix formatting and useless parentheses | Fix binary operators priority; fix formatting and useless parentheses
| 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 |
886d949040816af63aeec57797bddf59e6167ab5 | antlr4/ANTLRv4Parser.g4 | antlr4/ANTLRv4Parser.g4 | /*
* [The "BSD license"]
* Copyright (c) 2013 Terence Parr
* Copyright (c) 2013 Sam Harwell
* 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... | /*
* [The "BSD license"]
* Copyright (c) 2013 Terence Parr
* Copyright (c) 2013 Sam Harwell
* 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... | update to 4.3 syntax | update to 4.3 syntax
| 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 |
8f5555ab7bafd489be12a294656483ea1f422e9d | de.peeeq.wurstscript/src/main/antlr/de/peeeq/wurstscript/antlr/Jass.g4 | de.peeeq.wurstscript/src/main/antlr/de/peeeq/wurstscript/antlr/Jass.g4 | grammar Jass;
@header {
package de.peeeq.wurstscript.antlr;
}
compilationUnit : NL? decls+=jassTopLevelDeclaration*;
jassTopLevelDeclaration:
jassGlobalsBlock
| jassFuncDef
| jassTypeDecl
| jassNativeDecl
;
jassGlobalsBlock:
'globals' NL
vars+=jassGlobalDecl*
'endglobals' NL
;
jas... | grammar Jass;
@header {
package de.peeeq.wurstscript.antlr;
}
compilationUnit : NL? decls+=jassTopLevelDeclaration*;
jassTopLevelDeclaration:
jassGlobalsBlock
| jassFuncDef
| jassTypeDecl
| jassNativeDecl
;
jassGlobalsBlock:
'globals' NL
vars+=jassGlobalDecl*
'endglobals' NL
;
jas... | fix Jass operator precedence | fix Jass operator precedence
| ANTLR | apache-2.0 | Cokemonkey11/WurstScript,peq/WurstScript,wurstscript/WurstScript,Cokemonkey11/WurstScript,wurstscript/WurstScript,Cokemonkey11/WurstScript,Cokemonkey11/WurstScript,peq/WurstScript,peq/WurstScript,Cokemonkey11/WurstScript,peq/WurstScript,wurstscript/WurstScript |
abde1177bf85b83d726938cbde1494223a36795e | src/net/hillsdon/reviki/wiki/renderer/creole/Creole.g4 | src/net/hillsdon/reviki/wiki/renderer/creole/Creole.g4 | /* Todo:
* - Comments justifying and explaining every rule.
* - Allow arbitrarily-nested lists (see actions/attributes)
*/
parser grammar Creole;
options { tokenVocab=CreoleTokens; }
@members {
public boolean nobreaks = false;
}
/* ***** Top level elements ***** */
creole : (block (LineBreak | ParBreak)*... | /* Todo:
* - Comments justifying and explaining every rule.
* - Allow arbitrarily-nested lists (see actions/attributes)
*/
parser grammar Creole;
options { tokenVocab=CreoleTokens; }
@members {
public boolean nobreaks = false;
}
/* ***** Top level elements ***** */
creole : (block (LineBreak | ParBreak)*... | Make header endings optional | Make header endings optional
| ANTLR | apache-2.0 | strr/reviki,strr/reviki,ashirley/reviki,ashirley/reviki,strr/reviki,strr/reviki,CoreFiling/reviki,ashirley/reviki,CoreFiling/reviki,ashirley/reviki,CoreFiling/reviki,ashirley/reviki,CoreFiling/reviki,CoreFiling/reviki,strr/reviki |
39ad1bbd00d2fa6c550127a54c7ea5e35bb31395 | 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... | Remove ESCAPE and make RAW_STRING more like STRING | Remove ESCAPE and make RAW_STRING more like STRING | ANTLR | bsd-3-clause | burtcorp/jmespath-java |
3d023d14d5c7787f71edd84dc4542731cff14ba2 | java-vtl-parser/src/main/resources/kohl/hadrien/antlr4/Clauses.g4 | java-vtl-parser/src/main/resources/kohl/hadrien/antlr4/Clauses.g4 | grammar Clauses;
clause : '[' ( rename | filter | keep | calc | attrcalc | aggregate ) ']' ;
// [ rename component as string,
// component as string role = IDENTIFIER,
// component as string role = MEASURE,
// component as string role = ATTRIBUTE
// ]
rename : 'rename' renamePara... | grammar Clauses;
clause : '[' ( rename | filter | keep | calc | attrcalc | aggregate ) ']' ;
// [ rename component as string,
// component as string role = IDENTIFIER,
// component as string role = MEASURE,
// component as string role = ATTRIBUTE
// ]
rename : 'rename' renameParam... | Use correct rule name in Clauses | Use correct rule name in Clauses
| ANTLR | apache-2.0 | statisticsnorway/java-vtl,hadrienk/java-vtl,hadrienk/java-vtl,statisticsnorway/java-vtl,statisticsnorway/java-vtl,hadrienk/java-vtl,statisticsnorway/java-vtl |
40ed86b6dee6cbe78b3143eb3522a9d305fc8bec | sharding-core/src/main/antlr4/imports/BaseRule.g4 | sharding-core/src/main/antlr4/imports/BaseRule.g4 | 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_?)
;
BLOCK_COMMENT
: SLASH ASTERISK .*? ASTERISK SLASH -> channel(HIDDEN)
;
SL_COMMENT
: MINUS MINUS ~[\r\n]* -> channel(HIDDEN)
;
schemaName
: ... | 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_?)
;
BLOCK_COMMENT
: SLASH ASTERISK .*? ASTERISK SLASH -> channel(HIDDEN)
;
SL_COMMENT
: MINUS MINUS ~[\r\n]* -> channel(HIDDEN)
;
schemaName
: ... | support interval expr | support interval expr
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc |
ea2897309e23e10c4caf3993492a3b21aaf90625 | src/main/antlr4/io/burt/jmespath/JmesPath.g4 | src/main/antlr4/io/burt/jmespath/JmesPath.g4 | grammar JmesPath;
query : expression EOF ;
expression
: expression '.' (identifier | multiSelectList | multiSelectHash | functionExpression | wildcard='*') # chainExpression
| expression bracketSpecifier # bracketedExpression
| bracketSpecifier # bracketExpression
| expression COMPARATOR expression # comparis... | grammar JmesPath;
query : expression EOF ;
expression
: expression '.' (identifier | multiSelectList | multiSelectHash | functionExpression | wildcard='*') # chainExpression
| expression bracketSpecifier # bracketedExpression
| bracketSpecifier # bracketExpression
| expression COMPARATOR expression # comparis... | Allow names to start with underscore | Allow names to start with underscore | ANTLR | bsd-3-clause | burtcorp/jmespath-java |
b34316ee5bc7299a6612e2a704d24efc25ad3a00 | mini-projeto/Cymbol.g4 | mini-projeto/Cymbol.g4 | grammar Cymbol;
//Lexer
fragment NUMBER : [0-9];
fragment LETTER : [a-zA-Z];
TYPEINT : 'int';
TYPEFLOAT : 'float';
TYPEBOOLEAN : 'boolean';
IF : 'if';
ELSE : 'else';
RETURN : 'return';
LP : '(';
RP : ')';
COMMA : ',';
SEMICOLON : ';';
LB : '{';
RB : '... | grammar Cymbol;
//Lexer
fragment NUMBER : [0-9];
fragment LETTER : [a-zA-Z];
TYPEINT : 'int';
TYPEFLOAT : 'float';
TYPEBOOLEAN : 'boolean';
IF : 'if';
ELSE : 'else';
RETURN : 'return';
LP : '(';
RP : ')';
COMMA : ',';
SEMICOLON : ';';
LB : '{';
RB : '... | Adjust grammar from project | Adjust grammar from project
* Fix 'type' calls for 'tyype'
* Fix wrong ' " ' | ANTLR | mit | damorim/compilers-cin,damorim/compilers-cin,damorim/compilers-cin,damorim/compilers-cin |
b52ddd9b328eebcfeed427ecacc5fbfbb8b8e642 | graphstream-dgs/DGSLexer.g4 | graphstream-dgs/DGSLexer.g4 | /*
BSD License
Copyright (c) 2017, Tim Hemel
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the... | /*
BSD License
Copyright (c) 2017, Tim Hemel
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the... | clean up code | clean up 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 |
50cf6acb3f14d5b317636f4c162562410f2c58d3 | Solidity.g4 | Solidity.g4 | // 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
:... | // 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
:... | Allow user defined typenames in typename expressions | Allow user defined typenames in typename expressions
| ANTLR | mit | solidityj/solidity-antlr4,federicobond/solidity-antlr4 |
92c7c16a6d572fd5ed882c1c26bece307aeb1375 | 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 ... | modify privilegeType_ | modify privilegeType_
| 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 |
c12ee45a88f90d40359b6c5032646cfd3ccf13c8 | Src/grammar/cql.g4 | Src/grammar/cql.g4 | grammar cql;
/*
* Clinical Quality Language Grammar Specification
* Version 1.3 - May 2018 STU3 Ballot
*/
import fhirpath;
/*
* Parser Rules
*/
library
:
libraryDefinition?
usingDefinition*
includeDefinition*
codesystemDefinition*
valuesetDefinition*
codeDefinition*
conceptDefinition*
paramet... | grammar cql;
/*
* Clinical Quality Language Grammar Specification
* Version 1.3 - STU3 Publication
*/
import fhirpath;
/*
* Parser Rules
*/
library
:
libraryDefinition?
usingDefinition*
includeDefinition*
codesystemDefinition*
valuesetDefinition*
codeDefinition*
conceptDefinitio... | Document required from keyword option | STU3#218: Document required from keyword option
| ANTLR | apache-2.0 | cqframework/clinical_quality_language,cqframework/clinical_quality_language |
fc46ac2d1908918cde6b4afe9cc9a2ebe8d887bc | sharding-core/sharding-core-parse/sharding-core-parse-postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4 | sharding-core/sharding-core-parse/sharding-core-parse-postgresql/src/main/antlr4/imports/postgresql/DDLStatement.g4 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | modify onlyClause_ | modify onlyClause_
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere |
86213b6f0701be9a346c827f2f5afe2f19e3414c | src/grammar/La.g4 | src/grammar/La.g4 | /*
* Gramatica da linguagem LA.
*
* Grupo:
* Arieh Cangiani Fabbro
* Felipe Fantoni
* Lucas Hauptmann Pereira
* Lucas Oliveira David
* Rafael Silveira
*/
grammar La;
@members {
infrastructure.PilhaDeTabelas pilhaDeTabelas = new infrastructure.PilhaDeTabelas();
}
programa
: {
pilhaDeTabelas... | /*
* Gramatica da linguagem LA.
*
* Grupo:
* Arieh Cangiani Fabbro
* Felipe Fantoni
* Lucas Hauptmann Pereira
* Lucas Oliveira David
* Rafael Silveira
*/
grammar La;
@members {
PilhaDeTabelas pilhaDeTabelas = new PilhaDeTabelas();
}
programa
: {
pilhaDeTabelas.empilhar(new TabelaDeSimbolos... | Fix semantic error thrown | Fix semantic error thrown
| ANTLR | mit | lucasdavid/Compilers-2-assignment-2,lucasdavid/Compilers-2-assignment-2,lucasdavid/Compilers-2-assignment-2,lucasdavid/Compilers-2-assignment-2,lucasdavid/Compilers-2-assignment-2 |
2662f2abd4518fe0086bd324cee1fb7baba4bbfc | shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/DALStatement.g4 | shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-postgresql/src/main/antlr4/imports/postgresql/DALStatement.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 new line | add new line
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere |
2c7b657272822e2fc4b7a45112b6572ba6f2207d | clu/clu.g4 | clu/clu.g4 | /*
BSD License
Copyright (c) 2018, 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
... | /*
BSD License
Copyright (c) 2018, 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
an... | comment is % not ; | comment is % not ;
| 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 |
5abb252da4d87c2242bab2435e26d199c145cd53 | core/src/main/antlr4/org/jdbi/v3/core/internal/lexer/DefineStatementLexer.g4 | core/src/main/antlr4/org/jdbi/v3/core/internal/lexer/DefineStatementLexer.g4 | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed u... | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed u... | Fix outdated lexer url | Fix outdated lexer url
| ANTLR | apache-2.0 | hgschmie/jdbi,jdbi/jdbi,hgschmie/jdbi,hgschmie/jdbi,jdbi/jdbi,jdbi/jdbi |
28905d787ec3713e6d29a5b59146e81f3b8e58c7 | 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 lexer rule | Update Erlang lexer rule
| ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
df81c3f6c6036f8771ededffa73512793cdf3015 | omni-cx2x/src/cx2x/translator/language/Claw.g4 | omni-cx2x/src/cx2x/translator/language/Claw.g4 | /*
* This file is released under terms of BSD license
* See LICENSE file for more information
*/
/**
* ANTLR 4 Grammar file for the CLAW directive language.
*
* @author clementval
*/
grammar Claw;
@header
{
import java.util.List;
import java.util.ArrayList;
}
/*-----------------------------------------------... | /*
* This file is released under terms of BSD license
* See LICENSE file for more information
*/
/**
* ANTLR 4 Grammar file for the CLAW directive language.
*
* @author clementval
*/
grammar Claw;
@header
{
import java.util.List;
import java.util.ArrayList;
}
/*-----------------------------------------------... | Add lexer rules for digit and numbers | Add lexer rules for digit and numbers
| ANTLR | bsd-2-clause | clementval/claw-compiler,clementval/claw-compiler |
ba5fadc4712fbc2316a4be54683e1e9cf1e24a4c | projects/batfish/src/org/batfish/grammar/flatjuniper/FlatJuniper_policy_options.g4 | projects/batfish/src/org/batfish/grammar/flatjuniper/FlatJuniper_policy_options.g4 | parser grammar FlatJuniper_policy_options;
import FlatJuniper_common;
options {
tokenVocab = FlatJuniperLexer;
}
base_community_regex
:
~( COLON | NEWLINE )+ COLON ~( COLON | NEWLINE )+
;
colort_apply_groups
:
s_apply_groups
;
colort_color
:
color = DEC
;
community_regex
:
(
base_community_re... | parser grammar FlatJuniper_policy_options;
import FlatJuniper_common;
options {
tokenVocab = FlatJuniperLexer;
}
base_community_regex
:
~( COLON | NEWLINE )+ COLON ~( COLON | NEWLINE )+
;
colort_apply_groups
:
s_apply_groups
;
colort_color
:
color = DEC
;
community_regex
:
(
base_community_re... | revert allowing ipv6 in juniper prefix list | revert allowing ipv6 in juniper prefix list
| ANTLR | apache-2.0 | dhalperi/batfish,intentionet/batfish,intentionet/batfish,arifogel/batfish,batfish/batfish,arifogel/batfish,arifogel/batfish,dhalperi/batfish,intentionet/batfish,batfish/batfish,batfish/batfish,intentionet/batfish,dhalperi/batfish,intentionet/batfish |
d371fb6d8240a6fb2d19a22e3d3a4a458b9534d4 | graphstream-dgs/DGSParser.g4 | graphstream-dgs/DGSParser.g4 | /*
* Graphstream DGS grammar.
*
* Adapted from http://graphstream-project.org/doc/Advanced-Concepts/The-DGS-File-Format/
*
*/
parser grammar DGSParser;
options { tokenVocab=DGSLexer; }
dgs : header ( event | COMMENT | EOL )* ;
header : MAGIC EOL identifier INT INT EOL;
event : ( an | cn | dn | ae | ce | de | cg... | /*
* Graphstream DGS grammar.
*
* Adapted from http://graphstream-project.org/doc/Advanced-Concepts/The-DGS-File-Format/
*
*/
parser grammar DGSParser;
options { tokenVocab=DGSLexer; }
dgs : header ( event | COMMENT | EOL )* ;
header : MAGIC EOL identifier INT INT EOL;
event : ( an | cn | dn | ae | ce | de | cg... | clean up code | clean up 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 |
dd290eabdc219ba5e725e0364cddcd2210fa169b | src/main/antlr/GraphqlCommon.g4 | src/main/antlr/GraphqlCommon.g4 | grammar GraphqlCommon;
operationType : SUBSCRIPTION | MUTATION | QUERY;
description : StringValue;
enumValue : enumValueName ;
arrayValue: '[' value* ']';
arrayValueWithVariable: '[' valueWithVariable* ']';
objectValue: '{' objectField* '}';
objectValueWithVariable: '{' objectFieldWithVariable* '}';
objectFie... | grammar GraphqlCommon;
operationType : SUBSCRIPTION | MUTATION | QUERY;
description : StringValue;
enumValue : enumValueName ;
arrayValue: '[' value* ']';
arrayValueWithVariable: '[' valueWithVariable* ']';
objectValue: '{' objectField* '}';
objectValueWithVariable: '{' objectFieldWithVariable* '}';
objectFie... | Update ANTLR grammar with new SourceCharacter definition | Update ANTLR grammar with new SourceCharacter definition
| ANTLR | mit | graphql-java/graphql-java,graphql-java/graphql-java |
65fc87eca3c02bd80c10aa4d839ec1e520c83aeb | aileenc/grammar/Aileen.g4 | aileenc/grammar/Aileen.g4 | grammar Aileen;
// Parser rules
compilation_unit
: function_definition*
;
function_definition
: KEYWORD_FUNCTION IDENTIFIER '(' parameters? ')' ('->' return_type)? block
;
parameters
: parameter (',' parameter)*
;
parameter
: IDENTIFIER ':' parameter_type
;
return_type
: primitive_type
;
para... | grammar Aileen;
// Parser rules
compilation_unit
: function_definition*
;
function_definition
: KEYWORD_FUNCTION IDENTIFIER '(' parameters? ')' ('->' return_type)? block
;
parameters
: parameter (',' parameter)*
;
parameter
: IDENTIFIER ':' parameter_type
;
return_type
: primitive_type
;
para... | Update aileenlang grammar. | Update aileenlang grammar.
| ANTLR | mit | alejandroclaro/aileenlang |
aa5ddd7603a0e86a75d2e5f96355b78ae9542c13 | sharding-core/sharding-core-parse/sharding-core-parse-mysql/src/main/antlr4/imports/mysql/BaseRule.g4 | sharding-core/sharding-core-parse/sharding-core-parse-mysql/src/main/antlr4/imports/mysql/BaseRule.g4 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... | fix #2868 | fix #2868
| 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 |
61e436ec03ef63b89f88a990c40ed6f5dede72af | 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 cx2x.translator.common.Constant;
import cx2x.translator.misc.Utility;
}
/*----------------------... | /*
* 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.Constant;
import cx2x.translator.misc.Utility;
}
/*----------------------... | Add grammar for "end parallelize" | Add grammar for "end parallelize"
| ANTLR | bsd-2-clause | clementval/claw-compiler,clementval/claw-compiler |
7c9f6034388e8cf530e412138cd02f84a7db31f8 | antlr/antlr4/LexBasic.g4 | antlr/antlr4/LexBasic.g4 | /*
* [The "BSD license"]
* Copyright (c) 2014-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
* are met:
*
* 1. Redistributions of source code must retain the above cop... | /*
* [The "BSD license"]
* Copyright (c) 2014-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
* are met:
*
* 1. Redistributions of source code must retain the above cop... | Update LexBasic.g4 | Update LexBasic.g4 | ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
f200a1d6b0294c8f3835a441ac5733467ac379f4 | src/main/antlr/ActionLanguage.g4 | src/main/antlr/ActionLanguage.g4 | grammar ActionLanguage;
@header {
package pl.edu.pw.mini.msi.knowledgerepresentation.grammar;
}
programm: instruction* EOF;
instruction
: initialization
| entry
| scenario
| query
;
entry
: causes
| TYPICALLY? invokes
| TYPICALLY? releases
| TYPICALLY? triggers
| TYPICALLY? occurs
| impossi... | grammar ActionLanguage;
@header {
package pl.edu.pw.mini.msi.knowledgerepresentation.grammar;
}
programm: instruction* EOF;
instruction
: initialization
| entry
| scenario
| query
;
entry
: causes
| TYPICALLY? invokes
| TYPICALLY? releases
| TYPICALLY? triggers
| TYPICALLY? occurs
| impossi... | allow only fluent in releases | allow only fluent in releases
| ANTLR | isc | janisz/knowledge-representation,janisz/knowledge-representation |
f5e3ff96925b015a87b6dd28c7eedd585a3ee299 | client/src/main/antlr4/com/metamx/druid/sql/antlr4/DruidSQL.g4 | client/src/main/antlr4/com/metamx/druid/sql/antlr4/DruidSQL.g4 | grammar DruidSQL;
@header {
import com.metamx.druid.aggregation.post.*;
import com.metamx.druid.aggregation.*;
import com.metamx.druid.query.filter.*;
import com.metamx.druid.query.dimension.*;
import com.metamx.druid.*;
import com.google.common.base.*;
import com.google.common.collect.Lists;
import org.joda.time.*;
... | grammar DruidSQL;
@header {
import com.metamx.druid.aggregation.post.*;
import com.metamx.druid.aggregation.*;
import com.metamx.druid.query.filter.*;
import com.metamx.druid.query.dimension.*;
import com.metamx.druid.*;
import com.google.common.base.*;
import com.google.common.collect.Lists;
import org.joda.time.*;
... | add support for `!=` operator and `in ('a','b',...) expressions | add support for `!=` operator and `in ('a','b',...) expressions
| ANTLR | apache-2.0 | pdeva/druid,deltaprojects/druid,smartpcr/druid,qix/druid,jon-wei/druid,pjain1/druid,lcp0578/druid,dclim/druid,mghosh4/druid,tubemogul/druid,winval/druid,elijah513/druid,milimetric/druid,nvoron23/druid,noddi/druid,winval/druid,Fokko/druid,authbox-lib/druid,milimetric/druid,friedhardware/druid,pjain1/druid,pombredanne/dr... |
6c1be79698d54e68152602a20502499ddafb2ec4 | sharding-parser/sharding-parser-mysql/src/main/antlr4/imports/mysql/MySQLDDLStatement.g4 | sharding-parser/sharding-parser-mysql/src/main/antlr4/imports/mysql/MySQLDDLStatement.g4 | grammar MySQLDDLStatement;
import MySQLKeyword, Keyword, Symbol, MySQLDQLStatement, DataType, MySQLBase, BaseRule;
createTable
: CREATE TEMPORARY? TABLE (IF NOT EXISTS)? tableName (LP_ createDefinitions_ RP_ | createLike_)
;
createDefinitions_
: createDefinition_ (COMMA_ createDefinition_)*
;
create... | grammar MySQLDDLStatement;
import MySQLKeyword, Keyword, Symbol, MySQLDQLStatement, DataType, MySQLBase, BaseRule;
createTable
: CREATE TEMPORARY? TABLE (IF NOT EXISTS)? tableName (LP_ createDefinitions_ RP_ | createLike_)
;
createDefinitions_
: createDefinition_ (COMMA_ createDefinition_)*
;
create... | refactor dataType | refactor dataType
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc |
4347fadb027299a32fd61a18d0a34bb082523775 | newton.g4 | newton.g4 | grammar newton;
tokens { INDENT, DEDENT }
@lexer::header {
import com.yuvalshavit.antlr4.DenterHelper;
}
@lexer::members {
private final DenterHelper newtonDenter = new DenterHelper(NL, newtonParser.INDENT, newtonParser.DEDENT)
{
@Override
public Token pullToken() {
return newtonLexer.super.next... | grammar newton;
tokens { INDENT, DEDENT }
@lexer::header {
import com.yuvalshavit.antlr4.DenterHelper;
}
@lexer::members {
private final DenterHelper newtonDenter = new DenterHelper(NL, newtonParser.INDENT, newtonParser.DEDENT)
{
@Override
public Token pullToken() {
return newtonLexer.super.next... | support for real, octal and hex numbers | support for real, octal and hex numbers
| ANTLR | mit | Khushmeet/newton,Khushmeet/newton |
83dac658158a88e90cb5e75ab75669b419406309 | jkind/src/jkind/lustre/parsing/Lustre.g4 | jkind/src/jkind/lustre/parsing/Lustre.g4 | grammar Lustre;
program: (typedef | constant | node)* EOF;
typedef: 'type' ID '=' topLevelType ';';
constant: 'const' ID (':' type)? '=' expr ';';
node:
'node' ID '(' input=varDeclList? ')'
'returns' '(' output=varDeclList? ')' ';'
('var' local=varDeclList ';')?
'let'
(equation | property | assertion | ... | grammar Lustre;
program: (typedef | constant | node)* EOF;
typedef: 'type' ID '=' topLevelType ';';
constant: 'const' ID (':' type)? '=' expr ';';
node:
'node' ID '(' input=varDeclList? ')'
'returns' '(' output=varDeclList? ')' ';'
('var' local=varDeclList ';')?
'let'
(equation | property | assertion | ... | Change tabs to spaces | Change tabs to spaces
| ANTLR | bsd-3-clause | backesj/jkind,lgwagner/jkind,andrewkatis/jkind-1,agacek/jkind,agacek/jkind,lgwagner/jkind,backesj/jkind,andrewkatis/jkind-1 |
072f93e6feb86b55fc4151a6d9585e41688d0d0c | sharding-core/src/main/antlr4/io/shardingsphere/core/parsing/antlr/autogen/PostgreSQLStatement.g4 | sharding-core/src/main/antlr4/io/shardingsphere/core/parsing/antlr/autogen/PostgreSQLStatement.g4 | grammar PostgreSQLStatement;
import PostgreSQLKeyword, Keyword, PostgreSQLBase, PostgreSQLCreateIndex, PostgreSQLAlterIndex
, PostgreSQLDropIndex, PostgreSQLCreateTable, PostgreSQLAlterTable, PostgreSQLDropTable, PostgreSQLTruncateTable
, PostgreSQLTCLStatement, PostgreSQLDCLStatement
;
execute
... | grammar PostgreSQLStatement;
import PostgreSQLKeyword, Keyword, PostgreSQLBase, PostgreSQLCreateIndex, PostgreSQLAlterIndex
, PostgreSQLDropIndex, PostgreSQLCreateTable, PostgreSQLAlterTable, PostgreSQLDropTable, PostgreSQLTruncateTable
, PostgreSQLTCLStatement, PostgreSQLDCLStatement
;
execute
... | add postgre drop role rule | add postgre drop role rule
| ANTLR | apache-2.0 | leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc |
15d842d5b51d9f34c104aee0a600732666552d6d | 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 revokeObjectPrivileges | add revokeObjectPrivileges
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc |
bed06b8418dac00dcb24d6d12628ed6d6dc864d8 | pattern_grammar/STIXPattern.g4 | pattern_grammar/STIXPattern.g4 | // This is an ANTLR4 grammar for the STIX Patterning Language.
//
// http://docs.oasis-open.org/cti/stix/v2.0/stix-v2.0-part5-stix-patterning.html
grammar STIXPattern;
pattern
: observationExpressions
;
observationExpressions
: <assoc=left> observationExpressions FOLLOWEDBY observationExpressions
| observati... | // This is an ANTLR4 grammar for the STIX Patterning Language.
//
// http://docs.oasis-open.org/cti/stix/v2.0/stix-v2.0-part5-stix-patterning.html
grammar STIXPattern;
pattern
: observationExpressions
;
observationExpressions
: <assoc=left> observationExpressions FOLLOWEDBY observationExpressions
| observati... | Add catch-all for unusable characters | Add catch-all for unusable characters
| ANTLR | bsd-3-clause | oasis-open/cti-stix2-json-schemas |
c3a16ad164120028bbd5cfb395d5ef169fb5d5d8 | ShExDoc.g4 | ShExDoc.g4 | // ANTLR4 Equivalent of accompanying bnf, developed in
// http://www.w3.org/2005/01/yacker/uploads/ShEx3
// Updated to Jul 27 AM ShEx3
// Updated to Aug 23 AM ShEx3 (last change was EGP 20150820)
// Sept 21 AM disallow single internal unary (e.g. {(:p .{2}){3}}
// Change (non-standard) "codeLabel" to "produc... | // ANTLR4 Equivalent of accompanying bnf, developed in
// http://www.w3.org/2005/01/yacker/uploads/ShEx3
// Updated to Jul 27 AM ShEx3
// Updated to Aug 23 AM ShEx3 (last change was EGP 20150820)
// Sept 21 AM disallow single internal unary (e.g. {(:p .{2}){3}}
// Change (non-standard) "codeLabel" to "produc... | add empty language stem | add empty language stem
| ANTLR | mit | shexSpec/grammar,shexSpec/grammar,shexSpec/grammar |
20ecd4ce119cd69c9d24f6c8e39f55e8a3c2abf1 | golang/GoParser.g4 | golang/GoParser.g4 | /*
[The "BSD licence"] Copyright (c) 2017 Sasa Coh, Michał Błotniak Copyright (c) 2019 Ivan Kochurkin,
kvanttt@gmail.com, Positive Technologies Copyright (c) 2019 Dmitry Rassadin,
flipparassa@gmail.com,Positive Technologies All rights reserved. Copyright (c) 2021 Martin Mirchev,
mirchevmartin2203@gmail.com
Redist... | /*
[The "BSD licence"] Copyright (c) 2017 Sasa Coh, Michał Błotniak Copyright (c) 2019 Ivan Kochurkin,
kvanttt@gmail.com, Positive Technologies Copyright (c) 2019 Dmitry Rassadin,
flipparassa@gmail.com,Positive Technologies All rights reserved. Copyright (c) 2021 Martin Mirchev,
mirchevmartin2203@gmail.com
Redist... | remove ambiguous rules | remove ambiguous rules
| 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 |
2e52c6cca26f4702be5d2b0ef6a16f21da287006 | src/main/antlr4/YokohamaUnitLexer.g4 | src/main/antlr4/YokohamaUnitLexer.g4 | lexer grammar YokohamaUnitLexer;
STAR_LBRACKET: '*[' -> skip, mode(ABBREVIATION);
HASH1: '#' ;
HASH2: '##' ;
HASH3: '###' ;
HASH4: '####' ;
HASH5: '#####' ;
HASH6: '######' ;
TEST: 'Test:' [ \t]* -> mode(TEST_NAME);
TABLE_CAPTION: '[' -> skip, mode(TABLE_NAME);
SETUP: 'Setup' -> mode(PHASE_LEADING);
EXE... | lexer grammar YokohamaUnitLexer;
STAR_LBRACKET: '*[' -> skip, mode(ABBREVIATION);
HASH1: '#' ;
HASH2: '##' ;
HASH3: '###' ;
HASH4: '####' ;
HASH5: '#####' ;
HASH6: '######' ;
TEST: 'Test:' [ \t]* -> mode(TEST_NAME);
TABLE_CAPTION: '[' -> skip, mode(TABLE_NAME);
SETUP: 'Setup' -> mode(PHASE_LEADING);
EXE... | Remove unused token RULES | Remove unused token RULES | ANTLR | mit | tkob/yokohamaunit,tkob/yokohamaunit |
d3ec97a8c9b95117d4c37aeb823b6258668eb5f7 | container-search/src/main/antlr4/com/yahoo/search/yql/yqlplus.g4 | container-search/src/main/antlr4/com/yahoo/search/yql/yqlplus.g4 | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
grammar yqlplus;
options {
superClass = ParserBase;
language = Java;
}
@header {
import java.util.Stack;
import com.yahoo.search.yql.*;
}
@parser::members {
protected static class expressio... | // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
grammar yqlplus;
options {
superClass = ParserBase;
language = Java;
}
@header {
import java.util.Stack;
import com.yahoo.search.yql.*;
}
@parser::members {
protected static class expressio... | Remove unsupported constructs | Remove unsupported constructs
| ANTLR | apache-2.0 | vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa |
0ca9d1588de6f511dbfab971741417ceb7d46371 | javascript/jsx/JavaScriptLexer.g4 | javascript/jsx/JavaScriptLexer.g4 | /*
* The MIT License (MIT)
*
* Copyright (c) 2014 by Bart Kiers (original author) and Alexandre Vitorelli (contributor -> ported to CSharp)
* Copyright (c) 2017-2020 by Ivan Kochurkin (Positive Technologies):
added ECMAScript 6 support, cleared and transformed to the universal grammar.
* Copyright (c) 2018 by ... | /*
* The MIT License (MIT)
*
* Copyright (c) 2014 by Bart Kiers (original author) and Alexandre Vitorelli (contributor -> ported to CSharp)
* Copyright (c) 2017-2020 by Ivan Kochurkin (Positive Technologies):
added ECMAScript 6 support, cleared and transformed to the universal grammar.
* Copyright (c) 2018 by ... | Simplify LinkLiteral | Simplify LinkLiteral
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 |
b903c8c70fa3891d239633919c7cf3b6d19717a6 | 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.... | Define parallelize directive grammar | Define parallelize directive grammar
| ANTLR | bsd-2-clause | clementval/claw-compiler,clementval/claw-compiler |
da609d92951e84bf37d951f4354e0f8ce7a2d0e9 | shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/BaseRule.g4 | shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/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 SQLServer output keywords to unreserved word. | add SQLServer output keywords to unreserved word.
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere |
de2a1fd38d1ed61dd65653b47c8317599a8744b9 | graphene/parser/GQL.g4 | graphene/parser/GQL.g4 | grammar GQL;
@header {
from graphene.commands import *
from graphene.expressions import *
}
// General parsing, including statement lists
parse : stmt_list EOF;
stmt_list returns [stmts]
: s1=stmt {$stmts = [$s1.ctx]}
(';' (si=stmt {$stmts.append($si.ctx)})? )*
;
stmt
: ( c=match_stmt
| c=create_stmt ... | grammar GQL;
@header {
from graphene.commands import *
from graphene.expressions import *
}
// General parsing, including statement lists
parse : stmt_list EOF;
stmt_list returns [stmts]
: s1=stmt {$stmts = [$s1.ctx]}
(';' (si=stmt {$stmts.append($si.ctx)})? )*
;
stmt
: ( c=match_stmt
| c=create_stmt ... | Fix literals in parser | Fix literals in parser
| ANTLR | apache-2.0 | PHB-CS123/graphene,PHB-CS123/graphene,PHB-CS123/graphene |
167dc98b3e8da40426736a4e3ca8acb37250d562 | 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;
grantObjectPrivileges
: objectPrivilege (COMMA objectPrivilege)*
;
grantObjectPrivilege
: (objectPrivilege | ALL PRIVILEGES?)( LEFT_PAREN columnName (COMMA columnName)* RIGHT_PAREN)?
;
objectPrivi... | grammar OracleDCLStatement;
import OracleKeyword, Keyword, OracleBase, BaseRule, DataType, Symbol;
granteeIdentifiedBy
: userName (COMMA userName)* IDENTIFIED BY STRING (COMMA STRING)*
;
grantObjectPrivileges
: objectPrivilege (COMMA objectPrivilege)*
;
grantObjectPrivilege
: (objectPriv... | add granteeIdentifiedBy | add granteeIdentifiedBy
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere |
2bbdfeb8d64d4c1766bae7b9e63536f41c36da8d | src/Track.g4 | src/Track.g4 | grammar Track;
track: track_decl decl* ;
track_decl: TRACK track_body ;
track_body: channel_list_line+ ;
channel_list_line: endline (SPACE channel_name)+ SPACE? ;
channel_name: ID ;
decl: channel_decl | block_decl | endline ;
channel_decl: ID SPACE COLON SPACE CHANNEL SPACE WAVE channel_body ;
channel_body: block_l... | grammar Track;
track: track_decl decl* ;
track_decl: TRACK track_body ;
track_body: channel_list_line+ ;
channel_list_line: endline (SPACE channel_name)+ SPACE? ;
channel_name: ID ;
decl: channel_decl | block_decl | endline ;
channel_decl: ID SPACE COLON SPACE CHANNEL SPACE WAVE channel_body ;
channel_body: block_l... | Allow single-char identifiers | Allow single-char identifiers
| ANTLR | mit | hdgarrood/klasma |
9bc39853494acd06fc40ee27d618692e7034891d | kquery/KQuery.g4 | kquery/KQuery.g4 | /*
[The "BSD licence"]
Copyright (c) 2013 Sumit Lahiri
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
... | /*
[The "BSD licence"]
Copyright (c) 2013 Sumit Lahiri
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
... | Update KQuery.g4 | Update KQuery.g4 | ANTLR | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 |
cd590b5ec01069bb2f4987cad8b87a9a38db5a6e | smiles/smiles.g4 | smiles/smiles.g4 | /*
BSD License Copyright (c) 2017, Tom Everett All rights reserved. Redistribution and use in source
and binary forms, with or without modification, are permitted provided that the following
conditions are met: 1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the... | /*
BSD License Copyright (c) 2017, Tom Everett All rights reserved. Redistribution and use in source
and binary forms, with or without modification, are permitted provided that the following
conditions are met: 1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the... | Update smiles/smiles.g4 | Update smiles/smiles.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 |
bc29ab044d0de7fab495fc25b45de696fc1cc178 | 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;
grant
: GRANT
(
(grantSystemPrivileges | grantObjectPrivilegeClause) (CONTAINER EQ_ (CURRENT | ALL))?
| grantRolesToPrograms
)
;
grantSystemPrivileges
: systemObjects TO (grantees | ... | grammar OracleDCLStatement;
import OracleKeyword, Keyword, OracleBase, BaseRule, DataType, Symbol;
grant
: GRANT
(
(grantSystemPrivileges | grantObjectPrivilegeClause) (CONTAINER EQ_ (CURRENT | ALL))?
| grantRolesToPrograms
)
;
grantSystemPrivileges
: systemObjects TO (grantees | ... | change oracle password rule from STRING to ID | change oracle password rule from STRING to ID
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc |
1ca9ed61d62b529aa403229b0a23dac69a091fe3 | 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, PLUS,
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... | Declare other tokens used later in the reference grammar | Declare other tokens used later in the reference grammar
There were some tokens used in the grammar but not declared. Antlr
doesn't really seem to care and happily uses them, but they appear in
RustLexer.tokens in a potentially-unexpected order.
| ANTLR | apache-2.0 | jroesch/rust,jroesch/rust,aidancully/rust,seanrivera/rust,krzysz00/rust,aidancully/rust,graydon/rust,sae-bom/rust,l0kod/rust,XMPPwocky/rust,nwin/rust,carols10cents/rust,KokaKiwi/rust,zubron/rust,carols10cents/rust,mvdnes/rust,mihneadb/rust,philyoon/rust,pelmers/rust,jashank/rust,jashank/rust,TheNeikos/rust,pshc/rust,jr... |
6f878cd8033fadc5f072ef65726f0130a080df53 | sharding-core/src/main/antlr4/imports/MySQLKeyword.g4 | sharding-core/src/main/antlr4/imports/MySQLKeyword.g4 | lexer grammar MySQLKeyword;
import Symbol;
ACTION
: A C T I O N
;
ADMIN
: A D M I N
;
AFTER
: A F T E R
;
ALGORITHM
: A L G O R I T H M
;
ANALYZE
: A N A L Y Z E
;
AT_
: A T UL_
;
AUDIT_ADMIN
: A U D I T UL_ A D M I N
;
AUTO_INCREMENT
: A U T O UL_... | lexer grammar MySQLKeyword;
import Symbol;
ACTION
: A C T I O N
;
ADMIN
: A D M I N
;
AFTER
: A F T E R
;
ALGORITHM
: A L G O R I T H M
;
ANALYZE
: A N A L Y Z E
;
AUDIT_ADMIN
: A U D I T UL_ A D M I N
;
AUTO_INCREMENT
: A U T O UL_ I N C R E M E N T
;
... | remove symbol AT_ | remove symbol AT_
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc |
799cc2c7a57d8f107f7973478ba3034449204c5d | analyzer/src/main/antlr4/nl/basjes/parse/useragent/parser/UserAgentTreeWalker.g4 | analyzer/src/main/antlr4/nl/basjes/parse/useragent/parser/UserAgentTreeWalker.g4 | /*
* Yet Another UserAgent Analyzer
* Copyright (C) 2013-2017 Niels Basjes
*
* 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 ... | /*
* Yet Another UserAgent Analyzer
* Copyright (C) 2013-2017 Niels Basjes
*
* 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 ... | Remove useless comment | Remove useless comment
| ANTLR | apache-2.0 | nielsbasjes/yauaa,nielsbasjes/yauaa,nielsbasjes/yauaa,nielsbasjes/yauaa |
a097d4ec0dc48b5fd788afaada2a93950660e794 | 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 typo in GraphQL.g4 | Fix typo in GraphQL.g4
The terminal 'extends' is incorrect, it should be 'extend'. See https://spec.graphql.org/June2018/#sec-Scalar-Extensions | 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 |
0d90c6a39ec31e45e8d4adfcc27af990a758c254 | 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... | remove v3 validating semantic predicates in rule joinSource | remove v3 validating semantic predicates in rule joinSource
| 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 |
0bf84fba6502cb4bc86f9e558a4a928e6397a793 | yang/yang-parser-antlr/src/main/antlr4/org/opendaylight/yangtools/yang/parser/antlr/YangStatementLexer.g4 | yang/yang-parser-antlr/src/main/antlr4/org/opendaylight/yangtools/yang/parser/antlr/YangStatementLexer.g4 | //
// Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v1.0 which accompanies this distribution,
// and is available at http://www.eclipse.org/legal/epl-v10.html
//
lexer grammar... | //
// Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v1.0 which accompanies this distribution,
// and is available at http://www.eclipse.org/legal/epl-v10.html
//
lexer grammar... | Replace block comment with a non-greedy rule | Replace block comment with a non-greedy rule
We do not need an explicit mode here, we can just use a non-greedy
match and move on. This simplifies things a bit.
Change-Id: Ieab6d9cec1b17c8d86cda49cfc46a258a569e5e0
Signed-off-by: Robert Varga <91ae5aa8c7a9f7e57b701db766e23e544aaa6ae9@pantheon.tech>
| ANTLR | epl-1.0 | opendaylight/yangtools,opendaylight/yangtools |
f06d26d9e37fc650141cff308e5cb552c300b7d8 | shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/BaseRule.g4 | shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/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 SQLServer order by collate support. (#9493) | add SQLServer order by collate support. (#9493)
Co-authored-by: Zonglei Dong <cb632987d0bad86bd5e3a4e4de01495b03458781@613.com> | ANTLR | apache-2.0 | apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere,apache/incubator-shardingsphere |
c5d468badc8a69bb389ca133ffa0828024c1f755 | sharding-core/src/main/antlr4/imports/OracleDCLStatement.g4 | sharding-core/src/main/antlr4/imports/OracleDCLStatement.g4 | grammar OracleDCLStatement;
import OracleKeyword, Keyword, OracleBase, BaseRule, DataType, Symbol;
/**
* each statement has a url,
* each base url : https://docs.oracle.com/database/121/SQLRF/.
* no begin statement in oracle
*/
//statements_9014.htm#SQLRF01603
grant
: GRANT
(
(grantSystemPrivileges |... | grammar OracleDCLStatement;
import OracleKeyword, Keyword, OracleBase, BaseRule, DataType, Symbol;
/**
* each statement has a url,
* each base url : https://docs.oracle.com/database/121/SQLRF/.
* no begin statement in oracle
*/
//statements_9014.htm#SQLRF01603
grant
: GRANT
(
(grantSystemPrivileges |... | add revokeSystemPrivileges | add revokeSystemPrivileges
| ANTLR | apache-2.0 | apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,apache/incubator-shardingsphere,apache/incubator-shardingsphere,leeyazhou/sharding-jdbc,leeyazhou/sharding-jdbc |
c70ea782e88178c60fa2ca3d426a21b5fcb6520b | 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, mod... | /*
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... | Update to June 2018 schema | Update to June 2018 schema
Update the grammar to June 2018 schema | 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 |
cf0776d7ce91743c832114e73c9ba6b3d5e00c00 | turin-parser/src/main/antlr4/me/tomassetti/parser/antlr/TurinParser.g4 | turin-parser/src/main/antlr4/me/tomassetti/parser/antlr/TurinParser.g4 | parser grammar TurinParser;
options { tokenVocab = TurinLexer; }
@header {
}
turinFile:
namespace=namespaceDecl nls
(imports+=importDeclaration)*
(members+=fileMember)*
EOF;
// Base
nls: NL+;
qualifiedId:
(parts+=ID POINT)* parts+=ID;
// Namespace
namespaceDecl:
NAMESPACE_KW name=qual... | parser grammar TurinParser;
options { tokenVocab = TurinLexer; }
@header {
}
turinFile:
namespace=namespaceDecl nls
(imports+=importDeclaration)*
(members+=fileMember)*
EOF;
// Base
nls: NL+;
qualifiedId:
(parts+=ID POINT)* parts+=ID;
// Namespace
namespaceDecl:
NAMESPACE_KW name=qual... | support newlines after commas | support newlines after commas
| ANTLR | apache-2.0 | ftomassetti/turin-programming-language,ftomassetti/turin-programming-language |
93b174f7366be6d9d22e4c0305fad369629a3a94 | 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-z][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';
//常量
CONSTANT : [a-z][a... | 添加位运算,指数运算 | 添加位运算,指数运算
Signed-off-by: 许鸿翔 <ebcf9462b4672da4b31ccb60a5db1234887eda71@foxmail.com>
| ANTLR | agpl-3.0 | wangbiu/lpmlnmodels |
bdaa71194f5eb407bbb0b021dd7cbfdf99e7381e | 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 upper-case letters in file extensions | Allow upper-case letters in file extensions
| ANTLR | apache-2.0 | ashirley/reviki,ashirley/reviki,CoreFiling/reviki,strr/reviki,CoreFiling/reviki,ashirley/reviki,CoreFiling/reviki,strr/reviki,strr/reviki,strr/reviki,CoreFiling/reviki,strr/reviki,CoreFiling/reviki,ashirley/reviki,ashirley/reviki |
d665ead3680fbb28cc5bd75347d8e4f35bcaaa42 | pattern_grammar/STIXPattern.g4 | pattern_grammar/STIXPattern.g4 | // This is an ANTLR4 grammar for the STIX Patterning Language.
//
// http://docs.oasis-open.org/cti/stix/v2.0/stix-v2.0-part5-stix-patterning.html
grammar STIXPattern;
pattern
: observationExpressions EOF
;
observationExpressions
: <assoc=left> observationExpressions FOLLOWEDBY observationExpressions
| obser... | // This is an ANTLR4 grammar for the STIX Patterning Language.
//
// http://docs.oasis-open.org/cti/stix/v2.0/stix-v2.0-part5-stix-patterning.html
grammar STIXPattern;
pattern
: observationExpressions EOF
;
observationExpressions
: <assoc=left> observationExpressions FOLLOWEDBY observationExpressions
| obser... | Add EXISTS operator | Add EXISTS operator
| ANTLR | bsd-3-clause | oasis-open/cti-stix2-json-schemas |
3ccc3d7d81ac8620cf02d77dae018271616196e8 | python3-cs/Python3Parser.g4 | python3-cs/Python3Parser.g4 | /*
* The MIT License (MIT)
*
* Copyright (c) 2014 by Bart Kiers
*
* 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... | /*
* The MIT License (MIT)
*
* Copyright (c) 2014 by Bart Kiers
*
* 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... | replace token literals with token keywords from lexer rules | replace token literals with token keywords from lexer rules
| 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 |
7b3778a11694aa2c22956127328c86205f6fd1bd | json/JSON.g4 | json/JSON.g4 |
/** Taken from "The Definitive ANTLR 4 Reference" by Terence Parr */
// Derived from http://json.org
grammar JSON;
json
: value
;
object
: '{' pair (',' pair)* '}'
| '{' '}'
;
pair
: STRING ':' value
;
array
: '[' value (',' value)* ']'
| '[' ']'
;
value
: STRING
| NUMBER
|... |
/** Taken from "The Definitive ANTLR 4 Reference" by Terence Parr */
// Derived from http://json.org
grammar JSON;
json
: value
;
obj
: '{' pair (',' pair)* '}'
| '{' '}'
;
pair
: STRING ':' value
;
array
: '[' value (',' value)* ']'
| '[' ']'
;
value
: STRING
| NUMBER
| ob... | Make JSON grammar Python compatible. | Make JSON grammar Python compatible.
The 'object' parser rule was renamed to 'obj' to avoid symbol
conflict with Python's builtin object.
| 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 |
5fbbec3b37d77abcefd89ab1750003158eceee24 | turin-parser/src/main/antlr4/me/tomassetti/parser/antlr/TurinParser.g4 | turin-parser/src/main/antlr4/me/tomassetti/parser/antlr/TurinParser.g4 | parser grammar TurinParser;
options { tokenVocab = TurinLexer; }
@header {
}
turinFile:
namespace=namespaceDecl nls
(imports+=importDeclaration)*
(members+=fileMember)*
EOF;
// Base
nls: NL+;
qualifiedId:
(parts+=VALUE_ID POINT)* parts+=VALUE_ID;
// Namespace
namespaceDecl:
NAMESPACE_... | parser grammar TurinParser;
options { tokenVocab = TurinLexer; }
@header {
}
turinFile:
namespace=namespaceDecl nls
(imports+=importDeclaration)*
(members+=fileMember)*
EOF;
// Base
nls: NL+;
qualifiedId:
(parts+=VALUE_ID POINT)* parts+=VALUE_ID;
// Namespace
namespaceDecl:
NAMESPACE_... | add the asterisk param | add the asterisk param
| ANTLR | apache-2.0 | ftomassetti/turin-programming-language,ftomassetti/turin-programming-language |
a08198444720e6127c50100c52587c4cba08fb32 | MATLAB.g4 | MATLAB.g4 | grammar MATLAB;
fileDecl
: (functionDecl | classDecl)? (functionDecl* | partialFunctionDecl*)
| partialFunctionDecl*
| stat* // Script
;
endStat
: (NL|COMMA|SEMI)
;
endStatNL
: NL
;
// Function declaration without the closing end
partialFunctionDecl
: 'function' outArgs? ID in... | grammar MATLAB;
fileDecl
: (functionDecl | classDecl)? (functionDecl* | partialFunctionDecl*)
| partialFunctionDecl*
| stat* // Script
;
endStat
: (NL|COMMA|SEMI) NL*
;
endStatNL
: NL+
;
// Function declaration without the closing end
partialFunctionDecl
: 'function' outArgs? ... | Refactor endStat rule to include NL* | Refactor endStat rule to include NL*
| ANTLR | apache-2.0 | mattmcd/ParseMATLAB,mattmcd/ParseMATLAB |
87716fccfdbb1968c40cbaf4942bfcb9a294e648 | watertemplate-engine/grammar.g4 | watertemplate-engine/grammar.g4 | prop_name_head
: [a-zA-Z]
;
prop_name_body_char
: '_'
| [0-9]
| prop_name_head
;
prop_name_body
: prop_name_body_char
| prop_name_body_char prop_name_body
;
prop_name
: prop_name_head
| prop_name_head prop_name_body
;
id
: prop_name
| prop_name '.' id
;
// ------------------------------------------... | prop_name_head
: [a-zA-Z]
;
prop_name_body_char
: '_'
| [0-9]
| prop_name_head
;
prop_name_body
: prop_name_body_char
| prop_name_body_char prop_name_body
;
prop_name
: prop_name_head
| prop_name_head prop_name_body
;
id
: prop_name
| prop_name '.' id
;
// ------------------------------------------... | Update grammar.g4 | Update grammar.g4 | ANTLR | apache-2.0 | tiagobento/watertemplate-engine,codefacts/watertemplate-engine,codefacts/watertemplate-engine,tiagobento/watertemplate-engine |
c5cf8570a2e80813f5b9089666279d217616fb8b | VineScript/Compiler/VineLexer.g4 | VineScript/Compiler/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
// ... | Allow line returns in statements This is now allowed for example: << for i in [ "foo", "bar", "very long string ..." ] >> {{ i }} << endfor >> | Allow line returns in statements
This is now allowed for example:
<< for i in [
"foo", "bar", "very long string ..."
] >>
{{ i }}
<<
endfor
>>
| ANTLR | mit | julsam/VineScript |
e3a1106a19bf014811acdd347e2ad31b663fb5a8 | lang/src/main/antlr4/org/kaazing/k3po/lang/parser/v2/Robot.g4 | lang/src/main/antlr4/org/kaazing/k3po/lang/parser/v2/Robot.g4 | /**
* Copyright (c) 2007-2014, Kaazing Corporation. All rights reserved.
*/
grammar Robot;
/* Parser rules */
// A robot script is comprised of a list of commands, events and barriers for
// each stream. Note that we deliberately allow empty scripts, in order to
// handle scripts which are comprised of nothing but ... | /**
* Copyright (c) 2007-2014, Kaazing Corporation. All rights reserved.
*/
grammar Robot;
/* Parser rules */
// A robot script is comprised of a list of commands, events and barriers for
// each stream. Note that we deliberately allow empty scripts, in order to
// handle scripts which are comprised of nothing but ... | Support . in qualified config names | Support . in qualified config names
| ANTLR | apache-2.0 | cmebarrow/k3po,StCostea/k3po,jfallows/k3po,k3po/k3po,cmebarrow/k3po,jfallows/k3po,StCostea/k3po,k3po/k3po |
11e95d3bfc304679f3f5902c8f50e81137440e19 | sharding-jdbc-ddl-parser/src/main/antlr4/imports/OracleAlterTable.g4 | sharding-jdbc-ddl-parser/src/main/antlr4/imports/OracleAlterTable.g4 | grammar OracleAlterTable;
import OracleKeyword, DataType, Keyword,OracleCreateIndex, OracleTableBase,OracleBase,BaseRule,Symbol;
alterTable
: ALTER TABLE tableName
( alterTableProperties
| columnClauses
| constraintClauses
| alterExternalTable
)?
;
alterTableProperties
: renam... | grammar OracleAlterTable;
import OracleKeyword, DataType, Keyword,OracleCreateIndex, OracleTableBase,OracleBase,BaseRule,Symbol;
alterTable
: ALTER TABLE tableName
( alterTableProperties
| columnClauses
| constraintClauses
| alterExternalTable
)?
;
alterTableProperties
: renam... | Format rules | Format rules
| 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 |
48eb8a600b4d5e6e469cab33b79a4b63c1e60114 | 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("//");
... | Break inline formatting in lists at the start of the next item, not at all newlines | Break inline formatting in lists at the start of the next item, not at all newlines
| ANTLR | apache-2.0 | strr/reviki,strr/reviki,ashirley/reviki,strr/reviki,CoreFiling/reviki,CoreFiling/reviki,ashirley/reviki,ashirley/reviki,strr/reviki,ashirley/reviki,CoreFiling/reviki,ashirley/reviki,strr/reviki,CoreFiling/reviki,CoreFiling/reviki |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.