Commit 56267990 authored by Nadim Kobeissi's avatar Nadim Kobeissi 💾
Browse files

Allow single comments inside principal blocks

parent dcd5beb8
Pipeline #750 passed with stages
in 4 minutes and 27 seconds
......@@ -320,17 +320,24 @@ var g = &grammar{
},
},
},
&zeroOrMoreExpr{
pos: position{line: 113, col: 81, offset: 2690},
expr: &ruleRefExpr{
pos: position{line: 113, col: 81, offset: 2690},
name: "Comment",
},
},
&ruleRefExpr{
pos: position{line: 113, col: 81, offset: 2690},
pos: position{line: 113, col: 90, offset: 2699},
name: "_",
},
&litMatcher{
pos: position{line: 113, col: 83, offset: 2692},
pos: position{line: 113, col: 92, offset: 2701},
val: "]",
ignoreCase: false,
},
&ruleRefExpr{
pos: position{line: 113, col: 87, offset: 2696},
pos: position{line: 113, col: 96, offset: 2705},
name: "_",
},
},
......@@ -339,15 +346,15 @@ var g = &grammar{
},
{
name: "PrincipalName",
pos: position{line: 126, col: 1, offset: 2937},
pos: position{line: 126, col: 1, offset: 2946},
expr: &actionExpr{
pos: position{line: 126, col: 18, offset: 2954},
pos: position{line: 126, col: 18, offset: 2963},
run: (*parser).callonPrincipalName1,
expr: &labeledExpr{
pos: position{line: 126, col: 18, offset: 2954},
pos: position{line: 126, col: 18, offset: 2963},
label: "Name",
expr: &ruleRefExpr{
pos: position{line: 126, col: 23, offset: 2959},
pos: position{line: 126, col: 23, offset: 2968},
name: "Identifier",
},
},
......@@ -355,25 +362,25 @@ var g = &grammar{
},
{
name: "Qualifier",
pos: position{line: 131, col: 1, offset: 3062},
pos: position{line: 131, col: 1, offset: 3071},
expr: &actionExpr{
pos: position{line: 131, col: 14, offset: 3075},
pos: position{line: 131, col: 14, offset: 3084},
run: (*parser).callonQualifier1,
expr: &choiceExpr{
pos: position{line: 131, col: 15, offset: 3076},
pos: position{line: 131, col: 15, offset: 3085},
alternatives: []interface{}{
&litMatcher{
pos: position{line: 131, col: 15, offset: 3076},
pos: position{line: 131, col: 15, offset: 3085},
val: "public",
ignoreCase: false,
},
&litMatcher{
pos: position{line: 131, col: 24, offset: 3085},
pos: position{line: 131, col: 24, offset: 3094},
val: "private",
ignoreCase: false,
},
&litMatcher{
pos: position{line: 131, col: 34, offset: 3095},
pos: position{line: 131, col: 34, offset: 3104},
val: "password",
ignoreCase: false,
},
......@@ -383,60 +390,60 @@ var g = &grammar{
},
{
name: "Message",
pos: position{line: 135, col: 1, offset: 3140},
pos: position{line: 135, col: 1, offset: 3149},
expr: &actionExpr{
pos: position{line: 135, col: 12, offset: 3151},
pos: position{line: 135, col: 12, offset: 3160},
run: (*parser).callonMessage1,
expr: &seqExpr{
pos: position{line: 135, col: 12, offset: 3151},
pos: position{line: 135, col: 12, offset: 3160},
exprs: []interface{}{
&labeledExpr{
pos: position{line: 135, col: 12, offset: 3151},
pos: position{line: 135, col: 12, offset: 3160},
label: "Sender",
expr: &ruleRefExpr{
pos: position{line: 135, col: 19, offset: 3158},
pos: position{line: 135, col: 19, offset: 3167},
name: "PrincipalName",
},
},
&ruleRefExpr{
pos: position{line: 135, col: 33, offset: 3172},
pos: position{line: 135, col: 33, offset: 3181},
name: "_",
},
&litMatcher{
pos: position{line: 135, col: 35, offset: 3174},
pos: position{line: 135, col: 35, offset: 3183},
val: "->",
ignoreCase: false,
},
&ruleRefExpr{
pos: position{line: 135, col: 40, offset: 3179},
pos: position{line: 135, col: 40, offset: 3188},
name: "_",
},
&labeledExpr{
pos: position{line: 135, col: 42, offset: 3181},
pos: position{line: 135, col: 42, offset: 3190},
label: "Recipient",
expr: &ruleRefExpr{
pos: position{line: 135, col: 52, offset: 3191},
pos: position{line: 135, col: 52, offset: 3200},
name: "PrincipalName",
},
},
&ruleRefExpr{
pos: position{line: 135, col: 66, offset: 3205},
pos: position{line: 135, col: 66, offset: 3214},
name: "_",
},
&litMatcher{
pos: position{line: 135, col: 68, offset: 3207},
pos: position{line: 135, col: 68, offset: 3216},
val: ":",
ignoreCase: false,
},
&ruleRefExpr{
pos: position{line: 135, col: 72, offset: 3211},
pos: position{line: 135, col: 72, offset: 3220},
name: "_",
},
&labeledExpr{
pos: position{line: 135, col: 74, offset: 3213},
pos: position{line: 135, col: 74, offset: 3222},
label: "Constants",
expr: &ruleRefExpr{
pos: position{line: 135, col: 84, offset: 3223},
pos: position{line: 135, col: 84, offset: 3232},
name: "MessageConstants",
},
},
......@@ -446,24 +453,24 @@ var g = &grammar{
},
{
name: "MessageConstants",
pos: position{line: 146, col: 1, offset: 3412},
pos: position{line: 146, col: 1, offset: 3421},
expr: &actionExpr{
pos: position{line: 146, col: 21, offset: 3432},
pos: position{line: 146, col: 21, offset: 3441},
run: (*parser).callonMessageConstants1,
expr: &labeledExpr{
pos: position{line: 146, col: 21, offset: 3432},
pos: position{line: 146, col: 21, offset: 3441},
label: "MessageConstants",
expr: &oneOrMoreExpr{
pos: position{line: 146, col: 38, offset: 3449},
pos: position{line: 146, col: 38, offset: 3458},
expr: &choiceExpr{
pos: position{line: 146, col: 39, offset: 3450},
pos: position{line: 146, col: 39, offset: 3459},
alternatives: []interface{}{
&ruleRefExpr{
pos: position{line: 146, col: 39, offset: 3450},
pos: position{line: 146, col: 39, offset: 3459},
name: "GuardedConstant",
},
&ruleRefExpr{
pos: position{line: 146, col: 55, offset: 3466},
pos: position{line: 146, col: 55, offset: 3475},
name: "Constant",
},
},
......@@ -474,53 +481,53 @@ var g = &grammar{
},
{
name: "Expression",
pos: position{line: 156, col: 1, offset: 3630},
pos: position{line: 156, col: 1, offset: 3639},
expr: &actionExpr{
pos: position{line: 156, col: 15, offset: 3644},
pos: position{line: 156, col: 15, offset: 3653},
run: (*parser).callonExpression1,
expr: &seqExpr{
pos: position{line: 156, col: 15, offset: 3644},
pos: position{line: 156, col: 15, offset: 3653},
exprs: []interface{}{
&zeroOrMoreExpr{
pos: position{line: 156, col: 15, offset: 3644},
pos: position{line: 156, col: 15, offset: 3653},
expr: &ruleRefExpr{
pos: position{line: 156, col: 15, offset: 3644},
pos: position{line: 156, col: 15, offset: 3653},
name: "Comment",
},
},
&labeledExpr{
pos: position{line: 156, col: 24, offset: 3653},
pos: position{line: 156, col: 24, offset: 3662},
label: "Expression",
expr: &choiceExpr{
pos: position{line: 156, col: 36, offset: 3665},
pos: position{line: 156, col: 36, offset: 3674},
alternatives: []interface{}{
&ruleRefExpr{
pos: position{line: 156, col: 36, offset: 3665},
pos: position{line: 156, col: 36, offset: 3674},
name: "Knows",
},
&ruleRefExpr{
pos: position{line: 156, col: 42, offset: 3671},
pos: position{line: 156, col: 42, offset: 3680},
name: "Generates",
},
&ruleRefExpr{
pos: position{line: 156, col: 52, offset: 3681},
pos: position{line: 156, col: 52, offset: 3690},
name: "Leaks",
},
&ruleRefExpr{
pos: position{line: 156, col: 58, offset: 3687},
pos: position{line: 156, col: 58, offset: 3696},
name: "Assignment",
},
},
},
},
&ruleRefExpr{
pos: position{line: 156, col: 70, offset: 3699},
pos: position{line: 156, col: 70, offset: 3708},
name: "_",
},
&zeroOrMoreExpr{
pos: position{line: 156, col: 72, offset: 3701},
pos: position{line: 156, col: 72, offset: 3710},
expr: &ruleRefExpr{
pos: position{line: 156, col: 72, offset: 3701},
pos: position{line: 156, col: 72, offset: 3710},
name: "Comment",
},
},
......@@ -530,39 +537,39 @@ var g = &grammar{
},
{
name: "Knows",
pos: position{line: 160, col: 1, offset: 3739},
pos: position{line: 160, col: 1, offset: 3748},
expr: &actionExpr{
pos: position{line: 160, col: 10, offset: 3748},
pos: position{line: 160, col: 10, offset: 3757},
run: (*parser).callonKnows1,
expr: &seqExpr{
pos: position{line: 160, col: 10, offset: 3748},
pos: position{line: 160, col: 10, offset: 3757},
exprs: []interface{}{
&litMatcher{
pos: position{line: 160, col: 10, offset: 3748},
pos: position{line: 160, col: 10, offset: 3757},
val: "knows",
ignoreCase: false,
},
&ruleRefExpr{
pos: position{line: 160, col: 18, offset: 3756},
pos: position{line: 160, col: 18, offset: 3765},
name: "_",
},
&labeledExpr{
pos: position{line: 160, col: 20, offset: 3758},
pos: position{line: 160, col: 20, offset: 3767},
label: "Qualifier",
expr: &ruleRefExpr{
pos: position{line: 160, col: 30, offset: 3768},
pos: position{line: 160, col: 30, offset: 3777},
name: "Qualifier",
},
},
&ruleRefExpr{
pos: position{line: 160, col: 40, offset: 3778},
pos: position{line: 160, col: 40, offset: 3787},
name: "_",
},
&labeledExpr{
pos: position{line: 160, col: 42, offset: 3780},
pos: position{line: 160, col: 42, offset: 3789},
label: "Constants",
expr: &ruleRefExpr{
pos: position{line: 160, col: 52, offset: 3790},
pos: position{line: 160, col: 52, offset: 3799},
name: "Constants",
},
},
......@@ -572,27 +579,27 @@ var g = &grammar{
},
{
name: "Generates",
pos: position{line: 168, col: 1, offset: 3920},
pos: position{line: 168, col: 1, offset: 3929},
expr: &actionExpr{
pos: position{line: 168, col: 14, offset: 3933},
pos: position{line: 168, col: 14, offset: 3942},
run: (*parser).callonGenerates1,
expr: &seqExpr{
pos: position{line: 168, col: 14, offset: 3933},
pos: position{line: 168, col: 14, offset: 3942},
exprs: []interface{}{
&litMatcher{
pos: position{line: 168, col: 14, offset: 3933},
pos: position{line: 168, col: 14, offset: 3942},
val: "generates",
ignoreCase: false,
},
&ruleRefExpr{
pos: position{line: 168, col: 26, offset: 3945},
pos: position{line: 168, col: 26, offset: 3954},
name: "_",
},
&labeledExpr{
pos: position{line: 168, col: 28, offset: 3947},
pos: position{line: 168, col: 28, offset: 3956},
label: "Constants",
expr: &ruleRefExpr{
pos: position{line: 168, col: 38, offset: 3957},
pos: position{line: 168, col: 38, offset: 3966},
name: "Constants",
},
},
......@@ -602,27 +609,27 @@ var g = &grammar{
},
{
name: "Leaks",
pos: position{line: 176, col: 1, offset: 4075},
pos: position{line: 176, col: 1, offset: 4084},
expr: &actionExpr{
pos: position{line: 176, col: 10, offset: 4084},
pos: position{line: 176, col: 10, offset: 4093},
run: (*parser).callonLeaks1,
expr: &seqExpr{
pos: position{line: 176, col: 10, offset: 4084},
pos: position{line: 176, col: 10, offset: 4093},
exprs: []interface{}{
&litMatcher{
pos: position{line: 176, col: 10, offset: 4084},
pos: position{line: 176, col: 10, offset: 4093},
val: "leaks",
ignoreCase: false,
},
&ruleRefExpr{
pos: position{line: 176, col: 18, offset: 4092},
pos: position{line: 176, col: 18, offset: 4101},
name: "_",
},
&labeledExpr{
pos: position{line: 176, col: 20, offset: 4094},
pos: position{line: 176, col: 20, offset: 4103},
label: "Constants",
expr: &ruleRefExpr{
pos: position{line: 176, col: 30, offset: 4104},
pos: position{line: 176, col: 30, offset: 4113},
name: "Constants",
},
},
......@@ -632,39 +639,39 @@ var g = &grammar{
},
{
name: "Assignment",
pos: position{line: 184, col: 1, offset: 4218},
pos: position{line: 184, col: 1, offset: 4227},
expr: &actionExpr{
pos: position{line: 184, col: 15, offset: 4232},
pos: position{line: 184, col: 15, offset: 4241},
run: (*parser).callonAssignment1,
expr: &seqExpr{
pos: position{line: 184, col: 15, offset: 4232},
pos: position{line: 184, col: 15, offset: 4241},
exprs: []interface{}{
&labeledExpr{
pos: position{line: 184, col: 15, offset: 4232},
pos: position{line: 184, col: 15, offset: 4241},
label: "Left",
expr: &ruleRefExpr{
pos: position{line: 184, col: 20, offset: 4237},
pos: position{line: 184, col: 20, offset: 4246},
name: "Constants",
},
},
&ruleRefExpr{
pos: position{line: 184, col: 30, offset: 4247},
pos: position{line: 184, col: 30, offset: 4256},
name: "_",
},
&litMatcher{
pos: position{line: 184, col: 32, offset: 4249},
pos: position{line: 184, col: 32, offset: 4258},
val: "=",
ignoreCase: false,
},
&ruleRefExpr{
pos: position{line: 184, col: 36, offset: 4253},
pos: position{line: 184, col: 36, offset: 4262},
name: "_",
},
&labeledExpr{
pos: position{line: 184, col: 38, offset: 4255},
pos: position{line: 184, col: 38, offset: 4264},
label: "Right",
expr: &ruleRefExpr{
pos: position{line: 184, col: 44, offset: 4261},
pos: position{line: 184, col: 44, offset: 4270},
name: "Value",
},
},
......@@ -674,37 +681,37 @@ var g = &grammar{
},
{
name: "Constant",
pos: position{line: 205, col: 1, offset: 4705},
pos: position{line: 205, col: 1, offset: 4714},
expr: &actionExpr{
pos: position{line: 205, col: 13, offset: 4717},
pos: position{line: 205, col: 13, offset: 4726},
run: (*parser).callonConstant1,
expr: &seqExpr{
pos: position{line: 205, col: 13, offset: 4717},
pos: position{line: 205, col: 13, offset: 4726},
exprs: []interface{}{
&labeledExpr{
pos: position{line: 205, col: 13, offset: 4717},
pos: position{line: 205, col: 13, offset: 4726},
label: "Const",
expr: &ruleRefExpr{
pos: position{line: 205, col: 19, offset: 4723},
pos: position{line: 205, col: 19, offset: 4732},
name: "Identifier",
},
},
&zeroOrOneExpr{
pos: position{line: 205, col: 30, offset: 4734},
pos: position{line: 205, col: 30, offset: 4743},
expr: &seqExpr{
pos: position{line: 205, col: 31, offset: 4735},
pos: position{line: 205, col: 31, offset: 4744},
exprs: []interface{}{
&ruleRefExpr{
pos: position{line: 205, col: 31, offset: 4735},
pos: position{line: 205, col: 31, offset: 4744},
name: "_",
},
&litMatcher{
pos: position{line: 205, col: 33, offset: 4737},
pos: position{line: 205, col: 33, offset: 4746},
val: ",",
ignoreCase: false,
},
&ruleRefExpr{
pos: position{line: 205, col: 37, offset: 4741},
pos: position{line: 205, col: 37, offset: 4750},
name: "_",
},
},
......@@ -716,17 +723,17 @@ var g = &grammar{
},
{
name: "Constants",
pos: position{line: 214, col: 1, offset: 4845},
pos: position{line: 214, col: 1, offset: 4854},
expr: &actionExpr{
pos: position{line: 214, col: 14, offset: 4858},
pos: position{line: 214, col: 14, offset: 4867},
run: (*parser).callonConstants1,
expr: &labeledExpr{
pos: position{line: 214, col: 14, offset: 4858},
pos: position{line: 214, col: 14, offset: 4867},
label: "Constants",
expr: &oneOrMoreExpr{
pos: position{line: 214, col: 24, offset: 4868},
pos: position{line: 214, col: 24, offset: 4877},
expr: &ruleRefExpr{
pos: position{line: 214, col: 24, offset: 4868},
pos: position{line: 214, col: 24, offset: 4877},
name: "Constant",
},
},
......@@ -735,38 +742,38 @@ var g = &grammar{
},
{
name: "Phase",
pos: position{line: 226, col: 1, offset: 5111},
pos: position{line: 226, col: 1, offset: 5120},
expr: &actionExpr{
pos: position{line: 226, col: 10, offset: 5120},
pos: position{line: 226, col: 10, offset: 5129},
run: (*parser).callonPhase1,
expr: &seqExpr{
pos: position{line: 226, col: 10, offset: 5120},
pos: position{line: 226, col: 10, offset: 5129},
exprs: []interface{}{
&litMatcher{
pos: position{line: 226, col: 10, offset: 5120},
pos: position{line: 226, col: 10, offset: 5129},
val: "phase",
ignoreCase: false,
},
&ruleRefExpr{
pos: position{line: 226, col: 18, offset: 5128},
pos: position{line: 226, col: 18, offset: 5137},
name: "_",
},
&litMatcher{
pos: position{line: 226, col: 20, offset: 5130},
pos: position{line: 226, col: 20, offset: 5139},
val: "[",
ignoreCase: false,
},
&ruleRefExpr{
pos: position{line: 226, col: 24, offset: 5134},
pos: position{line: 226, col: 24, offset: 5143},
name: "_",
},
&labeledExpr{
pos: position{line: 226, col: 26, offset: 5136},
pos: position{line: 226, col: 26, offset: 5145},
label: "Number",
expr: &oneOrMoreExpr{
pos: position{line: 226, col: 33, offset: 5143},
pos: position{line: 226, col: 33, offset: 5152},
expr: &charClassMatcher{
pos: position{line: 226, col: 33, offset: 5143},
pos: position{line: 226, col: 33, offset: 5152},
val: "[0-9]",
ranges: []rune{'0', '9'},
ignoreCase: false,
......@@ -775,16 +782,16 @@ var g = &grammar{
},
},
&ruleRefExpr{
pos: position{line: 226, col: 40, offset: 5150},
pos: position{line: 226, col: 40, offset: 5159},
name: "_",
},
&litMatcher{
pos: position{line: 226, col: 42, offset: 5152},
pos: position{line: 226, col: 42, offset: 5161},
val: "]",
ignoreCase: false,
},
&ruleRefExpr{
pos: position{line: 226, col: 46, offset: 5156},
pos: position{line: 226, col: 46, offset: 5165},
name: "_",
},
},
......@@ -793,47 +800,47 @@ var g = &grammar{
},
{
name: "GuardedConstant",
pos: position{line: 239, col: 1, offset: 5378},
pos: position{line: 239, col: 1, offset: 5387},
expr: &actionExpr{
pos: position{line: 239, col: 20, offset: 5397},
pos: position{line: 239, col: 20, offset: 5406},
run: (*parser).callonGuardedConstant1,
expr: &seqExpr{
pos: position{line: 239, col: 20, offset: 5397},
pos: position{line: 239, col: 20, offset: 5406},
exprs: []interface{}{
&litMatcher{
pos: position{line: 239, col: 20, offset: 5397},
pos: position{line: 239, col: 20, offset: 5406},
val: "[",
ignoreCase: false,
},
&labeledExpr{
pos: position{line: 239, col: 24, offset: 5401},
pos: position{line: 239, col: 24, offset: 5410},
label: "Guarded",
expr: &ruleRefExpr{
pos: position{line: 239, col: 32, offset: 5409},
pos: position{line: 239, col: 32, offset: 5418},