Comments (11)
I see that a&b is converted as it is but a|b is not because it is by default assumed in the code that | comes with | only. so b is replaced by | and lastly ^ is working for xor as ^ is used for power. So, I format should be
a AND b
a OR b
a XOR b
These do not conflict with existing one. Parsing could be done differently for these but still they need to handled like other binary operators
from sim-c.
I would like to work on it.
from sim-c.
@shobhit10058 AND, OR, XOR is confusing as users might think it is normal AND, OR, XOR and not bitwise versions of these operators. I believe retaining C's syntax of & (Bitwise and), | (Bitwise or), and ^ (Bitwise xor) will be best. Do let me know if you think otherwise
from sim-c.
But what can AND,or, xor of two numbers mean other than bitwise operators
from sim-c.
we can use the original also, just we need to change the ^ to work as xor. power function can be given some other name then
from sim-c.
Yeah I guess we can give ** to power like python. Using AND, OR, XOR might mean the regular AND, OR and XOR. As in True AND False = True, like in python.
from sim-c.
yes
from sim-c.
ok then I can try working with this
from sim-c.
Sure assigning this to you @shobhit10058.
from sim-c.
have you seen my commit?
from sim-c.
Merged.
from sim-c.
Related Issues (20)
- [BUG REPORT] Incorrect Usage of Check Braces Flag HOT 2
- [BUG REPORT] Switch Case Is Not Working
- [BUG REPORT] array declaration gives error HOT 4
- [FEATURE] Generalize prec_to_type and type_to_prec dictionary
- [BUG REPORT] Error when function calls and constants are passed in array initializer list HOT 2
- [FEATURE] Redundant code in array_initializer (array_parser.py) HOT 4
- [FEATURE] Break var_statement function into further sub functions HOT 2
- [BUG REPORT] Incorrect error message when function is not defined HOT 4
- [BUG REPORT] stdio.h gets included for array/pointer declaration + assignment HOT 2
- [BUG REPORT] Incorrect compilation of ptr_only_assign opcode HOT 2
- [BUG REPORT] Cloned repo gets deleted on running tests HOT 1
- [FEATURE REPORT] Improvement of arrays: Differentiate array from variables to avoid bugs and check out for ranges when indexing
- [BUG REPORT] Power function not working when used inside parenthesis. HOT 3
- [BUG REPORT] Array initializer must detect too many commas
- [BUG REPORT] Pointer to pointer not working
- [BUG] Predict type in print HOT 1
- [FEATURE] Pretty print symbol table HOT 2
- [BUG] Function redefinition does not throw error HOT 3
- [BUG] Return type and dtype of parameters in a function is incorrect
- README.md enhancement
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sim-c.