1 /* Cycript - Remove Execution Server and Disassembler
2 * Copyright (C) 2009 Jay Freeman (saurik)
5 /* Modified BSD License {{{ */
7 * Redistribution and use in source and binary
8 * forms, with or without modification, are permitted
9 * provided that the following conditions are met:
11 * 1. Redistributions of source code must retain the
12 * above copyright notice, this list of conditions
13 * and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the
15 * above copyright notice, this list of conditions
16 * and the following disclaimer in the documentation
17 * and/or other materials provided with the
19 * 3. The name of the author may not be used to endorse
20 * or promote products derived from this software
21 * without specific prior written permission.
23 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS''
24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
25 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
26 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
28 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
34 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
36 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
43 // XXX: wtf is this here?!
53 #include "location.hh"
54 #include "Pooling.hpp"
56 template <typename Type_>
70 void SetNext(Type_ *next) {
76 virtual void Output(struct CYOutput &out) const = 0;
92 CYOutput(std::ostream &out) :
100 void Check(char value);
103 CYOutput &operator <<(char rhs);
104 CYOutput &operator <<(const char *rhs);
106 _finline CYOutput &operator <<(const CYThing *rhs) {
112 _finline CYOutput &operator <<(const CYThing &rhs) {
118 struct CYPropertyName {
119 virtual void PropertyName(CYOutput &out) const = 0;
132 CYNoBrace = (1 << 0),
133 CYNoFunction = (1 << 1),
136 CYNoRightHand = (1 << 4),
137 CYNoDangle = (1 << 5),
138 CYNoBF = (CYNoBrace | CYNoFunction),
144 CYContext(apr_pool_t *pool) :
149 template <typename Type_>
150 void Replace(Type_ *&value) {
152 while (Type_ *replace = value->Replace(*this))
160 void Single(CYOutput &out, CYFlags flags) const;
161 void Multiple(CYOutput &out, CYFlags flags = CYNoFlags) const;
163 CYStatement *ReplaceAll(CYContext &context);
165 virtual CYStatement *Replace(CYContext &context) = 0;
168 virtual void Output(CYOutput &out, CYFlags flags) const = 0;
171 struct CYStatements {
181 operator CYStatement *() const {
185 CYStatements &operator ->*(CYStatement *next) {
187 if (first_ == NULL) {
190 } else for (;; last_ = last_->next_)
191 if (last_->next_ == NULL) {
201 virtual CYExpression *ClassName(CYContext &context, bool object) = 0;
202 virtual void ClassName(CYOutput &out, bool object) const = 0;
212 CYWord(const char *word) :
217 const char *Value() const {
221 virtual void Output(CYOutput &out) const;
223 virtual CYExpression *ClassName(CYContext &context, bool object);
224 virtual void ClassName(CYOutput &out, bool object) const;
225 virtual void PropertyName(CYOutput &out) const;
228 _finline std::ostream &operator <<(std::ostream &lhs, const CYWord &rhs) {
229 return lhs << rhs.Value();
232 struct CYIdentifier :
235 CYIdentifier(const char *word) :
245 CYStatement *statement_;
247 CYLabel(CYIdentifier *name, CYStatement *statement) :
249 statement_(statement)
253 virtual CYStatement *Replace(CYContext &context);
254 virtual void Output(CYOutput &out, CYFlags flags) const;
260 CYStatement *statements_;
262 CYProgram(CYStatement *statements) :
263 statements_(statements)
267 virtual void Replace(CYContext &context);
269 virtual void Output(CYOutput &out) const;
276 CYStatement *statements_;
278 CYBlock(CYStatement *statements) :
279 statements_(statements)
283 virtual CYStatement *Replace(CYContext &context);
285 virtual void Output(CYOutput &out) const;
286 virtual void Output(CYOutput &out, CYFlags flags) const;
313 std::string filename_;
317 cy::location location_;
318 std::string message_;
321 typedef std::vector<Error> Errors;
328 void ScannerDestroy();
331 CYDriver(const std::string &filename);
334 void SetCondition(Condition condition);
336 void Warning(const cy::location &location, const char *message);
339 struct CYForInitialiser {
340 virtual void For(CYOutput &out) const = 0;
343 struct CYForInInitialiser {
344 virtual void ForIn(CYOutput &out, CYFlags flags) const = 0;
345 virtual const char *ForEachIn() const = 0;
346 virtual void ForEachIn(CYOutput &out) const = 0;
347 virtual CYExpression *ForEachIn(CYContext &out) = 0;
350 struct CYExpression :
351 CYNext<CYExpression>,
357 virtual unsigned Precedence() const = 0;
359 virtual bool RightHand() const {
363 virtual void For(CYOutput &out) const;
364 virtual void ForIn(CYOutput &out, CYFlags flags) const;
366 virtual const char *ForEachIn() const;
367 virtual void ForEachIn(CYOutput &out) const;
368 virtual CYExpression *ForEachIn(CYContext &out);
370 virtual void Output(CYOutput &out) const;
371 virtual void Output(CYOutput &out, CYFlags flags) const = 0;
372 void Output(CYOutput &out, unsigned precedence, CYFlags flags) const;
374 virtual CYExpression *ClassName(CYContext &context, bool object);
375 virtual void ClassName(CYOutput &out, bool object) const;
377 CYExpression *ReplaceAll(CYContext &context);
379 virtual CYExpression *Replace(CYContext &context) = 0;
381 virtual const char *Word() const {
386 #define CYAlphabetic(value) \
387 virtual bool Alphabetic() const { \
391 #define CYPrecedence(value) \
392 virtual unsigned Precedence() const { \
396 #define CYRightHand(value) \
397 virtual bool RightHand() const { \
404 CYExpression *expressions_;
406 CYCompound(CYExpression *expressions) :
407 expressions_(expressions)
411 void AddPrev(CYExpression *expression) {
412 CYExpression *last(expression);
413 while (last->next_ != NULL)
415 last->SetNext(expressions_);
416 expressions_ = expression;
421 virtual CYExpression *Replace(CYContext &context);
422 void Output(CYOutput &out, CYFlags flags) const;
425 struct CYFunctionParameter :
426 CYNext<CYFunctionParameter>,
431 CYFunctionParameter(CYIdentifier *name, CYFunctionParameter *next = NULL) :
432 CYNext<CYFunctionParameter>(next),
437 virtual void Output(CYOutput &out) const;
440 struct CYComprehension :
441 CYNext<CYComprehension>,
444 void Output(CYOutput &out) const;
445 virtual const char *Name() const = 0;
447 virtual void Begin_(CYOutput &out) const = 0;
449 virtual void End_(CYOutput &out) const {
452 virtual CYFunctionParameter *Parameter(CYContext &context) const = 0;
453 CYFunctionParameter *Parameters(CYContext &context) const;
454 virtual CYStatement *Replace(CYContext &context, CYStatement *statement) const;
457 struct CYForInComprehension :
463 CYForInComprehension(CYIdentifier *name, CYExpression *set) :
469 virtual const char *Name() const {
470 return name_->Value();
473 virtual void Begin_(CYOutput &out) const;
475 virtual CYFunctionParameter *Parameter(CYContext &context) const;
476 virtual CYStatement *Replace(CYContext &context, CYStatement *statement) const;
479 struct CYForEachInComprehension :
485 CYForEachInComprehension(CYIdentifier *name, CYExpression *set) :
491 virtual const char *Name() const {
492 return name_->Value();
495 virtual void Begin_(CYOutput &out) const;
496 virtual void End_(CYOutput &out) const;
498 virtual CYFunctionParameter *Parameter(CYContext &context) const;
499 virtual CYStatement *Replace(CYContext &context, CYStatement *statement) const;
502 struct CYIfComprehension :
507 CYIfComprehension(CYExpression *test) :
512 virtual const char *Name() const {
516 virtual void Begin_(CYOutput &out) const;
518 virtual CYFunctionParameter *Parameter(CYContext &context) const;
519 virtual CYStatement *Replace(CYContext &context, CYStatement *statement) const;
522 struct CYArrayComprehension :
525 CYExpression *expression_;
526 CYComprehension *comprehensions_;
528 CYArrayComprehension(CYExpression *expression, CYComprehension *comprehensions) :
529 expression_(expression),
530 comprehensions_(comprehensions)
536 virtual CYExpression *Replace(CYContext &context);
537 virtual void Output(CYOutput &out, CYFlags flags) const;
550 virtual CYExpression *Replace(CYContext &context);
564 CYRange(uint64_t lo, uint64_t hi) :
569 bool operator [](uint8_t value) const {
570 return !(value >> 7) && (value >> 6 ? hi_ : lo_) >> (value & 0x3f) & 0x1;
573 void operator()(uint8_t value) {
576 (value >> 6 ? hi_ : lo_) |= uint64_t(0x1) << (value & 0x3f);
580 extern CYRange DigitRange_;
581 extern CYRange WordStartRange_;
582 extern CYRange WordEndRange_;
597 CYString(const char *value) :
603 CYString(const char *value, size_t size) :
609 CYString(const CYWord *word) :
610 value_(word->Value()),
611 size_(strlen(value_))
615 const char *Value() const {
619 virtual const char *Word() const;
621 virtual void Output(CYOutput &out, CYFlags flags) const;
622 virtual void PropertyName(CYOutput &out) const;
631 CYNumber(double value) :
636 double Value() const {
640 virtual void Output(CYOutput &out, CYFlags flags) const;
641 virtual void PropertyName(CYOutput &out) const;
649 CYRegEx(const char *value) :
654 const char *Value() const {
658 virtual void Output(CYOutput &out, CYFlags flags) const;
670 virtual void Output(CYOutput &out, CYFlags flags) const;
682 virtual CYExpression *Replace(CYContext &context);
683 virtual void Output(CYOutput &out, CYFlags flags) const;
689 virtual bool Value() const = 0;
690 virtual void Output(CYOutput &out, CYFlags flags) const;
702 virtual bool Value() const {
716 virtual bool Value() const {
726 CYVariable(CYIdentifier *name) :
734 virtual CYExpression *Replace(CYContext &context);
735 virtual void Output(CYOutput &out, CYFlags flags) const;
743 CYPrefix(CYExpression *rhs) :
748 virtual bool Alphabetic() const = 0;
749 virtual const char *Operator() const = 0;
753 virtual CYExpression *Replace(CYContext &context);
754 virtual void Output(CYOutput &out, CYFlags flags) const;
763 CYInfix(CYExpression *lhs, CYExpression *rhs) :
769 void SetLeft(CYExpression *lhs) {
773 virtual bool Alphabetic() const = 0;
774 virtual const char *Operator() const = 0;
776 virtual CYExpression *Replace(CYContext &context);
777 virtual void Output(CYOutput &out, CYFlags flags) const;
785 CYPostfix(CYExpression *lhs) :
790 virtual const char *Operator() const = 0;
794 virtual CYExpression *Replace(CYContext &context);
795 virtual void Output(CYOutput &out, CYFlags flags) const;
798 struct CYAssignment :
804 CYAssignment(CYExpression *lhs, CYExpression *rhs) :
810 void SetLeft(CYExpression *lhs) {
814 virtual const char *Operator() const = 0;
818 virtual CYExpression *Replace(CYContext &context);
819 virtual void Output(CYOutput &out, CYFlags flags) const;
827 CYExpression *value_;
829 CYArgument(CYExpression *value, CYArgument *next = NULL) :
830 CYNext<CYArgument>(next),
836 CYArgument(CYWord *name, CYExpression *value, CYArgument *next = NULL) :
837 CYNext<CYArgument>(next),
843 void Replace(CYContext &context);
844 void Output(CYOutput &out) const;
861 CYStatement *statements_;
863 CYClause(CYExpression *_case, CYStatement *statements) :
865 statements_(statements)
869 virtual void Replace(CYContext &context);
870 virtual void Output(CYOutput &out) const;
877 CYExpression *value_;
879 CYElement(CYExpression *value, CYElement *next) :
880 CYNext<CYElement>(next),
885 void Replace(CYContext &context);
886 void Output(CYOutput &out) const;
892 CYElement *elements_;
894 CYArray(CYElement *elements = NULL) :
899 virtual CYExpression *Replace(CYContext &context);
900 virtual void Output(CYOutput &out, CYFlags flags) const;
903 struct CYDeclaration :
906 CYIdentifier *identifier_;
907 CYExpression *initialiser_;
909 CYDeclaration(CYIdentifier *identifier, CYExpression *initialiser) :
910 identifier_(identifier),
911 initialiser_(initialiser)
915 virtual void ForIn(CYOutput &out, CYFlags flags) const;
917 virtual const char *ForEachIn() const;
918 virtual void ForEachIn(CYOutput &out) const;
919 virtual CYExpression *ForEachIn(CYContext &out);
921 void Replace(CYContext &context);
923 virtual void Output(CYOutput &out, CYFlags flags) const;
926 struct CYDeclarations :
927 CYNext<CYDeclarations>,
931 CYDeclaration *declaration_;
933 CYDeclarations(CYDeclaration *declaration, CYDeclarations *next) :
934 CYNext<CYDeclarations>(next),
935 declaration_(declaration)
939 virtual void For(CYOutput &out) const;
941 void Replace(CYContext &context);
943 virtual void Output(CYOutput &out) const;
944 virtual void Output(CYOutput &out, CYFlags flags) const;
950 CYDeclarations *declarations_;
952 CYVar(CYDeclarations *declarations) :
953 declarations_(declarations)
957 virtual CYStatement *Replace(CYContext &context);
958 virtual void Output(CYOutput &out, CYFlags flags) const;
964 CYDeclarations *declarations_;
967 CYLet(CYDeclarations *declarations, CYStatement *statements) :
968 declarations_(declarations),
973 virtual CYStatement *Replace(CYContext &context);
974 virtual void Output(CYOutput &out, CYFlags flags) const;
980 CYForInitialiser *initialiser_;
982 CYExpression *increment_;
985 CYFor(CYForInitialiser *initialiser, CYExpression *test, CYExpression *increment, CYStatement *code) :
986 initialiser_(initialiser),
988 increment_(increment),
993 virtual CYStatement *Replace(CYContext &context);
994 virtual void Output(CYOutput &out, CYFlags flags) const;
1000 CYForInInitialiser *initialiser_;
1004 CYForIn(CYForInInitialiser *initialiser, CYExpression *set, CYStatement *code) :
1005 initialiser_(initialiser),
1011 virtual CYStatement *Replace(CYContext &context);
1012 virtual void Output(CYOutput &out, CYFlags flags) const;
1015 struct CYForEachIn :
1018 CYForInInitialiser *initialiser_;
1022 CYForEachIn(CYForInInitialiser *initialiser, CYExpression *set, CYStatement *code) :
1023 initialiser_(initialiser),
1029 virtual CYStatement *Replace(CYContext &context);
1030 virtual void Output(CYOutput &out, CYFlags flags) const;
1037 CYPropertyName *name_;
1038 CYExpression *value_;
1040 CYProperty(CYPropertyName *name, CYExpression *value, CYProperty *next = NULL) :
1041 CYNext<CYProperty>(next),
1047 void Replace(CYContext &context);
1048 virtual void Output(CYOutput &out) const;
1054 CYProperty *properties_;
1056 CYObject(CYProperty *properties) :
1057 properties_(properties)
1061 virtual CYExpression *Replace(CYContext &context);
1062 void Output(CYOutput &out, CYFlags flags) const;
1068 CYIdentifier *name_;
1071 CYCatch(CYIdentifier *name, CYStatement *statements) :
1077 void Replace(CYContext &context);
1078 virtual void Output(CYOutput &out) const;
1084 CYExpression *object_;
1085 CYExpression *property_;
1087 CYMember(CYExpression *object, CYExpression *property) :
1093 void SetLeft(CYExpression *object) {
1097 void Replace_(CYContext &context);
1100 struct CYDirectMember :
1103 CYDirectMember(CYExpression *object, CYExpression *property) :
1104 CYMember(object, property)
1111 virtual CYExpression *Replace(CYContext &context);
1112 virtual void Output(CYOutput &out, CYFlags flags) const;
1115 struct CYIndirectMember :
1118 CYIndirectMember(CYExpression *object, CYExpression *property) :
1119 CYMember(object, property)
1126 virtual CYExpression *Replace(CYContext &context);
1127 virtual void Output(CYOutput &out, CYFlags flags) const;
1133 CYExpression *constructor_;
1134 CYArgument *arguments_;
1136 CYNew(CYExpression *constructor, CYArgument *arguments) :
1137 constructor_(constructor),
1138 arguments_(arguments)
1142 virtual unsigned Precedence() const {
1143 return arguments_ == NULL ? 2 : 1;
1148 virtual CYExpression *Replace(CYContext &context);
1149 virtual void Output(CYOutput &out, CYFlags flags) const;
1155 CYExpression *function_;
1156 CYArgument *arguments_;
1158 CYCall(CYExpression *function, CYArgument *arguments = NULL) :
1159 function_(function),
1160 arguments_(arguments)
1167 virtual CYExpression *Replace(CYContext &context);
1168 virtual void Output(CYOutput &out, CYFlags flags) const;
1174 CYExpression *test_;
1176 CYStatement *false_;
1178 CYIf(CYExpression *test, CYStatement *_true, CYStatement *_false = NULL) :
1185 virtual CYStatement *Replace(CYContext &context);
1186 virtual void Output(CYOutput &out, CYFlags flags) const;
1192 CYExpression *test_;
1195 CYDoWhile(CYExpression *test, CYStatement *code) :
1201 virtual CYStatement *Replace(CYContext &context);
1202 virtual void Output(CYOutput &out, CYFlags flags) const;
1208 CYExpression *test_;
1211 CYWhile(CYExpression *test, CYStatement *code) :
1217 virtual CYStatement *Replace(CYContext &context);
1218 virtual void Output(CYOutput &out, CYFlags flags) const;
1222 CYIdentifier *name_;
1223 CYFunctionParameter *parameters_;
1226 CYFunction(CYIdentifier *name, CYFunctionParameter *parameters, CYStatement *statements) :
1228 parameters_(parameters),
1233 virtual void Replace_(CYContext &context);
1234 virtual void Output(CYOutput &out, CYFlags flags) const;
1237 struct CYFunctionExpression :
1241 CYFunctionExpression(CYIdentifier *name, CYFunctionParameter *parameters, CYStatement *statements) :
1242 CYFunction(name, parameters, statements)
1249 virtual CYExpression *Replace(CYContext &context);
1250 virtual void Output(CYOutput &out, CYFlags flags) const;
1253 struct CYFunctionStatement :
1257 CYFunctionStatement(CYIdentifier *name, CYFunctionParameter *parameters, CYStatement *statements) :
1258 CYFunction(name, parameters, statements)
1262 virtual CYStatement *Replace(CYContext &context);
1263 virtual void Output(CYOutput &out, CYFlags flags) const;
1269 CYExpression *expression_;
1271 CYExpress(CYExpression *expression) :
1272 expression_(expression)
1276 virtual CYStatement *Replace(CYContext &context);
1277 virtual void Output(CYOutput &out, CYFlags flags) const;
1283 CYIdentifier *label_;
1285 CYContinue(CYIdentifier *label) :
1290 virtual CYStatement *Replace(CYContext &context);
1291 virtual void Output(CYOutput &out, CYFlags flags) const;
1297 CYIdentifier *label_;
1299 CYBreak(CYIdentifier *label) :
1304 virtual CYStatement *Replace(CYContext &context);
1305 virtual void Output(CYOutput &out, CYFlags flags) const;
1311 CYExpression *value_;
1313 CYReturn(CYExpression *value) :
1318 virtual CYStatement *Replace(CYContext &context);
1319 virtual void Output(CYOutput &out, CYFlags flags) const;
1325 virtual CYStatement *Replace(CYContext &context);
1326 virtual void Output(CYOutput &out, CYFlags flags) const;
1334 CYFinally(CYStatement *statements) :
1339 void Replace(CYContext &context);
1340 virtual void Output(CYOutput &out) const;
1348 CYFinally *finally_;
1350 CYTry(CYStatement *statements, CYCatch *_catch, CYFinally *finally) :
1357 virtual CYStatement *Replace(CYContext &context);
1358 virtual void Output(CYOutput &out, CYFlags flags) const;
1364 CYExpression *value_;
1366 CYThrow(CYExpression *value) :
1371 virtual CYStatement *Replace(CYContext &context);
1372 virtual void Output(CYOutput &out, CYFlags flags) const;
1378 CYExpression *scope_;
1381 CYWith(CYExpression *scope, CYStatement *code) :
1387 virtual CYStatement *Replace(CYContext &context);
1388 virtual void Output(CYOutput &out, CYFlags flags) const;
1394 CYExpression *value_;
1397 CYSwitch(CYExpression *value, CYClause *clauses) :
1403 virtual CYStatement *Replace(CYContext &context);
1404 virtual void Output(CYOutput &out, CYFlags flags) const;
1407 struct CYCondition :
1410 CYExpression *test_;
1411 CYExpression *true_;
1412 CYExpression *false_;
1414 CYCondition(CYExpression *test, CYExpression *_true, CYExpression *_false) :
1423 virtual CYExpression *Replace(CYContext &context);
1424 virtual void Output(CYOutput &out, CYFlags flags) const;
1427 struct CYAddressOf :
1430 CYAddressOf(CYExpression *rhs) :
1435 virtual const char *Operator() const {
1441 virtual CYExpression *Replace(CYContext &context);
1447 CYIndirect(CYExpression *rhs) :
1452 virtual const char *Operator() const {
1458 virtual CYExpression *Replace(CYContext &context);
1461 #define CYPostfix_(op, name) \
1462 struct CY ## name : \
1465 CY ## name(CYExpression *lhs) : \
1470 virtual const char *Operator() const { \
1475 #define CYPrefix_(alphabetic, op, name) \
1476 struct CY ## name : \
1479 CY ## name(CYExpression *rhs) : \
1484 CYAlphabetic(alphabetic) \
1486 virtual const char *Operator() const { \
1491 #define CYInfix_(alphabetic, precedence, op, name) \
1492 struct CY ## name : \
1495 CY ## name(CYExpression *lhs, CYExpression *rhs) : \
1500 CYAlphabetic(alphabetic) \
1501 CYPrecedence(precedence) \
1503 virtual const char *Operator() const { \
1508 #define CYAssignment_(op, name) \
1509 struct CY ## name ## Assign : \
1512 CY ## name ## Assign(CYExpression *lhs, CYExpression *rhs) : \
1513 CYAssignment(lhs, rhs) \
1517 virtual const char *Operator() const { \
1522 CYPostfix_("++", PostIncrement)
1523 CYPostfix_("--", PostDecrement)
1525 CYPrefix_(true, "delete", Delete)
1526 CYPrefix_(true, "void", Void)
1527 CYPrefix_(true, "typeof", TypeOf)
1528 CYPrefix_(false, "++", PreIncrement)
1529 CYPrefix_(false, "--", PreDecrement)
1530 CYPrefix_(false, "+", Affirm)
1531 CYPrefix_(false, "-", Negate)
1532 CYPrefix_(false, "~", BitwiseNot)
1533 CYPrefix_(false, "!", LogicalNot)
1535 CYInfix_(false, 5, "*", Multiply)
1536 CYInfix_(false, 5, "/", Divide)
1537 CYInfix_(false, 5, "%", Modulus)
1538 CYInfix_(false, 6, "+", Add)
1539 CYInfix_(false, 6, "-", Subtract)
1540 CYInfix_(false, 7, "<<", ShiftLeft)
1541 CYInfix_(false, 7, ">>", ShiftRightSigned)
1542 CYInfix_(false, 7, ">>>", ShiftRightUnsigned)
1543 CYInfix_(false, 8, "<", Less)
1544 CYInfix_(false, 8, ">", Greater)
1545 CYInfix_(false, 8, "<=", LessOrEqual)
1546 CYInfix_(false, 8, ">=", GreaterOrEqual)
1547 CYInfix_(true, 8, "instanceof", InstanceOf)
1548 CYInfix_(true, 8, "in", In)
1549 CYInfix_(false, 9, "==", Equal)
1550 CYInfix_(false, 9, "!=", NotEqual)
1551 CYInfix_(false, 9, "===", Identical)
1552 CYInfix_(false, 9, "!==", NotIdentical)
1553 CYInfix_(false, 10, "&", BitwiseAnd)
1554 CYInfix_(false, 11, "^", BitwiseXOr)
1555 CYInfix_(false, 12, "|", BitwiseOr)
1556 CYInfix_(false, 13, "&&", LogicalAnd)
1557 CYInfix_(false, 14, "||", LogicalOr)
1559 CYAssignment_("=", )
1560 CYAssignment_("*=", Multiply)
1561 CYAssignment_("/=", Divide)
1562 CYAssignment_("%=", Modulus)
1563 CYAssignment_("+=", Add)
1564 CYAssignment_("-=", Subtract)
1565 CYAssignment_("<<=", ShiftLeft)
1566 CYAssignment_(">>=", ShiftRightSigned)
1567 CYAssignment_(">>>=", ShiftRightUnsigned)
1568 CYAssignment_("&=", BitwiseAnd)
1569 CYAssignment_("^=", BitwiseXOr)
1570 CYAssignment_("|=", BitwiseOr)
1572 #endif/*CYPARSER_HPP*/