@tabnas/proto 0.4.7 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/aggregate.d.ts +3 -0
- package/dist/aggregate.js +149 -0
- package/dist/aggregate.js.map +1 -0
- package/dist/build-descriptor.d.ts +1 -0
- package/dist/build-descriptor.js +33 -8
- package/dist/build-descriptor.js.map +1 -1
- package/dist/grammar.d.ts +1 -1
- package/dist/grammar.js +71 -39
- package/dist/grammar.js.map +1 -1
- package/dist/proto.d.ts +1 -1
- package/dist/proto.js +23 -1
- package/dist/proto.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/aggregate.ts +137 -0
- package/src/build-descriptor.ts +34 -9
- package/src/grammar.ts +71 -39
- package/src/proto.ts +23 -1
package/README.md
CHANGED
|
@@ -72,8 +72,8 @@ written. See [doc/reference.md](doc/reference.md).
|
|
|
72
72
|
|
|
73
73
|
## Conformance
|
|
74
74
|
|
|
75
|
-
Checked against protoc
|
|
76
|
-
`parser_unittest.cc`): every one of the
|
|
75
|
+
Checked against protoc 36.2's own parser test corpus (extracted from
|
|
76
|
+
`parser_unittest.cc`): every one of the 78 in-scope `valid` cases and all
|
|
77
77
|
50 `accept-only` cases, run by `test/protobuf-conformance.test.ts`. The 11
|
|
78
78
|
excluded cases declare protoc-internal editions (`UNSTABLE`,
|
|
79
79
|
`99998_TEST_ONLY`) outside the proto2 / proto3 / 2023 / 2024 support this
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Copyright (c) 2026 Richard Rodger and other contributors, MIT License */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.aggregateText = aggregateText;
|
|
5
|
+
exports.recordAggregate = recordAggregate;
|
|
6
|
+
// An aggregate option value: `option (foo) = { a: 1 };`.
|
|
7
|
+
//
|
|
8
|
+
// protoc's parser does not read the text between the braces. It records
|
|
9
|
+
// that text as `UninterpretedOption.aggregate_value`, and the text-format
|
|
10
|
+
// parser reads it later, once the option's type is known. Since protobuf
|
|
11
|
+
// v36 the recorded text keeps its layout (`ParseUninterpretedBlock` in
|
|
12
|
+
// src/google/protobuf/compiler/parser.cc). protoc walks the tokens between
|
|
13
|
+
// the braces with whitespace and newlines reported as tokens of their own,
|
|
14
|
+
// and appends each token's text as written. Comments are not tokens, and
|
|
15
|
+
// text format does not read `//` or `/* */`, so before each token protoc
|
|
16
|
+
// pads out whatever lay between it and the token before it, the opening
|
|
17
|
+
// brace for the first:
|
|
18
|
+
//
|
|
19
|
+
// - a token that starts on a later line gets one newline per line crossed,
|
|
20
|
+
// then as many spaces as its column;
|
|
21
|
+
// - a token that starts further along the same line gets the difference
|
|
22
|
+
// in spaces.
|
|
23
|
+
//
|
|
24
|
+
// Whitespace is a token, so the only thing ever padded out is a run of
|
|
25
|
+
// comments. A comment within one line becomes spaces of its width. A
|
|
26
|
+
// block comment that crosses lines, or a line comment, which protoc ends
|
|
27
|
+
// AFTER its newline, becomes its newlines followed by spaces up to the
|
|
28
|
+
// column where it ends. protoc stops at the closing brace before padding
|
|
29
|
+
// for it, so a comment directly ahead of that brace leaves nothing.
|
|
30
|
+
//
|
|
31
|
+
// Columns are counted as protoc's tokenizer counts them: a tab moves to
|
|
32
|
+
// the next multiple of 8, and every other byte of UTF-8 is one column.
|
|
33
|
+
const TAB = 8;
|
|
34
|
+
// The text protoc 36 records for the aggregate whose braces are at
|
|
35
|
+
// `src[open]` and `src[close]`.
|
|
36
|
+
function aggregateText(src, open, close) {
|
|
37
|
+
let line = 0;
|
|
38
|
+
let col = 0;
|
|
39
|
+
// Move past `src[i]`, keeping `line` and `col` protoc's way. Returns the
|
|
40
|
+
// index after it: a surrogate pair is one character and four bytes.
|
|
41
|
+
const step = (i) => {
|
|
42
|
+
const c = src.charCodeAt(i);
|
|
43
|
+
if (10 === c) {
|
|
44
|
+
line++;
|
|
45
|
+
col = 0;
|
|
46
|
+
}
|
|
47
|
+
else if (9 === c) {
|
|
48
|
+
col += TAB - (col % TAB);
|
|
49
|
+
}
|
|
50
|
+
else if (c < 0x80) {
|
|
51
|
+
col += 1;
|
|
52
|
+
}
|
|
53
|
+
else if (c < 0x800) {
|
|
54
|
+
col += 2;
|
|
55
|
+
}
|
|
56
|
+
else if (0xd800 <= c && c < 0xdc00 && i + 1 < src.length) {
|
|
57
|
+
const d = src.charCodeAt(i + 1);
|
|
58
|
+
if (0xdc00 <= d && d < 0xe000) {
|
|
59
|
+
col += 4;
|
|
60
|
+
return i + 2;
|
|
61
|
+
}
|
|
62
|
+
col += 3;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
col += 3;
|
|
66
|
+
}
|
|
67
|
+
return i + 1;
|
|
68
|
+
};
|
|
69
|
+
// The column after the opening brace depends on everything ahead of it
|
|
70
|
+
// on its line, because that decides where a later tab stops.
|
|
71
|
+
for (let i = src.lastIndexOf('\n', open) + 1; i <= open;)
|
|
72
|
+
i = step(i);
|
|
73
|
+
line = 0;
|
|
74
|
+
const isCommentStart = (i) => '/' === src[i] && ('/' === src[i + 1] || '*' === src[i + 1]);
|
|
75
|
+
let out = '';
|
|
76
|
+
let from = open + 1;
|
|
77
|
+
let i = from;
|
|
78
|
+
while (i < close) {
|
|
79
|
+
const c = src[i];
|
|
80
|
+
if (isCommentStart(i)) {
|
|
81
|
+
out += src.slice(from, i);
|
|
82
|
+
const gapLine = line;
|
|
83
|
+
const gapCol = col;
|
|
84
|
+
// Comments with nothing between them form one gap: protoc pads from
|
|
85
|
+
// the token before the first to the token after the last.
|
|
86
|
+
while (i < close && isCommentStart(i)) {
|
|
87
|
+
if ('/' === src[i + 1]) {
|
|
88
|
+
while (i < close && '\n' !== src[i])
|
|
89
|
+
i = step(i);
|
|
90
|
+
if (i < close)
|
|
91
|
+
i = step(i);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
i = step(step(i));
|
|
95
|
+
while (i < close && !('*' === src[i] && '/' === src[i + 1]))
|
|
96
|
+
i = step(i);
|
|
97
|
+
if (i < close)
|
|
98
|
+
i = step(step(i));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
from = i;
|
|
102
|
+
if (close <= i)
|
|
103
|
+
break;
|
|
104
|
+
if (gapLine < line)
|
|
105
|
+
out += '\n'.repeat(line - gapLine) + ' '.repeat(col);
|
|
106
|
+
else if (gapCol < col)
|
|
107
|
+
out += ' '.repeat(col - gapCol);
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if ('"' === c || "'" === c) {
|
|
111
|
+
// A string's text is copied as written; a `//` inside one is not a
|
|
112
|
+
// comment. protoc ends an unterminated string at the newline.
|
|
113
|
+
i = step(i);
|
|
114
|
+
while (i < close && c !== src[i] && '\n' !== src[i]) {
|
|
115
|
+
if ('\\' === src[i] && i + 1 < close && '\n' !== src[i + 1])
|
|
116
|
+
i = step(i);
|
|
117
|
+
i = step(i);
|
|
118
|
+
}
|
|
119
|
+
if (i < close && c === src[i])
|
|
120
|
+
i = step(i);
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
i = step(i);
|
|
124
|
+
}
|
|
125
|
+
return out + src.slice(from, close);
|
|
126
|
+
}
|
|
127
|
+
// After-close action for the grammar's `constant` rule, which the `Proto`
|
|
128
|
+
// plugin installs: on an aggregate value's CST node it sets `aggregate` to
|
|
129
|
+
// the text protoc records, read from the source between the value's
|
|
130
|
+
// braces. The node's `src` stays the tokens run together, as on every
|
|
131
|
+
// node. The opening brace is the rule's first token (`o0`) and the closing
|
|
132
|
+
// brace the last token consumed (`v1`); a node where either is not a brace
|
|
133
|
+
// is left without `aggregate`.
|
|
134
|
+
function recordAggregate(rule, ctx) {
|
|
135
|
+
const node = rule?.node;
|
|
136
|
+
if (!node || 'constant' !== node.rule)
|
|
137
|
+
return;
|
|
138
|
+
if ('string' !== typeof node.src || '{' !== node.src[0])
|
|
139
|
+
return;
|
|
140
|
+
const src = ctx.src();
|
|
141
|
+
const open = rule.o0?.sI;
|
|
142
|
+
const close = ctx.v1?.sI;
|
|
143
|
+
if (!(0 <= open && open < close && close < src.length))
|
|
144
|
+
return;
|
|
145
|
+
if ('{' !== src[open] || '}' !== src[close])
|
|
146
|
+
return;
|
|
147
|
+
node.aggregate = aggregateText(src, open, close);
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=aggregate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregate.js","sourceRoot":"","sources":["../src/aggregate.ts"],"names":[],"mappings":";AAAA,2EAA2E;;QAwIlE,aAAa;QAAE,eAAe;AAtIvC,yDAAyD;AACzD,EAAE;AACF,wEAAwE;AACxE,0EAA0E;AAC1E,yEAAyE;AACzE,uEAAuE;AACvE,2EAA2E;AAC3E,2EAA2E;AAC3E,yEAAyE;AACzE,yEAAyE;AACzE,wEAAwE;AACxE,uBAAuB;AACvB,EAAE;AACF,2EAA2E;AAC3E,uCAAuC;AACvC,wEAAwE;AACxE,eAAe;AACf,EAAE;AACF,uEAAuE;AACvE,qEAAqE;AACrE,yEAAyE;AACzE,uEAAuE;AACvE,yEAAyE;AACzE,oEAAoE;AACpE,EAAE;AACF,wEAAwE;AACxE,uEAAuE;AAEvE,MAAM,GAAG,GAAG,CAAC,CAAA;AAEb,mEAAmE;AACnE,gCAAgC;AAChC,SAAS,aAAa,CAAC,GAAW,EAAE,IAAY,EAAE,KAAa;IAC7D,IAAI,IAAI,GAAG,CAAC,CAAA;IACZ,IAAI,GAAG,GAAG,CAAC,CAAA;IAEX,yEAAyE;IACzE,oEAAoE;IACpE,MAAM,IAAI,GAAG,CAAC,CAAS,EAAU,EAAE;QACjC,MAAM,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;QAC3B,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;YACb,IAAI,EAAE,CAAA;YACN,GAAG,GAAG,CAAC,CAAA;QACT,CAAC;a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AAS,EAAE,GAAQ;IAC1C,MAAM,IAAI,GAA8B,IAAI,EAAE,IAAI,CAAA;IAClD,IAAI,CAAC,IAAI,IAAI,UAAU,KAAK,IAAI,CAAC,IAAI;QAAE,OAAM;IAC7C,IAAI,QAAQ,KAAK,OAAO,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAAE,OAAM;IAC/D,MAAM,GAAG,GAAW,GAAG,CAAC,GAAG,EAAE,CAAA;IAC7B,MAAM,IAAI,GAAW,IAAI,CAAC,EAAE,EAAE,EAAE,CAAA;IAChC,MAAM,KAAK,GAAW,GAAG,CAAC,EAAE,EAAE,EAAE,CAAA;IAChC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,IAAI,IAAI,GAAG,KAAK,IAAI,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC;QAAE,OAAM;IAC9D,IAAI,GAAG,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC;QAAE,OAAM;IACnD,IAAI,CAAC,SAAS,GAAG,aAAa,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;AAClD,CAAC"}
|
package/dist/build-descriptor.js
CHANGED
|
@@ -87,6 +87,10 @@ function unquote(s) {
|
|
|
87
87
|
}
|
|
88
88
|
// ---- constants / option values -------------------------------------------
|
|
89
89
|
function constantValue(n) {
|
|
90
|
+
// An aggregate (`{ a: 1 }`) is the text between its braces, as protoc
|
|
91
|
+
// records it in `aggregate_value`.
|
|
92
|
+
if ('string' === typeof n.aggregate)
|
|
93
|
+
return n.aggregate;
|
|
90
94
|
const s = n.src;
|
|
91
95
|
if ('true' === s)
|
|
92
96
|
return true;
|
|
@@ -552,6 +556,24 @@ function buildService(n) {
|
|
|
552
556
|
}
|
|
553
557
|
return svc;
|
|
554
558
|
}
|
|
559
|
+
// The contents of the first two parenthesised spans of a statement's
|
|
560
|
+
// text. No identifier or type holds a parenthesis, so for an rpc these
|
|
561
|
+
// are its input and its output, whatever the names in them are spelled.
|
|
562
|
+
function parenthesised(src) {
|
|
563
|
+
const out = [];
|
|
564
|
+
let at = 0;
|
|
565
|
+
while (out.length < 2) {
|
|
566
|
+
const open = src.indexOf('(', at);
|
|
567
|
+
if (open < 0)
|
|
568
|
+
break;
|
|
569
|
+
const close = src.indexOf(')', open + 1);
|
|
570
|
+
if (close < 0)
|
|
571
|
+
break;
|
|
572
|
+
out.push(src.slice(open + 1, close));
|
|
573
|
+
at = close + 1;
|
|
574
|
+
}
|
|
575
|
+
return out;
|
|
576
|
+
}
|
|
555
577
|
// rpc ident "(" ["stream"] messageType ")" "returns" "(" ["stream"] messageType ")"
|
|
556
578
|
function buildRpc(el) {
|
|
557
579
|
const ids = R(el).filter((k) => k.rule === 'ident');
|
|
@@ -561,15 +583,18 @@ function buildRpc(el) {
|
|
|
561
583
|
inputType: types[0] ? types[0].src : '',
|
|
562
584
|
outputType: types[1] ? types[1].src : '',
|
|
563
585
|
};
|
|
564
|
-
// `stream` is a bare terminal, so it never becomes a node
|
|
565
|
-
//
|
|
566
|
-
//
|
|
567
|
-
//
|
|
568
|
-
//
|
|
569
|
-
|
|
570
|
-
|
|
586
|
+
// `stream` is a bare terminal, so it never becomes a node, and the name
|
|
587
|
+
// and both types are identifiers that may themselves be spelled
|
|
588
|
+
// `stream` (`rpc stream (stream stream)`), so no search for a child's
|
|
589
|
+
// text can say which copy is the modifier. The parentheses can: a name
|
|
590
|
+
// or a type never holds one, so the first two parenthesised spans are
|
|
591
|
+
// the input and the output, each the type's own text with or without
|
|
592
|
+
// `stream` ahead of it. A type that merely begins with those letters
|
|
593
|
+
// (`rpc M (streaming.Request)`) is its own text, and is not streaming.
|
|
594
|
+
const [input, output] = parenthesised(el.src);
|
|
595
|
+
if ('stream' + m.inputType === input)
|
|
571
596
|
m.clientStreaming = true;
|
|
572
|
-
if (
|
|
597
|
+
if ('stream' + m.outputType === output)
|
|
573
598
|
m.serverStreaming = true;
|
|
574
599
|
for (const o of R(el).filter((k) => k.rule === 'optionStmt')) {
|
|
575
600
|
m.options = { ...(m.options || {}), ...optionFrom(o) };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-descriptor.js","sourceRoot":"","sources":["../src/build-descriptor.ts"],"names":[],"mappings":";AAAA,2EAA2E;;;AAE3E,0EAA0E;AAC1E,wEAAwE;AACxE,wEAAwE;AACxE,yEAAyE;AACzE,2EAA2E;AAC3E,qEAAqE;AAErE,6CAMqB;AACrB,qDAA0D;AAI1D,0EAA0E;AAC1E,yEAAyE;AACzE,8DAA8D;AAC9D,SAAS,CAAC,CAAC,CAA0B;IACnC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAA;AACzD,CAAC;AAED,uEAAuE;AACvE,0EAA0E;AAC1E,0EAA0E;AAC1E,EAAE;AACF,wEAAwE;AACxE,wEAAwE;AACxE,sEAAsE;AACtE,gEAAgE;AAChE,oEAAoE;AACpE,iCAAiC;AACjC,SAAS,EAAE,CAAC,CAAO;IACjB,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;IACd,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM;QAAE,OAAO,CAAC,CAAC,GAAG,CAAA;IAChC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAA;IAC9B,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AACnB,CAAC;AAED,SAAS,KAAK,CAAC,CAAO,EAAE,IAAY;IAClC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAA;A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AM,IAAI,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YAClC,SAAS,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;QACzC,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC"}
|
package/dist/grammar.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const grammarText = "\n; ===== common.abnf =====\n; @tabnas/proto \u2014 Protocol Buffers .proto IDL, common (union base).\n; Structure only; lexical atoms are the engine's whole-word tokens:\n; TX = identifier NR = number ST = string VL = true/false/null\n; Whitespace and // and /* */ comments are ignored by the lexer.\n; The grammar is a permissive superset of proto2 / proto3 / editions;\n; version-specific legality is enforced in the descriptor walk.\n\nproto = [ syntaxOrEdition ] *topLevelDef\n\nsyntaxOrEdition = \"syntax\" \"=\" strLit \";\"\n\ntopLevelDef = importStmt / packageStmt / optionStmt / message / enumDef\n / service / extendStmt / emptyStmt\n\nimportStmt = \"import\" [ \"weak\" / \"public\" ] strLit \";\"\npackageStmt = \"package\" fullIdent \";\"\n\noptionStmt = \"option\" optionName \"=\" constant \";\"\noptionName = optionNamePart *( \".\" optionNamePart )\noptionNamePart = ident / \"(\" [ \".\" ] fullIdent \")\"\n\nmessage = \"message\" ident messageBody\nmessageBody = \"{\" *messageElement \"}\"\
|
|
1
|
+
export declare const grammarText = "\n; ===== common.abnf =====\n; @tabnas/proto \u2014 Protocol Buffers .proto IDL, common (union base).\n; Structure only; lexical atoms are the engine's whole-word tokens:\n; TX = identifier NR = number ST = string VL = true/false/null\n; Whitespace and // and /* */ comments are ignored by the lexer.\n; The grammar is a permissive superset of proto2 / proto3 / editions;\n; version-specific legality is enforced in the descriptor walk.\n;\n; Keywords are written %s\"...\" (RFC 7405, case-sensitive): protoc's\n; keywords are lower-case, so `Message`, `Edition` and `MAX` are\n; identifiers. Every keyword is also admitted as an identifier by\n; `ident`, as protoc's ConsumeIdentifier admits it: a field named\n; `message`, an enum value `max`, an rpc `stream`, a package segment\n; `option`. Where a statement list can begin with either a keyword or an\n; identifier, the keyword-headed alternatives come first and the\n; identifier-headed one last, which is protoc's LookingAt order; the\n; compiler's lookahead separates the rest (`message message = 1;` is a\n; field of type `message` once the third token is seen).\n\nproto = [ syntaxOrEdition ] *topLevelDef\n\nsyntaxOrEdition = %s\"syntax\" \"=\" strLit \";\"\n\ntopLevelDef = importStmt / packageStmt / optionStmt / message / enumDef\n / service / extendStmt / emptyStmt\n\nimportStmt = %s\"import\" [ %s\"weak\" / %s\"public\" ] strLit \";\"\npackageStmt = %s\"package\" fullIdent \";\"\n\noptionStmt = %s\"option\" optionName \"=\" constant \";\"\noptionName = optionNamePart *( \".\" optionNamePart )\noptionNamePart = ident / \"(\" [ \".\" ] fullIdent \")\"\n\nmessage = %s\"message\" ident messageBody\nmessageBody = \"{\" *messageElement \"}\"\n; Keyword-headed statements first, `field` last: a field's type is an\n; identifier, and an identifier may be any keyword.\nmessageElement = enumDef / message / optionStmt / oneof / mapField\n / extendStmt / extensions / reserved / emptyStmt\n / symbolVisibility message / symbolVisibility enumDef\n / groupField / field\n\nfield = [ label ] fieldType ident \"=\" fieldNumber [ fieldOptions ] \";\"\nlabel = %s\"required\" / %s\"optional\" / %s\"repeated\"\nfieldType = messageType\nfieldNumber = NR\nfieldOptions = \"[\" fieldOption *( \",\" fieldOption ) \"]\"\nfieldOption = optionName \"=\" constant\n\noneof = %s\"oneof\" ident \"{\" *oneofElement \"}\"\noneofElement = optionStmt / emptyStmt / groupField / oneofField\noneofField = fieldType ident \"=\" fieldNumber [ fieldOptions ] \";\"\n\nmapField = %s\"map\" \"<\" fieldType \",\" fieldType \">\" ident \"=\" fieldNumber\n [ fieldOptions ] \";\"\n\nenumDef = %s\"enum\" ident \"{\" *enumElement \"}\"\nenumElement = optionStmt / reserved / emptyStmt / enumField\nenumField = ident \"=\" [ \"-\" ] fieldNumber [ fieldOptions ] \";\"\n\nservice = %s\"service\" ident \"{\" *serviceElement \"}\"\nserviceElement = optionStmt / emptyStmt / rpc\nrpc = %s\"rpc\" ident \"(\" [ %s\"stream\" ] messageType \")\"\n %s\"returns\" \"(\" [ %s\"stream\" ] messageType \")\"\n ( \";\" / \"{\" *( optionStmt / emptyStmt ) \"}\" )\n\nextendStmt = %s\"extend\" messageType \"{\" *( field / emptyStmt ) \"}\"\nextensions = %s\"extensions\" ranges [ fieldOptions ] \";\"\nreserved = %s\"reserved\" ( ranges / fieldNames ) \";\"\nranges = range *( \",\" range )\n; Enum reserved ranges may be negative, so a range bound is signed.\nrange = [ \"-\" ] NR [ %s\"to\" ( [ \"-\" ] NR / %s\"max\" ) ]\n; Reserved names are string literals in proto2/proto3 and bare identifiers\n; from edition 2023 on; the union accepts either (and a mix).\nfieldNames = reservedName *( \",\" reservedName )\nreservedName = strLit / ident\n\nconstant = boolLit / fullIdent / signedNumber / signedIdent / strLit\n / messageValue\nsignedNumber = [ \"-\" / \"+\" ] NR\n; `-inf` / `-nan`: a negated identifier constant. Tried after signedNumber\n; so `-33` still lexes as a number.\nsignedIdent = \"-\" fullIdent\nboolLit = VL\nmessageValue = \"{\" *messageValueEntry \"}\"\n; Text format writes a string value as one or more adjacent literals and\n; concatenates them: `a: \"foo\" \"bar\"`. The first alternative takes two or\n; more, so a single literal is a `constant`, as any other value is.\nmessageValueEntry = ident [ \":\" ] ( strLit 1*strLit / constant ) [ \",\" / \";\" ]\n\nmessageType = [ \".\" ] fullIdent\nfullIdent = ident *( \".\" ident )\n; An identifier is a TX token, a value word (`true`, `false` and `null`\n; lex as VL) or any keyword: protoc's tokenizer has one identifier class.\n; The grammar is compiled with `tokenClasses`, so this rule is one engine\n; token set and a lookahead position peeks it as one token.\nident = TX / VL / %s\"syntax\" / %s\"edition\" / %s\"import\" / %s\"weak\"\n / %s\"public\" / %s\"package\" / %s\"option\" / %s\"message\"\n / %s\"enum\" / %s\"service\" / %s\"extend\" / %s\"required\"\n / %s\"optional\" / %s\"repeated\" / %s\"oneof\" / %s\"map\"\n / %s\"extensions\" / %s\"reserved\" / %s\"to\" / %s\"max\"\n / %s\"rpc\" / %s\"returns\" / %s\"stream\" / %s\"group\"\n / %s\"export\" / %s\"local\"\nstrLit = ST\nemptyStmt = \";\"\n\n; A group is proto2's (and a legal oneof member: `oneof foo { group D = 4\n; {\u2026} }`); the descriptor walk enforces the version. It lives here rather\n; than in proto2.abnf because messageElement and oneofElement order it\n; ahead of `field`, and a rule added by `=/` is appended after it.\ngroupField = [ label ] %s\"group\" ident \"=\" fieldNumber messageBody\n; Edition 2024's visibility modifier ahead of a message or enum, here for\n; the same reason. `export` and `local` stay ordinary identifiers\n; everywhere else (`local.pkg.SomeMessage`), as every keyword does.\nsymbolVisibility = %s\"export\" / %s\"local\"\n\n; ===== proto2.abnf =====\n; proto2 deltas: groups are proto2-only (deprecated). The `groupField`\n; rule lives in common.abnf, ordered ahead of `field` in messageElement\n; and oneofElement. Labels (required/optional/repeated), extend, and\n; extensions live in common too (the permissive union); the descriptor\n; walk enforces what each version actually allows.\n\n; ===== proto3.abnf =====\n; proto3 deltas: none. proto3's surface syntax is the common base\n; (implicit label via the optional [ label ], plus the \"optional\" keyword).\n; Version legality (no required, no group) is enforced in the walk.\n\n; ===== edition-2023.abnf =====\n; edition 2023 deltas: the file may open with an `edition = \"2023\";`\n; declaration instead of `syntax = ...`.\nsyntaxOrEdition =/ editionDecl\neditionDecl = %s\"edition\" \"=\" strLit \";\"\n\n; ===== edition-2024.abnf =====\n; edition 2024 deltas: `import option \"...\";` and symbol visibility\n; (export / local) on message and enum declarations. `symbolVisibility`\n; and its messageElement alternatives live in common.abnf, ordered ahead\n; of `field`. `export` and `local` are identifiers everywhere else, as\n; every keyword is (`local.pkg.SomeMessage`), so fullIdent needs nothing.\nimportStmt =/ %s\"import\" %s\"option\" strLit \";\"\ntopLevelDef =/ symbolVisibility message / symbolVisibility enumDef\n";
|
package/dist/grammar.js
CHANGED
|
@@ -12,56 +12,71 @@ exports.grammarText = `
|
|
|
12
12
|
; Whitespace and // and /* */ comments are ignored by the lexer.
|
|
13
13
|
; The grammar is a permissive superset of proto2 / proto3 / editions;
|
|
14
14
|
; version-specific legality is enforced in the descriptor walk.
|
|
15
|
+
;
|
|
16
|
+
; Keywords are written %s"..." (RFC 7405, case-sensitive): protoc's
|
|
17
|
+
; keywords are lower-case, so \`Message\`, \`Edition\` and \`MAX\` are
|
|
18
|
+
; identifiers. Every keyword is also admitted as an identifier by
|
|
19
|
+
; \`ident\`, as protoc's ConsumeIdentifier admits it: a field named
|
|
20
|
+
; \`message\`, an enum value \`max\`, an rpc \`stream\`, a package segment
|
|
21
|
+
; \`option\`. Where a statement list can begin with either a keyword or an
|
|
22
|
+
; identifier, the keyword-headed alternatives come first and the
|
|
23
|
+
; identifier-headed one last, which is protoc's LookingAt order; the
|
|
24
|
+
; compiler's lookahead separates the rest (\`message message = 1;\` is a
|
|
25
|
+
; field of type \`message\` once the third token is seen).
|
|
15
26
|
|
|
16
27
|
proto = [ syntaxOrEdition ] *topLevelDef
|
|
17
28
|
|
|
18
|
-
syntaxOrEdition = "syntax" "=" strLit ";"
|
|
29
|
+
syntaxOrEdition = %s"syntax" "=" strLit ";"
|
|
19
30
|
|
|
20
31
|
topLevelDef = importStmt / packageStmt / optionStmt / message / enumDef
|
|
21
32
|
/ service / extendStmt / emptyStmt
|
|
22
33
|
|
|
23
|
-
importStmt = "import" [ "weak" / "public" ] strLit ";"
|
|
24
|
-
packageStmt = "package" fullIdent ";"
|
|
34
|
+
importStmt = %s"import" [ %s"weak" / %s"public" ] strLit ";"
|
|
35
|
+
packageStmt = %s"package" fullIdent ";"
|
|
25
36
|
|
|
26
|
-
optionStmt = "option" optionName "=" constant ";"
|
|
37
|
+
optionStmt = %s"option" optionName "=" constant ";"
|
|
27
38
|
optionName = optionNamePart *( "." optionNamePart )
|
|
28
39
|
optionNamePart = ident / "(" [ "." ] fullIdent ")"
|
|
29
40
|
|
|
30
|
-
message = "message" ident messageBody
|
|
41
|
+
message = %s"message" ident messageBody
|
|
31
42
|
messageBody = "{" *messageElement "}"
|
|
32
|
-
|
|
43
|
+
; Keyword-headed statements first, \`field\` last: a field's type is an
|
|
44
|
+
; identifier, and an identifier may be any keyword.
|
|
45
|
+
messageElement = enumDef / message / optionStmt / oneof / mapField
|
|
33
46
|
/ extendStmt / extensions / reserved / emptyStmt
|
|
47
|
+
/ symbolVisibility message / symbolVisibility enumDef
|
|
48
|
+
/ groupField / field
|
|
34
49
|
|
|
35
50
|
field = [ label ] fieldType ident "=" fieldNumber [ fieldOptions ] ";"
|
|
36
|
-
label = "required" / "optional" / "repeated"
|
|
51
|
+
label = %s"required" / %s"optional" / %s"repeated"
|
|
37
52
|
fieldType = messageType
|
|
38
53
|
fieldNumber = NR
|
|
39
54
|
fieldOptions = "[" fieldOption *( "," fieldOption ) "]"
|
|
40
55
|
fieldOption = optionName "=" constant
|
|
41
56
|
|
|
42
|
-
oneof = "oneof" ident "{" *oneofElement "}"
|
|
43
|
-
oneofElement = optionStmt /
|
|
57
|
+
oneof = %s"oneof" ident "{" *oneofElement "}"
|
|
58
|
+
oneofElement = optionStmt / emptyStmt / groupField / oneofField
|
|
44
59
|
oneofField = fieldType ident "=" fieldNumber [ fieldOptions ] ";"
|
|
45
60
|
|
|
46
|
-
mapField = "map" "<" fieldType "," fieldType ">" ident "=" fieldNumber
|
|
61
|
+
mapField = %s"map" "<" fieldType "," fieldType ">" ident "=" fieldNumber
|
|
47
62
|
[ fieldOptions ] ";"
|
|
48
63
|
|
|
49
|
-
enumDef = "enum" ident "{" *enumElement "}"
|
|
50
|
-
enumElement = optionStmt /
|
|
64
|
+
enumDef = %s"enum" ident "{" *enumElement "}"
|
|
65
|
+
enumElement = optionStmt / reserved / emptyStmt / enumField
|
|
51
66
|
enumField = ident "=" [ "-" ] fieldNumber [ fieldOptions ] ";"
|
|
52
67
|
|
|
53
|
-
service = "service" ident "{" *serviceElement "}"
|
|
54
|
-
serviceElement = optionStmt /
|
|
55
|
-
rpc = "rpc" ident "(" [ "stream" ] messageType ")"
|
|
56
|
-
"returns" "(" [ "stream" ] messageType ")"
|
|
68
|
+
service = %s"service" ident "{" *serviceElement "}"
|
|
69
|
+
serviceElement = optionStmt / emptyStmt / rpc
|
|
70
|
+
rpc = %s"rpc" ident "(" [ %s"stream" ] messageType ")"
|
|
71
|
+
%s"returns" "(" [ %s"stream" ] messageType ")"
|
|
57
72
|
( ";" / "{" *( optionStmt / emptyStmt ) "}" )
|
|
58
73
|
|
|
59
|
-
extendStmt = "extend" messageType "{" *( field / emptyStmt ) "}"
|
|
60
|
-
extensions = "extensions" ranges [ fieldOptions ] ";"
|
|
61
|
-
reserved = "reserved" ( ranges / fieldNames ) ";"
|
|
74
|
+
extendStmt = %s"extend" messageType "{" *( field / emptyStmt ) "}"
|
|
75
|
+
extensions = %s"extensions" ranges [ fieldOptions ] ";"
|
|
76
|
+
reserved = %s"reserved" ( ranges / fieldNames ) ";"
|
|
62
77
|
ranges = range *( "," range )
|
|
63
78
|
; Enum reserved ranges may be negative, so a range bound is signed.
|
|
64
|
-
range = [ "-" ] NR [ "to" ( [ "-" ] NR / "max" ) ]
|
|
79
|
+
range = [ "-" ] NR [ %s"to" ( [ "-" ] NR / %s"max" ) ]
|
|
65
80
|
; Reserved names are string literals in proto2/proto3 and bare identifiers
|
|
66
81
|
; from edition 2023 on; the union accepts either (and a mix).
|
|
67
82
|
fieldNames = reservedName *( "," reservedName )
|
|
@@ -75,22 +90,43 @@ signedNumber = [ "-" / "+" ] NR
|
|
|
75
90
|
signedIdent = "-" fullIdent
|
|
76
91
|
boolLit = VL
|
|
77
92
|
messageValue = "{" *messageValueEntry "}"
|
|
78
|
-
|
|
93
|
+
; Text format writes a string value as one or more adjacent literals and
|
|
94
|
+
; concatenates them: \`a: "foo" "bar"\`. The first alternative takes two or
|
|
95
|
+
; more, so a single literal is a \`constant\`, as any other value is.
|
|
96
|
+
messageValueEntry = ident [ ":" ] ( strLit 1*strLit / constant ) [ "," / ";" ]
|
|
79
97
|
|
|
80
98
|
messageType = [ "." ] fullIdent
|
|
81
99
|
fullIdent = ident *( "." ident )
|
|
82
|
-
|
|
100
|
+
; An identifier is a TX token, a value word (\`true\`, \`false\` and \`null\`
|
|
101
|
+
; lex as VL) or any keyword: protoc's tokenizer has one identifier class.
|
|
102
|
+
; The grammar is compiled with \`tokenClasses\`, so this rule is one engine
|
|
103
|
+
; token set and a lookahead position peeks it as one token.
|
|
104
|
+
ident = TX / VL / %s"syntax" / %s"edition" / %s"import" / %s"weak"
|
|
105
|
+
/ %s"public" / %s"package" / %s"option" / %s"message"
|
|
106
|
+
/ %s"enum" / %s"service" / %s"extend" / %s"required"
|
|
107
|
+
/ %s"optional" / %s"repeated" / %s"oneof" / %s"map"
|
|
108
|
+
/ %s"extensions" / %s"reserved" / %s"to" / %s"max"
|
|
109
|
+
/ %s"rpc" / %s"returns" / %s"stream" / %s"group"
|
|
110
|
+
/ %s"export" / %s"local"
|
|
83
111
|
strLit = ST
|
|
84
112
|
emptyStmt = ";"
|
|
85
113
|
|
|
114
|
+
; A group is proto2's (and a legal oneof member: \`oneof foo { group D = 4
|
|
115
|
+
; {…} }\`); the descriptor walk enforces the version. It lives here rather
|
|
116
|
+
; than in proto2.abnf because messageElement and oneofElement order it
|
|
117
|
+
; ahead of \`field\`, and a rule added by \`=/\` is appended after it.
|
|
118
|
+
groupField = [ label ] %s"group" ident "=" fieldNumber messageBody
|
|
119
|
+
; Edition 2024's visibility modifier ahead of a message or enum, here for
|
|
120
|
+
; the same reason. \`export\` and \`local\` stay ordinary identifiers
|
|
121
|
+
; everywhere else (\`local.pkg.SomeMessage\`), as every keyword does.
|
|
122
|
+
symbolVisibility = %s"export" / %s"local"
|
|
123
|
+
|
|
86
124
|
; ===== proto2.abnf =====
|
|
87
|
-
; proto2 deltas: groups are proto2-only (deprecated).
|
|
88
|
-
;
|
|
89
|
-
;
|
|
90
|
-
|
|
91
|
-
;
|
|
92
|
-
oneofElement =/ groupField
|
|
93
|
-
groupField = [ label ] "group" ident "=" fieldNumber messageBody
|
|
125
|
+
; proto2 deltas: groups are proto2-only (deprecated). The \`groupField\`
|
|
126
|
+
; rule lives in common.abnf, ordered ahead of \`field\` in messageElement
|
|
127
|
+
; and oneofElement. Labels (required/optional/repeated), extend, and
|
|
128
|
+
; extensions live in common too (the permissive union); the descriptor
|
|
129
|
+
; walk enforces what each version actually allows.
|
|
94
130
|
|
|
95
131
|
; ===== proto3.abnf =====
|
|
96
132
|
; proto3 deltas: none. proto3's surface syntax is the common base
|
|
@@ -101,19 +137,15 @@ groupField = [ label ] "group" ident "=" fieldNumber messageBody
|
|
|
101
137
|
; edition 2023 deltas: the file may open with an \`edition = "2023";\`
|
|
102
138
|
; declaration instead of \`syntax = ...\`.
|
|
103
139
|
syntaxOrEdition =/ editionDecl
|
|
104
|
-
editionDecl = "edition" "=" strLit ";"
|
|
140
|
+
editionDecl = %s"edition" "=" strLit ";"
|
|
105
141
|
|
|
106
142
|
; ===== edition-2024.abnf =====
|
|
107
143
|
; edition 2024 deltas: \`import option "...";\` and symbol visibility
|
|
108
|
-
; (export / local) on message and enum declarations.
|
|
109
|
-
|
|
144
|
+
; (export / local) on message and enum declarations. \`symbolVisibility\`
|
|
145
|
+
; and its messageElement alternatives live in common.abnf, ordered ahead
|
|
146
|
+
; of \`field\`. \`export\` and \`local\` are identifiers everywhere else, as
|
|
147
|
+
; every keyword is (\`local.pkg.SomeMessage\`), so fullIdent needs nothing.
|
|
148
|
+
importStmt =/ %s"import" %s"option" strLit ";"
|
|
110
149
|
topLevelDef =/ symbolVisibility message / symbolVisibility enumDef
|
|
111
|
-
messageElement =/ symbolVisibility message / symbolVisibility enumDef
|
|
112
|
-
symbolVisibility = "export" / "local"
|
|
113
|
-
; \`export\` and \`local\` are contextual: they are only visibility modifiers
|
|
114
|
-
; ahead of \`message\`/\`enum\`, and stay usable as ordinary name components
|
|
115
|
-
; (\`local.pkg.SomeMessage\`). The union grammar lexes them as keywords, so
|
|
116
|
-
; give fullIdent an alternative that may open with one.
|
|
117
|
-
fullIdent =/ symbolVisibility *( "." ident )
|
|
118
150
|
`;
|
|
119
151
|
//# sourceMappingURL=grammar.js.map
|
package/dist/grammar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grammar.js","sourceRoot":"","sources":["../src/grammar.ts"],"names":[],"mappings":";AAAA,2EAA2E;;;AAE3E,yEAAyE;AACzE,qDAAqD;AAExC,QAAA,WAAW,GAAG
|
|
1
|
+
{"version":3,"file":"grammar.js","sourceRoot":"","sources":["../src/grammar.ts"],"names":[],"mappings":";AAAA,2EAA2E;;;AAE3E,yEAAyE;AACzE,qDAAqD;AAExC,QAAA,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+I1B,CAAA"}
|
package/dist/proto.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare const Proto: {
|
|
|
14
14
|
};
|
|
15
15
|
declare function toDescriptor(cst: any, options?: Partial<ProtoOptions>): FileDescriptorProto;
|
|
16
16
|
declare function parse(src: string, options?: Partial<ProtoOptions>): FileDescriptorProto;
|
|
17
|
-
declare const VERSION = "0.
|
|
17
|
+
declare const VERSION = "0.6.0";
|
|
18
18
|
export { Proto, parse, toDescriptor, VERSION };
|
|
19
19
|
export type { ProtoVersion };
|
|
20
20
|
export * from './descriptor';
|
package/dist/proto.js
CHANGED
|
@@ -26,6 +26,7 @@ const parser_1 = require("@tabnas/parser");
|
|
|
26
26
|
const abnf_1 = require("@tabnas/abnf");
|
|
27
27
|
const grammar_1 = require("./grammar");
|
|
28
28
|
const build_descriptor_1 = require("./build-descriptor");
|
|
29
|
+
const aggregate_1 = require("./aggregate");
|
|
29
30
|
const detect_version_1 = require("./detect-version");
|
|
30
31
|
// The Tabnas plugin: installs the union proto grammar so the engine can
|
|
31
32
|
// parse `.proto` source into a `{rule, src, kids}` CST. Use the exported
|
|
@@ -34,11 +35,32 @@ const Proto = ((tn, _options) => {
|
|
|
34
35
|
// Proto drives parsing through @tabnas/abnf; ensure it is installed.
|
|
35
36
|
if ('function' !== typeof tn.abnf)
|
|
36
37
|
tn.use(abnf_1.abnf);
|
|
38
|
+
// The grammar admits every keyword as an identifier, which a compiler
|
|
39
|
+
// without `tokenClasses` expands into millions of alternates
|
|
40
|
+
// (tabnas/bnf#71) and never finishes installing. Probe the installed
|
|
41
|
+
// compiler with a three-token grammar first, so an old @tabnas/bnf
|
|
42
|
+
// fails here, at once and by name, rather than hanging.
|
|
43
|
+
const probe = tn.abnf.toSpec('s = a a\na = "x" / "y"\n', { tag: 'proto', start: 's', tokenClasses: true });
|
|
44
|
+
if (!probe?.options?.tokenSet?.a) {
|
|
45
|
+
throw new Error('@tabnas/proto: the installed @tabnas/bnf does not ' +
|
|
46
|
+
'support tokenClasses; upgrade @tabnas/bnf (tabnas/bnf#74)');
|
|
47
|
+
}
|
|
48
|
+
// `wordKeywords` makes a keyword match as a whole word; `tokenClasses`
|
|
49
|
+
// compiles `ident` (an identifier or any keyword) to one engine token
|
|
50
|
+
// set, so a lookahead position peeks it as one token rather than one
|
|
51
|
+
// alternate per keyword. Both are required: see AGENTS.md.
|
|
52
|
+
;
|
|
37
53
|
tn.abnf(grammar_1.grammarText, {
|
|
38
54
|
tag: 'proto',
|
|
39
55
|
start: 'proto',
|
|
40
56
|
wordKeywords: true,
|
|
57
|
+
tokenClasses: true,
|
|
41
58
|
});
|
|
59
|
+
// An aggregate value (`option (f) = { a: 1 };`) is recorded as the text
|
|
60
|
+
// between its braces, which the CST's `src` does not keep: the lexer
|
|
61
|
+
// drops whitespace and comments. This action reads it from the source
|
|
62
|
+
// while the brace tokens are to hand; see ./aggregate.ts.
|
|
63
|
+
tn.rule('constant', (rs) => rs.ac(aggregate_1.recordAggregate));
|
|
42
64
|
});
|
|
43
65
|
exports.Proto = Proto;
|
|
44
66
|
Proto.defaults = { version: null, reconcile: true };
|
|
@@ -63,7 +85,7 @@ function parse(src, options) {
|
|
|
63
85
|
// VERSION is this package's version. It MUST equal package.json "version":
|
|
64
86
|
// the release orchestrator rewrites both, and test/version.test.ts fails the
|
|
65
87
|
// build if they drift. Mirrors `const VERSION` in go/proto.go.
|
|
66
|
-
const VERSION = '0.
|
|
88
|
+
const VERSION = '0.6.0';
|
|
67
89
|
exports.VERSION = VERSION;
|
|
68
90
|
__exportStar(require("./descriptor"), exports);
|
|
69
91
|
//# sourceMappingURL=proto.js.map
|
package/dist/proto.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proto.js","sourceRoot":"","sources":["../src/proto.ts"],"names":[],"mappings":";AAAA,2EAA2E;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"proto.js","sourceRoot":"","sources":["../src/proto.ts"],"names":[],"mappings":";AAAA,2EAA2E;;;;;;;;;;;;;;;;;QA8F3D,KAAK;QAAE,YAAY;AA5FnC,wEAAwE;AACxE,0EAA0E;AAC1E,wEAAwE;AACxE,wDAAwD;AAExD,2CAAuC;AACvC,uCAAmC;AAEnC,uCAAuC;AACvC,yDAA8C;AAC9C,2CAA6C;AAC7C,qDAEyB;AAczB,wEAAwE;AACxE,yEAAyE;AACzE,4EAA4E;AAC5E,MAAM,KAAK,GAAG,CAAC,CAAC,EAAa,EAAE,QAAgC,EAAE,EAAE;IACjE,qEAAqE;IACrE,IAAI,UAAU,KAAK,OAAO,EAAE,CAAC,IAAI;QAAE,EAAE,CAAC,GAAG,CAAC,WAAI,CAAC,CAAA;IAC/C,sEAAsE;IACtE,6DAA6D;IAC7D,qEAAqE;IACrE,mEAAmE;IACnE,wDAAwD;IACxD,MAAM,KAAK,GAAI,EAAE,CAAC,IAAY,CAAC,MAAM,CAAC,0BAA0B,EAC9D,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAA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,IAAA,gCAAe,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;IAC3E,MAAM,OAAO,GAAG,IAAA,+BAAc,EAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;IACtE,OAAO,IAAA,4BAAS,EAAC,GAAG,EAAE,OAAO,CAAC,CAAA;AAChC,CAAC;AAED,0EAA0E;AAC1E,2EAA2E;AAC3E,0DAA0D;AAC1D,sCAAsC;AACtC,SAAS,KAAK,CAAC,GAAW,EAAE,OAA+B;IACzD,MAAM,EAAE,GAAG,IAAI,eAAM,CAAC,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAc,CAAA;IACjE,KAAK,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;IAClB,OAAO,YAAY,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAA;AAC7C,CAAC;AAED,2EAA2E;AAC3E,6EAA6E;AAC7E,+DAA+D;AAC/D,MAAM,OAAO,GAAG,OAAO,CAAA;QAEc,OAAO;AAE5C,+CAA4B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"7.0.2","root":["../src/build-descriptor.ts","../src/descriptor.ts","../src/detect-version.ts","../src/grammar.ts","../src/proto.ts"],"packageJsons":["../node_modules/@tabnas/abnf/package.json","../node_modules/@tabnas/bnf/package.json","../node_modules/@tabnas/parser/package.json","../package.json"],"missingPackageJsons":["../node_modules/@tabnas/abnf/dist/package.json","../node_modules/@tabnas/bnf/dist/package.json","../node_modules/@tabnas/parser/dist/package.json"]}
|
|
1
|
+
{"version":"7.0.2","root":["../src/aggregate.ts","../src/build-descriptor.ts","../src/descriptor.ts","../src/detect-version.ts","../src/grammar.ts","../src/proto.ts"],"packageJsons":["../node_modules/@tabnas/abnf/package.json","../node_modules/@tabnas/bnf/package.json","../node_modules/@tabnas/parser/package.json","../package.json"],"missingPackageJsons":["../node_modules/@tabnas/abnf/dist/package.json","../node_modules/@tabnas/bnf/dist/package.json","../node_modules/@tabnas/parser/dist/package.json"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tabnas/proto",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Parse Protocol Buffers .proto IDL (proto2, proto3, edition 2023/2024) into FileDescriptorProto-shaped JSON, using the Tabnas parser and an ABNF grammar.",
|
|
5
5
|
"main": "dist/proto.js",
|
|
6
6
|
"type": "commonjs",
|
package/src/aggregate.ts
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/* Copyright (c) 2026 Richard Rodger and other contributors, MIT License */
|
|
2
|
+
|
|
3
|
+
// An aggregate option value: `option (foo) = { a: 1 };`.
|
|
4
|
+
//
|
|
5
|
+
// protoc's parser does not read the text between the braces. It records
|
|
6
|
+
// that text as `UninterpretedOption.aggregate_value`, and the text-format
|
|
7
|
+
// parser reads it later, once the option's type is known. Since protobuf
|
|
8
|
+
// v36 the recorded text keeps its layout (`ParseUninterpretedBlock` in
|
|
9
|
+
// src/google/protobuf/compiler/parser.cc). protoc walks the tokens between
|
|
10
|
+
// the braces with whitespace and newlines reported as tokens of their own,
|
|
11
|
+
// and appends each token's text as written. Comments are not tokens, and
|
|
12
|
+
// text format does not read `//` or `/* */`, so before each token protoc
|
|
13
|
+
// pads out whatever lay between it and the token before it, the opening
|
|
14
|
+
// brace for the first:
|
|
15
|
+
//
|
|
16
|
+
// - a token that starts on a later line gets one newline per line crossed,
|
|
17
|
+
// then as many spaces as its column;
|
|
18
|
+
// - a token that starts further along the same line gets the difference
|
|
19
|
+
// in spaces.
|
|
20
|
+
//
|
|
21
|
+
// Whitespace is a token, so the only thing ever padded out is a run of
|
|
22
|
+
// comments. A comment within one line becomes spaces of its width. A
|
|
23
|
+
// block comment that crosses lines, or a line comment, which protoc ends
|
|
24
|
+
// AFTER its newline, becomes its newlines followed by spaces up to the
|
|
25
|
+
// column where it ends. protoc stops at the closing brace before padding
|
|
26
|
+
// for it, so a comment directly ahead of that brace leaves nothing.
|
|
27
|
+
//
|
|
28
|
+
// Columns are counted as protoc's tokenizer counts them: a tab moves to
|
|
29
|
+
// the next multiple of 8, and every other byte of UTF-8 is one column.
|
|
30
|
+
|
|
31
|
+
const TAB = 8
|
|
32
|
+
|
|
33
|
+
// The text protoc 36 records for the aggregate whose braces are at
|
|
34
|
+
// `src[open]` and `src[close]`.
|
|
35
|
+
function aggregateText(src: string, open: number, close: number): string {
|
|
36
|
+
let line = 0
|
|
37
|
+
let col = 0
|
|
38
|
+
|
|
39
|
+
// Move past `src[i]`, keeping `line` and `col` protoc's way. Returns the
|
|
40
|
+
// index after it: a surrogate pair is one character and four bytes.
|
|
41
|
+
const step = (i: number): number => {
|
|
42
|
+
const c = src.charCodeAt(i)
|
|
43
|
+
if (10 === c) {
|
|
44
|
+
line++
|
|
45
|
+
col = 0
|
|
46
|
+
} else if (9 === c) {
|
|
47
|
+
col += TAB - (col % TAB)
|
|
48
|
+
} else if (c < 0x80) {
|
|
49
|
+
col += 1
|
|
50
|
+
} else if (c < 0x800) {
|
|
51
|
+
col += 2
|
|
52
|
+
} else if (0xd800 <= c && c < 0xdc00 && i + 1 < src.length) {
|
|
53
|
+
const d = src.charCodeAt(i + 1)
|
|
54
|
+
if (0xdc00 <= d && d < 0xe000) {
|
|
55
|
+
col += 4
|
|
56
|
+
return i + 2
|
|
57
|
+
}
|
|
58
|
+
col += 3
|
|
59
|
+
} else {
|
|
60
|
+
col += 3
|
|
61
|
+
}
|
|
62
|
+
return i + 1
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// The column after the opening brace depends on everything ahead of it
|
|
66
|
+
// on its line, because that decides where a later tab stops.
|
|
67
|
+
for (let i = src.lastIndexOf('\n', open) + 1; i <= open;) i = step(i)
|
|
68
|
+
line = 0
|
|
69
|
+
|
|
70
|
+
const isCommentStart = (i: number): boolean =>
|
|
71
|
+
'/' === src[i] && ('/' === src[i + 1] || '*' === src[i + 1])
|
|
72
|
+
|
|
73
|
+
let out = ''
|
|
74
|
+
let from = open + 1
|
|
75
|
+
let i = from
|
|
76
|
+
while (i < close) {
|
|
77
|
+
const c = src[i]
|
|
78
|
+
if (isCommentStart(i)) {
|
|
79
|
+
out += src.slice(from, i)
|
|
80
|
+
const gapLine = line
|
|
81
|
+
const gapCol = col
|
|
82
|
+
// Comments with nothing between them form one gap: protoc pads from
|
|
83
|
+
// the token before the first to the token after the last.
|
|
84
|
+
while (i < close && isCommentStart(i)) {
|
|
85
|
+
if ('/' === src[i + 1]) {
|
|
86
|
+
while (i < close && '\n' !== src[i]) i = step(i)
|
|
87
|
+
if (i < close) i = step(i)
|
|
88
|
+
} else {
|
|
89
|
+
i = step(step(i))
|
|
90
|
+
while (i < close && !('*' === src[i] && '/' === src[i + 1])) i = step(i)
|
|
91
|
+
if (i < close) i = step(step(i))
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
from = i
|
|
95
|
+
if (close <= i) break
|
|
96
|
+
if (gapLine < line) out += '\n'.repeat(line - gapLine) + ' '.repeat(col)
|
|
97
|
+
else if (gapCol < col) out += ' '.repeat(col - gapCol)
|
|
98
|
+
continue
|
|
99
|
+
}
|
|
100
|
+
if ('"' === c || "'" === c) {
|
|
101
|
+
// A string's text is copied as written; a `//` inside one is not a
|
|
102
|
+
// comment. protoc ends an unterminated string at the newline.
|
|
103
|
+
i = step(i)
|
|
104
|
+
while (i < close && c !== src[i] && '\n' !== src[i]) {
|
|
105
|
+
if ('\\' === src[i] && i + 1 < close && '\n' !== src[i + 1]) i = step(i)
|
|
106
|
+
i = step(i)
|
|
107
|
+
}
|
|
108
|
+
if (i < close && c === src[i]) i = step(i)
|
|
109
|
+
continue
|
|
110
|
+
}
|
|
111
|
+
i = step(i)
|
|
112
|
+
}
|
|
113
|
+
return out + src.slice(from, close)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
type AggregateNode = { rule?: unknown; src?: unknown; aggregate?: string }
|
|
117
|
+
|
|
118
|
+
// After-close action for the grammar's `constant` rule, which the `Proto`
|
|
119
|
+
// plugin installs: on an aggregate value's CST node it sets `aggregate` to
|
|
120
|
+
// the text protoc records, read from the source between the value's
|
|
121
|
+
// braces. The node's `src` stays the tokens run together, as on every
|
|
122
|
+
// node. The opening brace is the rule's first token (`o0`) and the closing
|
|
123
|
+
// brace the last token consumed (`v1`); a node where either is not a brace
|
|
124
|
+
// is left without `aggregate`.
|
|
125
|
+
function recordAggregate(rule: any, ctx: any): void {
|
|
126
|
+
const node: AggregateNode | undefined = rule?.node
|
|
127
|
+
if (!node || 'constant' !== node.rule) return
|
|
128
|
+
if ('string' !== typeof node.src || '{' !== node.src[0]) return
|
|
129
|
+
const src: string = ctx.src()
|
|
130
|
+
const open: number = rule.o0?.sI
|
|
131
|
+
const close: number = ctx.v1?.sI
|
|
132
|
+
if (!(0 <= open && open < close && close < src.length)) return
|
|
133
|
+
if ('{' !== src[open] || '}' !== src[close]) return
|
|
134
|
+
node.aggregate = aggregateText(src, open, close)
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export { aggregateText, recordAggregate }
|
package/src/build-descriptor.ts
CHANGED
|
@@ -16,7 +16,9 @@ import {
|
|
|
16
16
|
} from './descriptor'
|
|
17
17
|
import { ProtoVersion, isEdition } from './detect-version'
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
// `aggregate` is set on an aggregate value's `constant` node only: the
|
|
20
|
+
// text protoc records for it, which `src` cannot give (see ./aggregate.ts).
|
|
21
|
+
type Node = { rule?: string; src: string; kids?: Node[]; aggregate?: string }
|
|
20
22
|
|
|
21
23
|
// Children that are real rule nodes (terminals fold into `src`). An empty
|
|
22
24
|
// `.proto` is a legal (if useless) file and parses to no node at all, so
|
|
@@ -98,6 +100,9 @@ function unquote(s: string): string {
|
|
|
98
100
|
// ---- constants / option values -------------------------------------------
|
|
99
101
|
|
|
100
102
|
function constantValue(n: Node): OptionValue {
|
|
103
|
+
// An aggregate (`{ a: 1 }`) is the text between its braces, as protoc
|
|
104
|
+
// records it in `aggregate_value`.
|
|
105
|
+
if ('string' === typeof n.aggregate) return n.aggregate
|
|
101
106
|
const s = n.src
|
|
102
107
|
if ('true' === s) return true
|
|
103
108
|
if ('false' === s) return false
|
|
@@ -564,6 +569,23 @@ function buildService(n: Node): ServiceDescriptorProto {
|
|
|
564
569
|
return svc
|
|
565
570
|
}
|
|
566
571
|
|
|
572
|
+
// The contents of the first two parenthesised spans of a statement's
|
|
573
|
+
// text. No identifier or type holds a parenthesis, so for an rpc these
|
|
574
|
+
// are its input and its output, whatever the names in them are spelled.
|
|
575
|
+
function parenthesised(src: string): string[] {
|
|
576
|
+
const out: string[] = []
|
|
577
|
+
let at = 0
|
|
578
|
+
while (out.length < 2) {
|
|
579
|
+
const open = src.indexOf('(', at)
|
|
580
|
+
if (open < 0) break
|
|
581
|
+
const close = src.indexOf(')', open + 1)
|
|
582
|
+
if (close < 0) break
|
|
583
|
+
out.push(src.slice(open + 1, close))
|
|
584
|
+
at = close + 1
|
|
585
|
+
}
|
|
586
|
+
return out
|
|
587
|
+
}
|
|
588
|
+
|
|
567
589
|
// rpc ident "(" ["stream"] messageType ")" "returns" "(" ["stream"] messageType ")"
|
|
568
590
|
function buildRpc(el: Node): MethodDescriptorProto {
|
|
569
591
|
const ids = R(el).filter((k) => k.rule === 'ident')
|
|
@@ -573,14 +595,17 @@ function buildRpc(el: Node): MethodDescriptorProto {
|
|
|
573
595
|
inputType: types[0] ? types[0].src : '',
|
|
574
596
|
outputType: types[1] ? types[1].src : '',
|
|
575
597
|
}
|
|
576
|
-
// `stream` is a bare terminal, so it never becomes a node
|
|
577
|
-
//
|
|
578
|
-
//
|
|
579
|
-
//
|
|
580
|
-
//
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
598
|
+
// `stream` is a bare terminal, so it never becomes a node, and the name
|
|
599
|
+
// and both types are identifiers that may themselves be spelled
|
|
600
|
+
// `stream` (`rpc stream (stream stream)`), so no search for a child's
|
|
601
|
+
// text can say which copy is the modifier. The parentheses can: a name
|
|
602
|
+
// or a type never holds one, so the first two parenthesised spans are
|
|
603
|
+
// the input and the output, each the type's own text with or without
|
|
604
|
+
// `stream` ahead of it. A type that merely begins with those letters
|
|
605
|
+
// (`rpc M (streaming.Request)`) is its own text, and is not streaming.
|
|
606
|
+
const [input, output] = parenthesised(el.src)
|
|
607
|
+
if ('stream' + m.inputType === input) m.clientStreaming = true
|
|
608
|
+
if ('stream' + m.outputType === output) m.serverStreaming = true
|
|
584
609
|
for (const o of R(el).filter((k) => k.rule === 'optionStmt')) {
|
|
585
610
|
m.options = { ...(m.options || {}), ...optionFrom(o) }
|
|
586
611
|
}
|
package/src/grammar.ts
CHANGED
|
@@ -11,56 +11,71 @@ export const grammarText = `
|
|
|
11
11
|
; Whitespace and // and /* */ comments are ignored by the lexer.
|
|
12
12
|
; The grammar is a permissive superset of proto2 / proto3 / editions;
|
|
13
13
|
; version-specific legality is enforced in the descriptor walk.
|
|
14
|
+
;
|
|
15
|
+
; Keywords are written %s"..." (RFC 7405, case-sensitive): protoc's
|
|
16
|
+
; keywords are lower-case, so \`Message\`, \`Edition\` and \`MAX\` are
|
|
17
|
+
; identifiers. Every keyword is also admitted as an identifier by
|
|
18
|
+
; \`ident\`, as protoc's ConsumeIdentifier admits it: a field named
|
|
19
|
+
; \`message\`, an enum value \`max\`, an rpc \`stream\`, a package segment
|
|
20
|
+
; \`option\`. Where a statement list can begin with either a keyword or an
|
|
21
|
+
; identifier, the keyword-headed alternatives come first and the
|
|
22
|
+
; identifier-headed one last, which is protoc's LookingAt order; the
|
|
23
|
+
; compiler's lookahead separates the rest (\`message message = 1;\` is a
|
|
24
|
+
; field of type \`message\` once the third token is seen).
|
|
14
25
|
|
|
15
26
|
proto = [ syntaxOrEdition ] *topLevelDef
|
|
16
27
|
|
|
17
|
-
syntaxOrEdition = "syntax" "=" strLit ";"
|
|
28
|
+
syntaxOrEdition = %s"syntax" "=" strLit ";"
|
|
18
29
|
|
|
19
30
|
topLevelDef = importStmt / packageStmt / optionStmt / message / enumDef
|
|
20
31
|
/ service / extendStmt / emptyStmt
|
|
21
32
|
|
|
22
|
-
importStmt = "import" [ "weak" / "public" ] strLit ";"
|
|
23
|
-
packageStmt = "package" fullIdent ";"
|
|
33
|
+
importStmt = %s"import" [ %s"weak" / %s"public" ] strLit ";"
|
|
34
|
+
packageStmt = %s"package" fullIdent ";"
|
|
24
35
|
|
|
25
|
-
optionStmt = "option" optionName "=" constant ";"
|
|
36
|
+
optionStmt = %s"option" optionName "=" constant ";"
|
|
26
37
|
optionName = optionNamePart *( "." optionNamePart )
|
|
27
38
|
optionNamePart = ident / "(" [ "." ] fullIdent ")"
|
|
28
39
|
|
|
29
|
-
message = "message" ident messageBody
|
|
40
|
+
message = %s"message" ident messageBody
|
|
30
41
|
messageBody = "{" *messageElement "}"
|
|
31
|
-
|
|
42
|
+
; Keyword-headed statements first, \`field\` last: a field's type is an
|
|
43
|
+
; identifier, and an identifier may be any keyword.
|
|
44
|
+
messageElement = enumDef / message / optionStmt / oneof / mapField
|
|
32
45
|
/ extendStmt / extensions / reserved / emptyStmt
|
|
46
|
+
/ symbolVisibility message / symbolVisibility enumDef
|
|
47
|
+
/ groupField / field
|
|
33
48
|
|
|
34
49
|
field = [ label ] fieldType ident "=" fieldNumber [ fieldOptions ] ";"
|
|
35
|
-
label = "required" / "optional" / "repeated"
|
|
50
|
+
label = %s"required" / %s"optional" / %s"repeated"
|
|
36
51
|
fieldType = messageType
|
|
37
52
|
fieldNumber = NR
|
|
38
53
|
fieldOptions = "[" fieldOption *( "," fieldOption ) "]"
|
|
39
54
|
fieldOption = optionName "=" constant
|
|
40
55
|
|
|
41
|
-
oneof = "oneof" ident "{" *oneofElement "}"
|
|
42
|
-
oneofElement = optionStmt /
|
|
56
|
+
oneof = %s"oneof" ident "{" *oneofElement "}"
|
|
57
|
+
oneofElement = optionStmt / emptyStmt / groupField / oneofField
|
|
43
58
|
oneofField = fieldType ident "=" fieldNumber [ fieldOptions ] ";"
|
|
44
59
|
|
|
45
|
-
mapField = "map" "<" fieldType "," fieldType ">" ident "=" fieldNumber
|
|
60
|
+
mapField = %s"map" "<" fieldType "," fieldType ">" ident "=" fieldNumber
|
|
46
61
|
[ fieldOptions ] ";"
|
|
47
62
|
|
|
48
|
-
enumDef = "enum" ident "{" *enumElement "}"
|
|
49
|
-
enumElement = optionStmt /
|
|
63
|
+
enumDef = %s"enum" ident "{" *enumElement "}"
|
|
64
|
+
enumElement = optionStmt / reserved / emptyStmt / enumField
|
|
50
65
|
enumField = ident "=" [ "-" ] fieldNumber [ fieldOptions ] ";"
|
|
51
66
|
|
|
52
|
-
service = "service" ident "{" *serviceElement "}"
|
|
53
|
-
serviceElement = optionStmt /
|
|
54
|
-
rpc = "rpc" ident "(" [ "stream" ] messageType ")"
|
|
55
|
-
"returns" "(" [ "stream" ] messageType ")"
|
|
67
|
+
service = %s"service" ident "{" *serviceElement "}"
|
|
68
|
+
serviceElement = optionStmt / emptyStmt / rpc
|
|
69
|
+
rpc = %s"rpc" ident "(" [ %s"stream" ] messageType ")"
|
|
70
|
+
%s"returns" "(" [ %s"stream" ] messageType ")"
|
|
56
71
|
( ";" / "{" *( optionStmt / emptyStmt ) "}" )
|
|
57
72
|
|
|
58
|
-
extendStmt = "extend" messageType "{" *( field / emptyStmt ) "}"
|
|
59
|
-
extensions = "extensions" ranges [ fieldOptions ] ";"
|
|
60
|
-
reserved = "reserved" ( ranges / fieldNames ) ";"
|
|
73
|
+
extendStmt = %s"extend" messageType "{" *( field / emptyStmt ) "}"
|
|
74
|
+
extensions = %s"extensions" ranges [ fieldOptions ] ";"
|
|
75
|
+
reserved = %s"reserved" ( ranges / fieldNames ) ";"
|
|
61
76
|
ranges = range *( "," range )
|
|
62
77
|
; Enum reserved ranges may be negative, so a range bound is signed.
|
|
63
|
-
range = [ "-" ] NR [ "to" ( [ "-" ] NR / "max" ) ]
|
|
78
|
+
range = [ "-" ] NR [ %s"to" ( [ "-" ] NR / %s"max" ) ]
|
|
64
79
|
; Reserved names are string literals in proto2/proto3 and bare identifiers
|
|
65
80
|
; from edition 2023 on; the union accepts either (and a mix).
|
|
66
81
|
fieldNames = reservedName *( "," reservedName )
|
|
@@ -74,22 +89,43 @@ signedNumber = [ "-" / "+" ] NR
|
|
|
74
89
|
signedIdent = "-" fullIdent
|
|
75
90
|
boolLit = VL
|
|
76
91
|
messageValue = "{" *messageValueEntry "}"
|
|
77
|
-
|
|
92
|
+
; Text format writes a string value as one or more adjacent literals and
|
|
93
|
+
; concatenates them: \`a: "foo" "bar"\`. The first alternative takes two or
|
|
94
|
+
; more, so a single literal is a \`constant\`, as any other value is.
|
|
95
|
+
messageValueEntry = ident [ ":" ] ( strLit 1*strLit / constant ) [ "," / ";" ]
|
|
78
96
|
|
|
79
97
|
messageType = [ "." ] fullIdent
|
|
80
98
|
fullIdent = ident *( "." ident )
|
|
81
|
-
|
|
99
|
+
; An identifier is a TX token, a value word (\`true\`, \`false\` and \`null\`
|
|
100
|
+
; lex as VL) or any keyword: protoc's tokenizer has one identifier class.
|
|
101
|
+
; The grammar is compiled with \`tokenClasses\`, so this rule is one engine
|
|
102
|
+
; token set and a lookahead position peeks it as one token.
|
|
103
|
+
ident = TX / VL / %s"syntax" / %s"edition" / %s"import" / %s"weak"
|
|
104
|
+
/ %s"public" / %s"package" / %s"option" / %s"message"
|
|
105
|
+
/ %s"enum" / %s"service" / %s"extend" / %s"required"
|
|
106
|
+
/ %s"optional" / %s"repeated" / %s"oneof" / %s"map"
|
|
107
|
+
/ %s"extensions" / %s"reserved" / %s"to" / %s"max"
|
|
108
|
+
/ %s"rpc" / %s"returns" / %s"stream" / %s"group"
|
|
109
|
+
/ %s"export" / %s"local"
|
|
82
110
|
strLit = ST
|
|
83
111
|
emptyStmt = ";"
|
|
84
112
|
|
|
113
|
+
; A group is proto2's (and a legal oneof member: \`oneof foo { group D = 4
|
|
114
|
+
; {…} }\`); the descriptor walk enforces the version. It lives here rather
|
|
115
|
+
; than in proto2.abnf because messageElement and oneofElement order it
|
|
116
|
+
; ahead of \`field\`, and a rule added by \`=/\` is appended after it.
|
|
117
|
+
groupField = [ label ] %s"group" ident "=" fieldNumber messageBody
|
|
118
|
+
; Edition 2024's visibility modifier ahead of a message or enum, here for
|
|
119
|
+
; the same reason. \`export\` and \`local\` stay ordinary identifiers
|
|
120
|
+
; everywhere else (\`local.pkg.SomeMessage\`), as every keyword does.
|
|
121
|
+
symbolVisibility = %s"export" / %s"local"
|
|
122
|
+
|
|
85
123
|
; ===== proto2.abnf =====
|
|
86
|
-
; proto2 deltas: groups are proto2-only (deprecated).
|
|
87
|
-
;
|
|
88
|
-
;
|
|
89
|
-
|
|
90
|
-
;
|
|
91
|
-
oneofElement =/ groupField
|
|
92
|
-
groupField = [ label ] "group" ident "=" fieldNumber messageBody
|
|
124
|
+
; proto2 deltas: groups are proto2-only (deprecated). The \`groupField\`
|
|
125
|
+
; rule lives in common.abnf, ordered ahead of \`field\` in messageElement
|
|
126
|
+
; and oneofElement. Labels (required/optional/repeated), extend, and
|
|
127
|
+
; extensions live in common too (the permissive union); the descriptor
|
|
128
|
+
; walk enforces what each version actually allows.
|
|
93
129
|
|
|
94
130
|
; ===== proto3.abnf =====
|
|
95
131
|
; proto3 deltas: none. proto3's surface syntax is the common base
|
|
@@ -100,18 +136,14 @@ groupField = [ label ] "group" ident "=" fieldNumber messageBody
|
|
|
100
136
|
; edition 2023 deltas: the file may open with an \`edition = "2023";\`
|
|
101
137
|
; declaration instead of \`syntax = ...\`.
|
|
102
138
|
syntaxOrEdition =/ editionDecl
|
|
103
|
-
editionDecl = "edition" "=" strLit ";"
|
|
139
|
+
editionDecl = %s"edition" "=" strLit ";"
|
|
104
140
|
|
|
105
141
|
; ===== edition-2024.abnf =====
|
|
106
142
|
; edition 2024 deltas: \`import option "...";\` and symbol visibility
|
|
107
|
-
; (export / local) on message and enum declarations.
|
|
108
|
-
|
|
143
|
+
; (export / local) on message and enum declarations. \`symbolVisibility\`
|
|
144
|
+
; and its messageElement alternatives live in common.abnf, ordered ahead
|
|
145
|
+
; of \`field\`. \`export\` and \`local\` are identifiers everywhere else, as
|
|
146
|
+
; every keyword is (\`local.pkg.SomeMessage\`), so fullIdent needs nothing.
|
|
147
|
+
importStmt =/ %s"import" %s"option" strLit ";"
|
|
109
148
|
topLevelDef =/ symbolVisibility message / symbolVisibility enumDef
|
|
110
|
-
messageElement =/ symbolVisibility message / symbolVisibility enumDef
|
|
111
|
-
symbolVisibility = "export" / "local"
|
|
112
|
-
; \`export\` and \`local\` are contextual: they are only visibility modifiers
|
|
113
|
-
; ahead of \`message\`/\`enum\`, and stay usable as ordinary name components
|
|
114
|
-
; (\`local.pkg.SomeMessage\`). The union grammar lexes them as keywords, so
|
|
115
|
-
; give fullIdent an alternative that may open with one.
|
|
116
|
-
fullIdent =/ symbolVisibility *( "." ident )
|
|
117
149
|
`
|
package/src/proto.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { abnf } from '@tabnas/abnf'
|
|
|
10
10
|
|
|
11
11
|
import { grammarText } from './grammar'
|
|
12
12
|
import { buildFile } from './build-descriptor'
|
|
13
|
+
import { recordAggregate } from './aggregate'
|
|
13
14
|
import {
|
|
14
15
|
ProtoVersion, declaredVersion, resolveVersion,
|
|
15
16
|
} from './detect-version'
|
|
@@ -32,11 +33,32 @@ type AnyTabnas = Tabnas & { abnf?: Function }
|
|
|
32
33
|
const Proto = ((tn: AnyTabnas, _options?: Partial<ProtoOptions>) => {
|
|
33
34
|
// Proto drives parsing through @tabnas/abnf; ensure it is installed.
|
|
34
35
|
if ('function' !== typeof tn.abnf) tn.use(abnf)
|
|
36
|
+
// The grammar admits every keyword as an identifier, which a compiler
|
|
37
|
+
// without `tokenClasses` expands into millions of alternates
|
|
38
|
+
// (tabnas/bnf#71) and never finishes installing. Probe the installed
|
|
39
|
+
// compiler with a three-token grammar first, so an old @tabnas/bnf
|
|
40
|
+
// fails here, at once and by name, rather than hanging.
|
|
41
|
+
const probe = (tn.abnf as any).toSpec('s = a a\na = "x" / "y"\n',
|
|
42
|
+
{ tag: 'proto', start: 's', tokenClasses: true })
|
|
43
|
+
if (!probe?.options?.tokenSet?.a) {
|
|
44
|
+
throw new Error('@tabnas/proto: the installed @tabnas/bnf does not ' +
|
|
45
|
+
'support tokenClasses; upgrade @tabnas/bnf (tabnas/bnf#74)')
|
|
46
|
+
}
|
|
47
|
+
// `wordKeywords` makes a keyword match as a whole word; `tokenClasses`
|
|
48
|
+
// compiles `ident` (an identifier or any keyword) to one engine token
|
|
49
|
+
// set, so a lookahead position peeks it as one token rather than one
|
|
50
|
+
// alternate per keyword. Both are required: see AGENTS.md.
|
|
35
51
|
;(tn.abnf as Function)(grammarText, {
|
|
36
52
|
tag: 'proto',
|
|
37
53
|
start: 'proto',
|
|
38
54
|
wordKeywords: true,
|
|
55
|
+
tokenClasses: true,
|
|
39
56
|
})
|
|
57
|
+
// An aggregate value (`option (f) = { a: 1 };`) is recorded as the text
|
|
58
|
+
// between its braces, which the CST's `src` does not keep: the lexer
|
|
59
|
+
// drops whitespace and comments. This action reads it from the source
|
|
60
|
+
// while the brace tokens are to hand; see ./aggregate.ts.
|
|
61
|
+
tn.rule('constant', (rs: any) => rs.ac(recordAggregate))
|
|
40
62
|
}) as {
|
|
41
63
|
(tn: AnyTabnas, options?: Partial<ProtoOptions>): void
|
|
42
64
|
defaults: ProtoOptions
|
|
@@ -68,7 +90,7 @@ function parse(src: string, options?: Partial<ProtoOptions>): FileDescriptorProt
|
|
|
68
90
|
// VERSION is this package's version. It MUST equal package.json "version":
|
|
69
91
|
// the release orchestrator rewrites both, and test/version.test.ts fails the
|
|
70
92
|
// build if they drift. Mirrors `const VERSION` in go/proto.go.
|
|
71
|
-
const VERSION = '0.
|
|
93
|
+
const VERSION = '0.6.0'
|
|
72
94
|
|
|
73
95
|
export { Proto, parse, toDescriptor, VERSION }
|
|
74
96
|
export type { ProtoVersion }
|