New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@stordata/grammars

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stordata/grammars - npm Package Compare versions

Comparing version 1.0.20240130145513 to 1.0.20240131143154

140

generated/src/grammars/CustomMetricLexer.js

@@ -1,2 +0,2 @@

// Generated from src/grammars/CustomMetric.g4 by ANTLR 4.12.0
// Generated from src/grammars/CustomMetric.g4 by ANTLR 4.13.1
// jshint ignore: start

@@ -6,37 +6,41 @@ import antlr4 from 'antlr4';

const serializedATN = [4,0,21,113,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,
const serializedATN = [4,0,23,124,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,
4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,
12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,
2,20,7,20,1,0,3,0,45,8,0,1,0,4,0,48,8,0,11,0,12,0,49,1,0,1,0,4,0,54,8,0,
11,0,12,0,55,3,0,58,8,0,1,1,1,1,4,1,62,8,1,11,1,12,1,63,1,1,1,1,1,2,1,2,
1,2,1,2,4,2,72,8,2,11,2,12,2,73,1,2,1,2,1,3,1,3,1,4,1,4,1,5,1,5,1,6,1,6,
1,7,1,7,1,8,1,8,1,9,1,9,1,10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,
1,15,1,15,1,16,1,16,1,17,1,17,1,18,1,18,1,19,1,19,1,20,1,20,1,63,0,21,1,
1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,
31,16,33,17,35,18,37,19,39,20,41,21,1,0,4,1,0,48,57,1,0,9,9,1,0,13,13,1,
0,10,10,121,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,
0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,
0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,
33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,1,44,1,0,
0,0,3,59,1,0,0,0,5,71,1,0,0,0,7,77,1,0,0,0,9,79,1,0,0,0,11,81,1,0,0,0,13,
83,1,0,0,0,15,85,1,0,0,0,17,87,1,0,0,0,19,89,1,0,0,0,21,91,1,0,0,0,23,93,
1,0,0,0,25,95,1,0,0,0,27,97,1,0,0,0,29,99,1,0,0,0,31,101,1,0,0,0,33,103,
1,0,0,0,35,105,1,0,0,0,37,107,1,0,0,0,39,109,1,0,0,0,41,111,1,0,0,0,43,45,
3,25,12,0,44,43,1,0,0,0,44,45,1,0,0,0,45,47,1,0,0,0,46,48,3,15,7,0,47,46,
1,0,0,0,48,49,1,0,0,0,49,47,1,0,0,0,49,50,1,0,0,0,50,57,1,0,0,0,51,53,3,
17,8,0,52,54,3,15,7,0,53,52,1,0,0,0,54,55,1,0,0,0,55,53,1,0,0,0,55,56,1,
0,0,0,56,58,1,0,0,0,57,51,1,0,0,0,57,58,1,0,0,0,58,2,1,0,0,0,59,61,3,31,
15,0,60,62,3,41,20,0,61,60,1,0,0,0,62,63,1,0,0,0,63,64,1,0,0,0,63,61,1,0,
0,0,64,65,1,0,0,0,65,66,3,31,15,0,66,4,1,0,0,0,67,72,3,33,16,0,68,72,3,35,
17,0,69,72,3,37,18,0,70,72,3,39,19,0,71,67,1,0,0,0,71,68,1,0,0,0,71,69,1,
0,0,0,71,70,1,0,0,0,72,73,1,0,0,0,73,71,1,0,0,0,73,74,1,0,0,0,74,75,1,0,
0,0,75,76,6,2,0,0,76,6,1,0,0,0,77,78,3,23,11,0,78,8,1,0,0,0,79,80,3,25,12,
0,80,10,1,0,0,0,81,82,3,27,13,0,82,12,1,0,0,0,83,84,3,29,14,0,84,14,1,0,
0,0,85,86,7,0,0,0,86,16,1,0,0,0,87,88,5,46,0,0,88,18,1,0,0,0,89,90,5,40,
0,0,90,20,1,0,0,0,91,92,5,41,0,0,92,22,1,0,0,0,93,94,5,43,0,0,94,24,1,0,
0,0,95,96,5,45,0,0,96,26,1,0,0,0,97,98,5,42,0,0,98,28,1,0,0,0,99,100,5,47,
0,0,100,30,1,0,0,0,101,102,5,34,0,0,102,32,1,0,0,0,103,104,5,32,0,0,104,
34,1,0,0,0,105,106,7,1,0,0,106,36,1,0,0,0,107,108,7,2,0,0,108,38,1,0,0,0,
109,110,7,3,0,0,110,40,1,0,0,0,111,112,9,0,0,0,112,42,1,0,0,0,8,0,44,49,
55,57,63,71,73,1,6,0,0];
2,20,7,20,2,21,7,21,2,22,7,22,1,0,1,0,1,1,3,1,51,8,1,1,1,4,1,54,8,1,11,1,
12,1,55,1,1,1,1,4,1,60,8,1,11,1,12,1,61,3,1,64,8,1,1,2,1,2,4,2,68,8,2,11,
2,12,2,69,1,2,1,2,1,3,4,3,75,8,3,11,3,12,3,76,1,4,1,4,1,4,1,4,4,4,83,8,4,
11,4,12,4,84,1,4,1,4,1,5,1,5,1,6,1,6,1,7,1,7,1,8,1,8,1,9,1,9,1,10,1,10,1,
11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,1,15,1,15,1,16,1,16,1,17,1,17,1,18,
1,18,1,19,1,19,1,20,1,20,1,21,1,21,1,22,1,22,1,69,0,23,1,1,3,2,5,3,7,4,9,
5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,
18,37,19,39,20,41,21,43,22,45,23,1,0,5,2,0,65,90,97,122,1,0,48,57,1,0,9,
9,1,0,13,13,1,0,10,10,133,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,
0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,
0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,
31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,
0,0,0,43,1,0,0,0,0,45,1,0,0,0,1,47,1,0,0,0,3,50,1,0,0,0,5,65,1,0,0,0,7,74,
1,0,0,0,9,82,1,0,0,0,11,88,1,0,0,0,13,90,1,0,0,0,15,92,1,0,0,0,17,94,1,0,
0,0,19,96,1,0,0,0,21,98,1,0,0,0,23,100,1,0,0,0,25,102,1,0,0,0,27,104,1,0,
0,0,29,106,1,0,0,0,31,108,1,0,0,0,33,110,1,0,0,0,35,112,1,0,0,0,37,114,1,
0,0,0,39,116,1,0,0,0,41,118,1,0,0,0,43,120,1,0,0,0,45,122,1,0,0,0,47,48,
5,44,0,0,48,2,1,0,0,0,49,51,3,29,14,0,50,49,1,0,0,0,50,51,1,0,0,0,51,53,
1,0,0,0,52,54,3,19,9,0,53,52,1,0,0,0,54,55,1,0,0,0,55,53,1,0,0,0,55,56,1,
0,0,0,56,63,1,0,0,0,57,59,3,21,10,0,58,60,3,19,9,0,59,58,1,0,0,0,60,61,1,
0,0,0,61,59,1,0,0,0,61,62,1,0,0,0,62,64,1,0,0,0,63,57,1,0,0,0,63,64,1,0,
0,0,64,4,1,0,0,0,65,67,3,35,17,0,66,68,3,45,22,0,67,66,1,0,0,0,68,69,1,0,
0,0,69,70,1,0,0,0,69,67,1,0,0,0,70,71,1,0,0,0,71,72,3,35,17,0,72,6,1,0,0,
0,73,75,7,0,0,0,74,73,1,0,0,0,75,76,1,0,0,0,76,74,1,0,0,0,76,77,1,0,0,0,
77,8,1,0,0,0,78,83,3,37,18,0,79,83,3,39,19,0,80,83,3,41,20,0,81,83,3,43,
21,0,82,78,1,0,0,0,82,79,1,0,0,0,82,80,1,0,0,0,82,81,1,0,0,0,83,84,1,0,0,
0,84,82,1,0,0,0,84,85,1,0,0,0,85,86,1,0,0,0,86,87,6,4,0,0,87,10,1,0,0,0,
88,89,3,27,13,0,89,12,1,0,0,0,90,91,3,29,14,0,91,14,1,0,0,0,92,93,3,31,15,
0,93,16,1,0,0,0,94,95,3,33,16,0,95,18,1,0,0,0,96,97,7,1,0,0,97,20,1,0,0,
0,98,99,5,46,0,0,99,22,1,0,0,0,100,101,5,40,0,0,101,24,1,0,0,0,102,103,5,
41,0,0,103,26,1,0,0,0,104,105,5,43,0,0,105,28,1,0,0,0,106,107,5,45,0,0,107,
30,1,0,0,0,108,109,5,42,0,0,109,32,1,0,0,0,110,111,5,47,0,0,111,34,1,0,0,
0,112,113,5,34,0,0,113,36,1,0,0,0,114,115,5,32,0,0,115,38,1,0,0,0,116,117,
7,2,0,0,117,40,1,0,0,0,118,119,7,3,0,0,119,42,1,0,0,0,120,121,7,4,0,0,121,
44,1,0,0,0,122,123,9,0,0,0,123,46,1,0,0,0,9,0,50,55,61,63,69,76,82,84,1,
6,0,0];

