New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
more operators in grammar, implemented !==, !eq #110
Comments
From olivier.mengue@gmail.comAdded operators in grammar : Trivial implementation of !eq, !== with cut 'n paste. dolmen. |
From olivier.mengue@gmail.commore-ops.patchIndex: src/builtins/cmp.pir
===================================================================
--- src/builtins/cmp.pir (révision 27854)
+++ src/builtins/cmp.pir (copie de travail)
@@ -20,6 +20,14 @@
.end
+.sub 'infix:!==' :multi(_,_)
+ .param num a
+ .param num b
+ $I0 = isne a, b
+ .return 'prefix:?'($I0)
+.end
+
+# Shortcut for infix:!==, so same code
.sub 'infix:!=' :multi(_,_)
.param num a
.param num b
@@ -75,7 +83,14 @@
.return 'prefix:?'($I0)
.end
+.sub 'infix:!eq' :multi(_,_)
+ .param string a
+ .param string b
+ $I0 = isne a, b
+ .return 'prefix:?'($I0)
+.end
+
.sub 'infix:ne' :multi(_,_)
.param string a
.param string b
Index: src/parser/grammar-oper.pg
===================================================================
--- src/parser/grammar-oper.pg (révision 27854)
+++ src/parser/grammar-oper.pg (copie de travail)
@@ -76,25 +76,34 @@
## nonchaining
proto infix:<..> is precedence('n=') { ... }
+proto infix:<..^> is equiv(infix:<..>) { ... }
+proto infix:<^..> is equiv(infix:<..>) { ... }
+proto infix:<^..^> is equiv(infix:<..>) { ... }
proto infix:«<=>» is equiv(infix:<..>) { ... }
proto infix:<cmp> is equiv(infix:<..>) { ... }
proto infix:<leg> is equiv(infix:<..>) { ... }
+proto infix:<=:=> is equiv(infix:<..>) { ... }
+proto infix:<!=:=> is equiv(infix:<..>) { ... }
## chaining
proto infix:<==> is precedence('m=') is pasttype('chain') { ... }
proto infix:<!=> is equiv(infix:<==>) is pasttype('chain') { ... }
+proto infix:<!==> is equiv(infix:<==>) is pasttype('chain') { ... }
proto infix:«<» is equiv(infix:<==>) is pasttype('chain') { ... }
proto infix:«<=» is equiv(infix:<==>) is pasttype('chain') { ... }
proto infix:«>» is equiv(infix:<==>) is pasttype('chain') { ... }
proto infix:«>=» is equiv(infix:<==>) is pasttype('chain') { ... }
proto infix:<eq> is equiv(infix:<==>) is pasttype('chain') { ... }
+proto infix:<!eq> is equiv(infix:<==>) is pasttype('chain') { ... }
proto infix:<ne> is equiv(infix:<==>) is pasttype('chain') { ... }
proto infix:<lt> is equiv(infix:<==>) is pasttype('chain') { ... }
proto infix:<le> is equiv(infix:<==>) is pasttype('chain') { ... }
proto infix:<gt> is equiv(infix:<==>) is pasttype('chain') { ... }
proto infix:<ge> is equiv(infix:<==>) is pasttype('chain') { ... }
proto infix:<~~> is equiv(infix:<==>) is pasttype('chain') { ... }
+proto infix:<!~~> is equiv(infix:<==>) is pasttype('chain') { ... }
proto infix:<===> is equiv(infix:<==>) is pasttype('chain') { ... }
+proto infix:<!===> is equiv(infix:<==>) is pasttype('chain') { ... }
proto infix:<eqv> is equiv(infix:<==>) is pasttype('chain') { ... }
proto infix:<!eqv> is equiv(infix:<==>) is pasttype('chain') { ... }
|
From @moritzOlivier MenguXX (via RT) wrote:
ISTR that the current policy is to parse only the things that are (should I submit a patch for README with a few more commit policies? or Cheers, -- |
The RT System itself - Status changed from 'new' to 'open' |
From @pmichaudOn Wed May 28 03:34:35 2008, moritz@casella.verplant.org wrote:
If that's been the policy, I guess we should probably change it. In this specific case, using one of the parsed-but-unimplemented Patch applied, thanks! Pm |
@pmichaud - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#54946 (status was 'resolved')
Searchable as RT54946$
The text was updated successfully, but these errors were encountered: