diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:33 +0000 |
commit | 9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 (patch) | |
tree | 2784370cda9bbf2da9114d70f05399c0b229d28c /epan/protobuf_lang_parser.lemon | |
parent | Adding debian version 4.2.6-1. (diff) | |
download | wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.tar.xz wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.zip |
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/protobuf_lang_parser.lemon')
-rw-r--r-- | epan/protobuf_lang_parser.lemon | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/epan/protobuf_lang_parser.lemon b/epan/protobuf_lang_parser.lemon index 60544585..d9d7af23 100644 --- a/epan/protobuf_lang_parser.lemon +++ b/epan/protobuf_lang_parser.lemon @@ -14,7 +14,7 @@ * 2) Protocol Buffers Version 2 Language Specification: * https://developers.google.com/protocol-buffers/docs/reference/proto2-spec * There are some errors about 'proto', 'option' (value) and 'reserved' (fieldName) definitions on that sites. - * This parser is created because Wireshark is mainly implemented in plain ANSI C but the offical + * This parser is created because Wireshark is mainly implemented in plain ANSI C but the official * Protocol Buffers Language parser is implemented in C++. */ #include "config.h" @@ -126,7 +126,7 @@ DIAG_ON_LEMON() %type extend { pbl_node_t* } %type extendBody { pbl_node_t* } -%type intLit { guint64 } +%type intLit { uint64_t } %type fieldNumber { int } %type enumNumber { int } @@ -139,7 +139,7 @@ extensions reserved ranges range quoteFieldNames emptyStatement %start_symbol proto /* v2/v3: proto = syntax { import | package | option | topLevelDef | emptyStatement } */ -/* Offical PBL bugfix: proto = { syntax } { import | package | option | topLevelDef | emptyStatement } +/* Official PBL bugfix: proto = { syntax } { import | package | option | topLevelDef | emptyStatement } The default syntax version is "proto2". */ proto ::= wholeProtoBody. proto ::= syntax wholeProtoBody. @@ -195,12 +195,12 @@ package ::= PT_PACKAGE exIdent(B) PT_SEMICOLON. } /* v2/v3: option = "option" optionName "=" constant ";" */ -/* Offical PBL bugfix: option = "option" optionName "=" ( constant | customOptionValue ) ";" */ +/* Official PBL bugfix: option = "option" optionName "=" ( constant | customOptionValue ) ";" */ option ::= PT_OPTION optionName PT_ASSIGN constant PT_SEMICOLON. option ::= PT_OPTION optionName PT_ASSIGN customOptionValue PT_SEMICOLON. /* v2/v3: optionName = ( ident | "(" fullIdent ")" ) { "." ident } */ -/* Offical PBL bugfix: optionName = ( ident | "(" fullIdent ")" ) { "." ( ident | "(" fullIdent ")" ) } */ +/* Official PBL bugfix: optionName = ( ident | "(" fullIdent ")" ) { "." ( ident | "(" fullIdent ")" ) } */ extIdentInParentheses(A) ::= PT_LPAREN exIdent(B) PT_RPAREN. { A = B; A->v = pbl_store_string_token(state, g_strconcat("(", B->v, ")", NULL)); } optionName ::= exIdent. @@ -212,7 +212,7 @@ optionName(A) ::= optionName(B) PT_DOT extIdentInParentheses(C). optionName(A) ::= optionName(B) extIdentInParentheses(C). { A = B; A->v = pbl_store_string_token(state, g_strconcat(B->v, ".", C->v, NULL)); } -/* Allow format which not defined in offical PBL specification like: +/* Allow format which not defined in official PBL specification like: option (google.api.http) = { post: "/v3alpha/kv/put" body: "*" }; option (google.api.http) = { post: "/v3alpha/kv/put", body: "*" }; option (google.api.http) = { post: "/v3alpha/kv/put" { any format } body: "*" }; @@ -312,7 +312,7 @@ enum(A) ::= PT_ENUM enumName(B) PT_LCURLY enumBody(C) PT_RCURLY. { A = C; pbl_set_node_name(A, B->ln, B->v); } /* v2/v3: enumBody = "{" { option | enumField | emptyStatement } "}" */ -/* Offical PBL bugfix: enumBody = "{" { reserved | option | enumField | emptyStatement } "}" */ +/* Official PBL bugfix: enumBody = "{" { reserved | option | enumField | emptyStatement } "}" */ enumBody(A) ::= . { A = pbl_create_node(state->file, CUR_LINENO, PBL_ENUM, NAME_TO_BE_SET); } enumBody ::= enumBody reserved. enumBody ::= enumBody option. @@ -335,7 +335,7 @@ enumValueOptions ::= enumValueOption. enumValueOptions ::= enumValueOptions PT_COMMA enumValueOption. /* v2/v3: enumValueOption = optionName "=" constant */ -/* Offical PBL bugfix: enumValueOption = optionName "=" ( constant | customOptionValue ) ";" */ +/* Official PBL bugfix: enumValueOption = optionName "=" ( constant | customOptionValue ) ";" */ enumValueOption ::= optionName PT_ASSIGN constant. enumValueOption ::= optionName PT_ASSIGN customOptionValue. @@ -414,14 +414,14 @@ fieldOptions(A) ::= fieldOptions(B) PT_COMMA fieldOption(C). { A = B; pbl_add_child(A, C); } /* v2/v3: fieldOption = optionName "=" constant */ -/* Offical PBL bugfix: fieldOption = optionName "=" ( constant | customOptionValue ) ";" */ +/* Official PBL bugfix: fieldOption = optionName "=" ( constant | customOptionValue ) ";" */ fieldOption(A) ::= optionName(B) PT_ASSIGN constant(C). { A = pbl_create_option_node(state->file, B->ln, B->v, C); } fieldOption(A) ::= optionName(B) PT_ASSIGN customOptionValue. { A = pbl_create_option_node(state->file, B->ln, B->v, pbl_store_string_token(state, g_strdup("{ ... }"))); } /* v2 only: group = label "group" groupName "=" fieldNumber messageBody */ -/* Offical PBL bugfix: there is no label if the 'group' is a member of oneof body */ +/* Official PBL bugfix: there is no label if the 'group' is a member of oneof body */ group(A) ::= PT_GROUP groupName(B) PT_ASSIGN fieldNumber PT_LCURLY messageBody(C) PT_RCURLY. { A = C; pbl_set_node_name(A, B->ln, B->v); } group(A) ::= label PT_GROUP groupName(B) PT_ASSIGN fieldNumber PT_LCURLY messageBody(C) PT_RCURLY. @@ -430,7 +430,7 @@ group(A) ::= label PT_GROUP groupName(B) PT_ASSIGN fieldNumber PT_LCURLY message groupName ::= exIdent. /* v2/v3: oneof = "oneof" oneofName "{" { oneofField | emptyStatement } "}" */ -/* Offical PBL bugfix: oneof = "oneof" oneofName "{" { oneofField | option | group | emptyStatement } "}" */ +/* Official PBL bugfix: oneof = "oneof" oneofName "{" { oneofField | option | group | emptyStatement } "}" */ oneof(A) ::= PT_ONEOF oneofName(B) PT_LCURLY oneofBody(C) PT_RCURLY. { A = C; pbl_set_node_name(A, B->ln, B->v); } |