@@ -53,14 +57,14 @@

static modeNames = [ "DEFAULT_MODE" ];
static literalNames = [ null, null, null, null, null, null, null, null,
null, "'.'", "'('", "')'", "'+'", "'-'", "'*'",
"'/'", "'\"'", "' '" ];
static symbolicNames = [ null, "NUMBER", "STRING", "WHITESPACE", "ADD",
"SUBTRACT", "MULTIPLY", "DIVIDE", "DIGIT", "DOT",
"L_PARANT", "R_PARANT", "PLUS", "MINUS", "STAR",
"SLASH", "DQUOTE", "SPACE", "TAB", "CR", "LF",
"ANY" ];
static ruleNames = [ "NUMBER", "STRING", "WHITESPACE", "ADD", "SUBTRACT",
"MULTIPLY", "DIVIDE", "DIGIT", "DOT", "L_PARANT",
"R_PARANT", "PLUS", "MINUS", "STAR", "SLASH", "DQUOTE",
"SPACE", "TAB", "CR", "LF", "ANY" ];
static literalNames = [ null, "','", null, null, null, null, null, null,
null, null, null, "'.'", "'('", "')'", "'+'", "'-'",
"'*'", "'/'", "'\"'", "' '" ];
static symbolicNames = [ null, null, "NUMBER", "STRING", "FN", "WHITESPACE",
"ADD", "SUBTRACT", "MULTIPLY", "DIVIDE", "DIGIT",
"DOT", "L_PARANT", "R_PARANT", "PLUS", "MINUS",
"STAR", "SLASH", "DQUOTE", "SPACE", "TAB", "CR",
"LF", "ANY" ];
static ruleNames = [ "T__0", "NUMBER", "STRING", "FN", "WHITESPACE", "ADD",
"SUBTRACT", "MULTIPLY", "DIVIDE", "DIGIT", "DOT",
"L_PARANT", "R_PARANT", "PLUS", "MINUS", "STAR", "SLASH",
"DQUOTE", "SPACE", "TAB", "CR", "LF", "ANY" ];

