aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/pire
diff options
context:
space:
mode:
authorArseny Smalyuk <smalukav@gmail.com>2022-02-10 16:48:05 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:05 +0300
commit5f8a2ce7b1dc3b3e1fae197610f189e7ed1d5723 (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13 /contrib/libs/pire
parent12559cd7f2fa0cf54ffb0d961949fea58c0e18cb (diff)
downloadydb-5f8a2ce7b1dc3b3e1fae197610f189e7ed1d5723.tar.gz
Restoring authorship annotation for Arseny Smalyuk <smalukav@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/pire')
-rw-r--r--contrib/libs/pire/pire/re_parser.y18
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/libs/pire/pire/re_parser.y b/contrib/libs/pire/pire/re_parser.y
index f2f845c2d3..dbad88e287 100644
--- a/contrib/libs/pire/pire/re_parser.y
+++ b/contrib/libs/pire/pire/re_parser.y
@@ -70,8 +70,8 @@ void AppendRange(const Encoding& encoding, Fsm& a, const Term::CharacterRange& c
%term YRE_AND
%term YRE_NOT
-%destructor { delete $$; } <>
-
+%destructor { delete $$; } <>
+
%%
regexp
@@ -80,23 +80,23 @@ regexp
ConvertToFSM(rlex.Encoding(), $1);
DoSwap(rlex.Retval(), *$1);
delete $1;
- $$ = nullptr;
+ $$ = nullptr;
}
;
alternative
: conjunction
- | alternative '|' conjunction { ConvertToFSM(rlex.Encoding(), ($$ = $1)) |= ConvertToFSM(rlex.Encoding(), $3); delete $2; delete $3; }
+ | alternative '|' conjunction { ConvertToFSM(rlex.Encoding(), ($$ = $1)) |= ConvertToFSM(rlex.Encoding(), $3); delete $2; delete $3; }
;
conjunction
: negation
- | conjunction YRE_AND negation { ConvertToFSM(rlex.Encoding(), ($$ = $1)) &= ConvertToFSM(rlex.Encoding(), $3); delete $2; delete $3; }
+ | conjunction YRE_AND negation { ConvertToFSM(rlex.Encoding(), ($$ = $1)) &= ConvertToFSM(rlex.Encoding(), $3); delete $2; delete $3; }
;
negation
: concatenation
- | YRE_NOT concatenation { ConvertToFSM(rlex.Encoding(), ($$ = $2)).Complement(); delete $1; }
+ | YRE_NOT concatenation { ConvertToFSM(rlex.Encoding(), ($$ = $2)).Complement(); delete $1; }
;
concatenation
@@ -150,7 +150,7 @@ term
| YRE_DOT
| '^'
| '$'
- | '(' alternative ')' { $$ = $2; rlex.Parenthesized($$->As<Fsm>()); delete $1; delete $3; }
+ | '(' alternative ')' { $$ = $2; rlex.Parenthesized($$->As<Fsm>()); delete $1; delete $3; }
;
%%
@@ -161,8 +161,8 @@ int yylex(YYSTYPE* lval, Pire::Lexer& rlex)
Pire::Term term = rlex.Lex();
if (!term.Value().Empty())
*lval = new Any(term.Value());
- else
- *lval = nullptr;
+ else
+ *lval = nullptr;
return term.Type();
} catch (Pire::Error &e) {
rlex.SetError(e.what());