Skip to content

Commit 3e064bd

Browse files
Reverted new binary
1 parent 0659865 commit 3e064bd

File tree

1 file changed

+24
-27
lines changed

1 file changed

+24
-27
lines changed

binary.regex

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
1-
2-
(?<binopplusrest>
3-
(?=(?<lastbin>(?&binoplast))(?<castinbin>(?&castexpr)))
4-
(?<binop>
5-
(?(?=(?{push2 \@savedcallouts, []; ++$recording})(?<binoplast>(?(<addopraw>)(?&mulopraw)
6-
|(?(<shiftopraw>)(?&addopraw)
7-
|(?(<relopraw>)(?&shiftopraw)
8-
|(?(<eqopraw>)(?&relopraw)
9-
|(?(<andopraw>)(?&eqopraw)
10-
|(?(<xoropraw>)(?&andopraw)
11-
|(?(<oropraw>)(?&xoropraw)
12-
|(?(<andlogicopraw>)(?&oropraw)
13-
|(?(<orlogicopraw>)(?&andlogicopraw)
14-
|(?<orlogicopraw>\|\|(?{call 'begin_branch'; $flags[-1]{logicop}=undef})
15-
|(?<andlogicopraw>&&(?{call 'begin_branch'; $flags[-1]{logicop}=undef})
16-
|(?<oropraw>(?!\|\|)\|
17-
|(?<xoropraw>\^
18-
|(?<andopraw>(?!&&)&
19-
|(?<eqopraw>==|!=
20-
|(?<relopraw>(?!<<)<|(?!>>)>|<=|>=
21-
|(?<shiftopraw><<|>>
22-
|(?<addopraw>[\+\-]
23-
|(?<mulopraw>[\*\/\%]))))))))))
24-
)))))))))))\g{lastbin}(?{ --$recording; pop2 \@savedcallouts, []})
25-
|(?{ --$recording; pop2 \@savedcallouts, []})(*F))
26-
\g{castinbin}
27-
(?&binopplusrest)*+(?{call 'binary'})))
1+
(?<binopplusrest>(?<binop>(?<binoplast>
2+
(?(<addopraw>)(?&mulopraw)
3+
|(?(<shiftopraw>)(?&addopraw)
4+
|(?(<relopraw>)(?&shiftopraw)
5+
|(?(<eqopraw>)(?&relopraw)
6+
|(?(<andopraw>)(?&eqopraw)
7+
|(?(<xoropraw>)(?&andopraw)
8+
|(?(<oropraw>)(?&xoropraw)
9+
|(?(<andlogicopraw>)(?&oropraw)
10+
|(?(<orlogicopraw>)(?&andlogicopraw)
11+
|(?<orlogicopraw>\|\|(?{call 'begin_branch'; $flags[-1]{logicop}=undef})
12+
|(?<andlogicopraw>&&(?{call 'begin_branch'; $flags[-1]{logicop}=undef})
13+
|(?<oropraw>(?!\|\|)\|
14+
|(?<xoropraw>\^
15+
|(?<andopraw>(?!&&)&
16+
|(?<eqopraw>==|!=
17+
|(?<relopraw>(?!<<)<|(?!>>)>|<=|>=
18+
|(?<shiftopraw><<|>>
19+
|(?<addopraw>[\+\-]
20+
|(?<mulopraw>[\*\/\%]))))))))))
21+
))))))))))
22+
(??{use re 'eval'; use if $debug, re => qw(Debug EXECUTE);
23+
$binopplusrestreg //= qr{(?(DEFINE)$mainregexdefs)(?&castexpr)}sxx})
24+
(?&binopplusrest)*+(?{call 'binary'})))
2825

2926

3027
(?<orlogiorsomething>(?&binopplusrest)++)

0 commit comments

Comments
 (0)