@@ -74,25 +78,27 @@ constructor(input) {

CustomMetricLexer.EOF = antlr4.Token.EOF;
CustomMetricLexer.NUMBER = 1;
CustomMetricLexer.STRING = 2;
CustomMetricLexer.WHITESPACE = 3;
CustomMetricLexer.ADD = 4;
CustomMetricLexer.SUBTRACT = 5;
CustomMetricLexer.MULTIPLY = 6;
CustomMetricLexer.DIVIDE = 7;
CustomMetricLexer.DIGIT = 8;
CustomMetricLexer.DOT = 9;
CustomMetricLexer.L_PARANT = 10;
CustomMetricLexer.R_PARANT = 11;
CustomMetricLexer.PLUS = 12;
CustomMetricLexer.MINUS = 13;
CustomMetricLexer.STAR = 14;
CustomMetricLexer.SLASH = 15;
CustomMetricLexer.DQUOTE = 16;
CustomMetricLexer.SPACE = 17;
CustomMetricLexer.TAB = 18;
CustomMetricLexer.CR = 19;
CustomMetricLexer.LF = 20;
CustomMetricLexer.ANY = 21;
CustomMetricLexer.T__0 = 1;
CustomMetricLexer.NUMBER = 2;
CustomMetricLexer.STRING = 3;
CustomMetricLexer.FN = 4;
CustomMetricLexer.WHITESPACE = 5;
CustomMetricLexer.ADD = 6;
CustomMetricLexer.SUBTRACT = 7;
CustomMetricLexer.MULTIPLY = 8;
CustomMetricLexer.DIVIDE = 9;
CustomMetricLexer.DIGIT = 10;
CustomMetricLexer.DOT = 11;
CustomMetricLexer.L_PARANT = 12;
CustomMetricLexer.R_PARANT = 13;
CustomMetricLexer.PLUS = 14;
CustomMetricLexer.MINUS = 15;
CustomMetricLexer.STAR = 16;
CustomMetricLexer.SLASH = 17;
CustomMetricLexer.DQUOTE = 18;
CustomMetricLexer.SPACE = 19;
CustomMetricLexer.TAB = 20;
CustomMetricLexer.CR = 21;
CustomMetricLexer.LF = 22;
CustomMetricLexer.ANY = 23;

@@ -1,2 +0,2 @@

// Generated from src/grammars/CustomMetric.g4 by ANTLR 4.12.0
// Generated from src/grammars/CustomMetric.g4 by ANTLR 4.13.1
// jshint ignore: start

@@ -17,2 +17,11 @@ import antlr4 from 'antlr4';

// Enter a parse tree produced by CustomMetricParser#Function.
enterFunction(ctx) {
}
// Exit a parse tree produced by CustomMetricParser#Function.
exitFunction(ctx) {
}
// Enter a parse tree produced by CustomMetricParser#Addition.

@@ -19,0 +28,0 @@ enterAddition(ctx) {

@@ -1,2 +0,2 @@

// Generated from src/grammars/CustomMetric.g4 by ANTLR 4.12.0
// Generated from src/grammars/CustomMetric.g4 by ANTLR 4.13.1
// jshint ignore: start

@@ -7,12 +7,16 @@ import antlr4 from 'antlr4';

const serializedATN = [4,1,21,34,2,0,7,0,2,1,7,1,1,0,1,0,1,0,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,3,1,15,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,5,1,29,8,1,10,1,12,1,32,9,1,1,1,0,1,2,2,0,2,0,0,37,0,4,1,0,0,0,2,14,1,
0,0,0,4,5,3,2,1,0,5,6,5,0,0,1,6,1,1,0,0,0,7,8,6,1,-1,0,8,9,5,10,0,0,9,10,
3,2,1,0,10,11,5,11,0,0,11,15,1,0,0,0,12,15,5,1,0,0,13,15,5,2,0,0,14,7,1,
0,0,0,14,12,1,0,0,0,14,13,1,0,0,0,15,30,1,0,0,0,16,17,10,7,0,0,17,18,5,4,
0,0,18,29,3,2,1,8,19,20,10,6,0,0,20,21,5,5,0,0,21,29,3,2,1,7,22,23,10,5,
0,0,23,24,5,6,0,0,24,29,3,2,1,6,25,26,10,4,0,0,26,27,5,7,0,0,27,29,3,2,1,
5,28,16,1,0,0,0,28,19,1,0,0,0,28,22,1,0,0,0,28,25,1,0,0,0,29,32,1,0,0,0,
30,28,1,0,0,0,30,31,1,0,0,0,31,3,1,0,0,0,32,30,1,0,0,0,3,14,28,30];
const serializedATN = [4,1,23,47,2,0,7,0,2,1,7,1,1,0,1,0,1,0,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,18,8,1,1,1,1,1,5,1,22,8,1,10,1,12,1,25,9,
1,1,1,3,1,28,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,42,
8,1,10,1,12,1,45,9,1,1,1,0,1,2,2,0,2,0,0,53,0,4,1,0,0,0,2,27,1,0,0,0,4,5,
3,2,1,0,5,6,5,0,0,1,6,1,1,0,0,0,7,8,6,1,-1,0,8,9,5,12,0,0,9,10,3,2,1,0,10,
11,5,13,0,0,11,28,1,0,0,0,12,28,5,2,0,0,13,28,5,3,0,0,14,15,5,4,0,0,15,17,
5,12,0,0,16,18,3,2,1,0,17,16,1,0,0,0,17,18,1,0,0,0,18,23,1,0,0,0,19,20,5,
1,0,0,20,22,3,2,1,0,21,19,1,0,0,0,22,25,1,0,0,0,23,21,1,0,0,0,23,24,1,0,
0,0,24,26,1,0,0,0,25,23,1,0,0,0,26,28,5,13,0,0,27,7,1,0,0,0,27,12,1,0,0,
0,27,13,1,0,0,0,27,14,1,0,0,0,28,43,1,0,0,0,29,30,10,8,0,0,30,31,5,6,0,0,
31,42,3,2,1,9,32,33,10,7,0,0,33,34,5,7,0,0,34,42,3,2,1,8,35,36,10,6,0,0,
36,37,5,8,0,0,37,42,3,2,1,7,38,39,10,5,0,0,39,40,5,9,0,0,40,42,3,2,1,6,41,
29,1,0,0,0,41,32,1,0,0,0,41,35,1,0,0,0,41,38,1,0,0,0,42,45,1,0,0,0,43,41,
1,0,0,0,43,44,1,0,0,0,44,3,1,0,0,0,45,43,1,0,0,0,5,17,23,27,41,43];

@@ -29,7 +33,7 @@

static grammarFileName = "CustomMetric.g4";
static literalNames = [ null, null, null, null, null, null, null, null,
null, "'.'", "'('", "')'", "'+'", "'-'", "'*'",
"'/'", "'\"'", "' '" ];
static symbolicNames = [ null, "NUMBER", "STRING", "WHITESPACE", "ADD",
"SUBTRACT", "MULTIPLY", "DIVIDE", "DIGIT",
static literalNames = [ null, "','", null, null, null, null, null, null,
null, null, null, "'.'", "'('", "')'", "'+'",
"'-'", "'*'", "'/'", "'\"'", "' '" ];
static symbolicNames = [ null, null, "NUMBER", "STRING", "FN", "WHITESPACE",
"ADD", "SUBTRACT", "MULTIPLY", "DIVIDE", "DIGIT",
"DOT", "L_PARANT", "R_PARANT", "PLUS", "MINUS",

@@ -60,9 +64,9 @@ "STAR", "SLASH", "DQUOTE", "SPACE", "TAB",

case 0:
return this.precpred(this._ctx, 8);
case 1:
return this.precpred(this._ctx, 7);
case 1:
case 2:
return this.precpred(this._ctx, 6);
case 2:
case 3:
return this.precpred(this._ctx, 5);
case 3:
return this.precpred(this._ctx, 4);
default:

@@ -110,8 +114,9 @@ throw "No predicate with index:" + predIndex;

this.enterRecursionRule(localctx, 2, CustomMetricParser.RULE_expression, _p);
var _la = 0;
try {
this.enterOuterAlt(localctx, 1);
this.state = 14;
this.state = 27;
this._errHandler.sync(this);
switch(this._input.LA(1)) {
case 10:
case 12:
localctx = new WrappedExpressionContext(this, localctx);

@@ -128,3 +133,3 @@ this._ctx = localctx;

break;
case 1:
case 2:
localctx = new NumberContext(this, localctx);

@@ -136,3 +141,3 @@ this._ctx = localctx;

break;
case 2:
case 3:
localctx = new StringContext(this, localctx);

@@ -144,2 +149,33 @@ this._ctx = localctx;

break;
case 4:
localctx = new FunctionContext(this, localctx);
this._ctx = localctx;
_prevctx = localctx;
this.state = 14;
this.match(CustomMetricParser.FN);
this.state = 15;
this.match(CustomMetricParser.L_PARANT);
this.state = 17;
this._errHandler.sync(this);
_la = this._input.LA(1);
if((((_la) & ~0x1f) === 0 && ((1 << _la) & 4124) !== 0)) {
this.state = 16;
this.expression(0);
}
this.state = 23;
this._errHandler.sync(this);
_la = this._input.LA(1);
while(_la===1) {
this.state = 19;
this.match(CustomMetricParser.T__0);
this.state = 20;
this.expression(0);
this.state = 25;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 26;
this.match(CustomMetricParser.R_PARANT);
break;
default:

@@ -149,5 +185,5 @@ throw new antlr4.error.NoViableAltException(this);

this._ctx.stop = this._input.LT(-1);
this.state = 30;
this.state = 43;
this._errHandler.sync(this);
var _alt = this._interp.adaptivePredict(this._input,2,this._ctx)
var _alt = this._interp.adaptivePredict(this._input,4,this._ctx)
while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) {

@@ -159,5 +195,5 @@ if(_alt===1) {

_prevctx = localctx;
this.state = 28;
this.state = 41;
this._errHandler.sync(this);
var la_ = this._interp.adaptivePredict(this._input,1,this._ctx);
var la_ = this._interp.adaptivePredict(this._input,3,this._ctx);
switch(la_) {

@@ -168,10 +204,10 @@ case 1:

this.pushNewRecursionContext(localctx, _startState, CustomMetricParser.RULE_expression);
this.state = 16;
if (!( this.precpred(this._ctx, 7))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 7)");
this.state = 29;
if (!( this.precpred(this._ctx, 8))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 8)");
}
this.state = 17;
this.state = 30;
this.match(CustomMetricParser.ADD);
this.state = 18;
localctx.right = this.expression(8);
this.state = 31;
localctx.right = this.expression(9);
break;

@@ -183,10 +219,10 @@

this.pushNewRecursionContext(localctx, _startState, CustomMetricParser.RULE_expression);
this.state = 19;
if (!( this.precpred(this._ctx, 6))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 6)");
this.state = 32;
if (!( this.precpred(this._ctx, 7))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 7)");
}
this.state = 20;
this.state = 33;
this.match(CustomMetricParser.SUBTRACT);
this.state = 21;
localctx.right = this.expression(7);
this.state = 34;
localctx.right = this.expression(8);
break;

@@ -198,10 +234,10 @@

this.pushNewRecursionContext(localctx, _startState, CustomMetricParser.RULE_expression);
this.state = 22;
if (!( this.precpred(this._ctx, 5))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 5)");
this.state = 35;
if (!( this.precpred(this._ctx, 6))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 6)");
}
this.state = 23;
this.state = 36;
this.match(CustomMetricParser.MULTIPLY);
this.state = 24;
localctx.right = this.expression(6);
this.state = 37;
localctx.right = this.expression(7);
break;

@@ -213,10 +249,10 @@

this.pushNewRecursionContext(localctx, _startState, CustomMetricParser.RULE_expression);
this.state = 25;
if (!( this.precpred(this._ctx, 4))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 4)");
this.state = 38;
if (!( this.precpred(this._ctx, 5))) {
throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 5)");
}
this.state = 26;
this.state = 39;
this.match(CustomMetricParser.DIVIDE);
this.state = 27;
localctx.right = this.expression(5);
this.state = 40;
localctx.right = this.expression(6);
break;

@@ -226,5 +262,5 @@

}
this.state = 32;
this.state = 45;
this._errHandler.sync(this);
_alt = this._interp.adaptivePredict(this._input,2,this._ctx);
_alt = this._interp.adaptivePredict(this._input,4,this._ctx);
}

@@ -250,23 +286,25 @@

CustomMetricParser.EOF = antlr4.Token.EOF;
CustomMetricParser.NUMBER = 1;
CustomMetricParser.STRING = 2;
CustomMetricParser.WHITESPACE = 3;
CustomMetricParser.ADD = 4;
CustomMetricParser.SUBTRACT = 5;
CustomMetricParser.MULTIPLY = 6;
CustomMetricParser.DIVIDE = 7;
CustomMetricParser.DIGIT = 8;
CustomMetricParser.DOT = 9;
CustomMetricParser.L_PARANT = 10;
CustomMetricParser.R_PARANT = 11;
CustomMetricParser.PLUS = 12;
CustomMetricParser.MINUS = 13;
CustomMetricParser.STAR = 14;
CustomMetricParser.SLASH = 15;
CustomMetricParser.DQUOTE = 16;
CustomMetricParser.SPACE = 17;
CustomMetricParser.TAB = 18;
CustomMetricParser.CR = 19;
CustomMetricParser.LF = 20;
CustomMetricParser.ANY = 21;
CustomMetricParser.T__0 = 1;
CustomMetricParser.NUMBER = 2;
CustomMetricParser.STRING = 3;
CustomMetricParser.FN = 4;
CustomMetricParser.WHITESPACE = 5;
CustomMetricParser.ADD = 6;
CustomMetricParser.SUBTRACT = 7;
CustomMetricParser.MULTIPLY = 8;
CustomMetricParser.DIVIDE = 9;
CustomMetricParser.DIGIT = 10;
CustomMetricParser.DOT = 11;
CustomMetricParser.L_PARANT = 12;
CustomMetricParser.R_PARANT = 13;
CustomMetricParser.PLUS = 14;
CustomMetricParser.MINUS = 15;
CustomMetricParser.STAR = 16;
CustomMetricParser.SLASH = 17;
CustomMetricParser.DQUOTE = 18;
CustomMetricParser.SPACE = 19;
CustomMetricParser.TAB = 20;
CustomMetricParser.CR = 21;
CustomMetricParser.LF = 22;
CustomMetricParser.ANY = 23;

@@ -346,2 +384,57 @@ CustomMetricParser.RULE_all = 0;

class FunctionContext extends ExpressionContext {
constructor(parser, ctx) {
super(parser);
super.copyFrom(ctx);
}
FN() {
return this.getToken(CustomMetricParser.FN, 0);
};
L_PARANT() {
return this.getToken(CustomMetricParser.L_PARANT, 0);
};
R_PARANT() {
return this.getToken(CustomMetricParser.R_PARANT, 0);
};
expression = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ExpressionContext);
} else {
return this.getTypedRuleContext(ExpressionContext,i);
}
};
enterRule(listener) {
if(listener instanceof CustomMetricListener ) {
listener.enterFunction(this);
}
}
exitRule(listener) {
if(listener instanceof CustomMetricListener ) {
listener.exitFunction(this);
}
}
accept(visitor) {
if ( visitor instanceof CustomMetricVisitor ) {
return visitor.visitFunction(this);
} else {
return visitor.visitChildren(this);
}
}
}
CustomMetricParser.FunctionContext = FunctionContext;
class AdditionContext extends ExpressionContext {

@@ -348,0 +441,0 @@

@@ -1,2 +0,2 @@

// Generated from src/grammars/CustomMetric.g4 by ANTLR 4.12.0
// Generated from src/grammars/CustomMetric.g4 by ANTLR 4.13.1
// jshint ignore: start

@@ -15,2 +15,8 @@ import antlr4 from 'antlr4';

// Visit a parse tree produced by CustomMetricParser#Function.
visitFunction(ctx) {
return this.visitChildren(ctx);
}
// Visit a parse tree produced by CustomMetricParser#Addition.

@@ -17,0 +23,0 @@ visitAddition(ctx) {

{
"name": "@stordata/grammars",
"version":"1.0.20240130145513",
"version":"1.0.20240131143154",
"type": "module",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc