diff --git a/src/main/gen/io/github/facilityapi/intellij/parser/FsdParser.java b/src/main/gen/io/github/facilityapi/intellij/parser/FsdParser.java index 65883ab..66d81ef 100644 --- a/src/main/gen/io/github/facilityapi/intellij/parser/FsdParser.java +++ b/src/main/gen/io/github/facilityapi/intellij/parser/FsdParser.java @@ -787,14 +787,13 @@ private static boolean service_item_recover_0(PsiBuilder b, int l) { } /* ********************************************************** */ - // ('{' decorated_service_item* '}') | (';' decorated_service_item* &('#' | <>)) | decorated_service_item + // ('{' decorated_service_item* '}') | ([';'] decorated_service_item*) public static boolean service_items(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "service_items")) return false; boolean r; Marker m = enter_section_(b, l, _NONE_, SERVICE_ITEMS, ""); r = service_items_0(b, l + 1); if (!r) r = service_items_1(b, l + 1); - if (!r) r = decorated_service_item(b, l + 1); exit_section_(b, l, m, r, false, null); return r; } @@ -822,18 +821,24 @@ private static boolean service_items_0_1(PsiBuilder b, int l) { return true; } - // ';' decorated_service_item* &('#' | <>) + // [';'] decorated_service_item* private static boolean service_items_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "service_items_1")) return false; boolean r; Marker m = enter_section_(b); - r = consumeToken(b, SEMI); + r = service_items_1_0(b, l + 1); r = r && service_items_1_1(b, l + 1); - r = r && service_items_1_2(b, l + 1); exit_section_(b, m, null, r); return r; } + // [';'] + private static boolean service_items_1_0(PsiBuilder b, int l) { + if (!recursion_guard_(b, l, "service_items_1_0")) return false; + consumeToken(b, SEMI); + return true; + } + // decorated_service_item* private static boolean service_items_1_1(PsiBuilder b, int l) { if (!recursion_guard_(b, l, "service_items_1_1")) return false; @@ -845,27 +850,6 @@ private static boolean service_items_1_1(PsiBuilder b, int l) { return true; } - // &('#' | <>) - private static boolean service_items_1_2(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "service_items_1_2")) return false; - boolean r; - Marker m = enter_section_(b, l, _AND_); - r = service_items_1_2_0(b, l + 1); - exit_section_(b, l, m, r, false, null); - return r; - } - - // '#' | <> - private static boolean service_items_1_2_0(PsiBuilder b, int l) { - if (!recursion_guard_(b, l, "service_items_1_2_0")) return false; - boolean r; - Marker m = enter_section_(b); - r = consumeToken(b, "#"); - if (!r) r = eof(b, l + 1); - exit_section_(b, m, null, r); - return r; - } - /* ********************************************************** */ // service identifier service_items public static boolean service_spec(PsiBuilder b, int l) { diff --git a/src/main/kotlin/io/github/facilityapi/intellij/fsd.bnf b/src/main/kotlin/io/github/facilityapi/intellij/fsd.bnf index 7d170ef..f087c57 100644 --- a/src/main/kotlin/io/github/facilityapi/intellij/fsd.bnf +++ b/src/main/kotlin/io/github/facilityapi/intellij/fsd.bnf @@ -43,7 +43,7 @@ definition ::= (attribute_list* service_spec) markdown_remarks* service_spec ::= service identifier service_items { pin=1 } -service_items ::= ('{' decorated_service_item* '}') | (';' decorated_service_item* &('#' | <>)) | decorated_service_item +service_items ::= ('{' decorated_service_item* '}') | ([';'] decorated_service_item*) decorated_service_item ::= attribute_list* service_item private service_item ::= (extern_decl | enum_spec | data_spec | method_spec | error_set_spec) { recoverWhile=service_item_recover } private service_item_recover ::= !('[' | '}' | extern | enum | data | errors | method)