atom ::= NUMBER | '(' expr ')'
2674
def n_atom(self, node):
        
        length = len(node)
        if length == 1:
            self.preorder(node[0])
            node.value = node[0].value
            self.prune()
        elif length == 3:
            self.preorder(node[1])
            node.value = node[1].value
            self.prune()
        else:
            assert False, "Expecting atom to have length 1 or 3"
639269
Expr greaterLess() {
		Expr expr = addSub();
		Tok tok = peek();
		if (tok.sym == Sym.LT || tok.sym == Sym.LE || tok.sym == Sym.GT || tok.sym == Sym.GE) {
			move();
			return new Compare(tok.sym, expr, addSub(), location);
		}
		return expr;
	}
658582
def _exprcomp(node):
    """"""
    try:
        comp = _LITS[node.data()]
    except KeyError:
        comp = _LITS[node.data()] = Complement(node)
    return comp
404188
protected void diagnoseLineNumber(Expression expr)
  {
    ElemTemplateElement e = getElemFromExpression(expr);
    System.err.println("   " + e.getSystemId() + " Line " + e.getLineNumber());
  }
1037898
@Override
    public boolean matches(IAtom atom) {
        boolean val = false;
        boolean matchesLeft = left.matches(atom);
        if (right != null) {
            if ("and".equals(operator) && matchesLeft) {
                boolean matchesRight = right.matches(atom);
                val = matchesLeft && matchesRight;
            } else if ("or".equals(operator)) {
                boolean matchesRight = right.matches(atom);
                val = matchesLeft || matchesRight;
            }
        } else {
            if ("not".equals(operator)) {
                val = (!matchesLeft);
            } else {
                val = matchesLeft;
            }
        }
        return val;
    }
1137209
def expr(obj, simplify=True):
    """"""
    if isinstance(obj, Expression):
        return obj
    # False, True, 0, 1
    elif isinstance(obj, int) and obj in {0, 1}:
        return _CONSTS[obj]
    elif isinstance(obj, str):
        ast = pyeda.parsing.boolexpr.parse(obj)
        ex = ast2expr(ast)
        if simplify:
            ex = ex.simplify()
        return ex
    else:
        return One if bool(obj) else Zero
893878
function(atom1, atom2) {
        if (this.isVariable(atom1) && this.isVariable(atom2) ) {
            return true;
        } else if(atom1 == atom2) {
            return true;
        } else {
            return false;
        }
    }
1246039
def inspect
      expr = @expr || @unit.expr
      expr = (expr) ? ","+expr.inspect : ""
      sufx = (@@verbose_inspect) ? " "+@unit.inspect : ""
      self.class.to_s+"["+Unit::Utils.num_inspect(@value)+expr+"]"+sufx
    end
1351235
function evalExpr(expr, data, owner) {
    if (expr.value != null) {
        return expr.value;
    }

    var value;

    switch (expr.type) {
        case ExprType.UNARY:
            value = evalExpr(expr.expr, data, owner);
            switch (expr.operator) {
                case 33:
                    value = !value;
                    break;

                case 45:
                    value = 0 - value;
                    break;
            }
            return value;

        case ExprType.BINARY:
            value = evalExpr(expr.segs[0], data, owner);
            var rightValue = evalExpr(expr.segs[1], data, owner);

            /* eslint-disable eqeqeq */
            switch (expr.operator) {
                case 37:
                    value = value % rightValue;
                    break;

                case 43:
                    value = value + rightValue;
                    break;

                case 45:
                    value = value - rightValue;
                    break;

                case 42:
                    value = value * rightValue;
                    break;

                case 47:
                    value = value / rightValue;
                    break;

                case 60:
                    value = value < rightValue;
                    break;

                case 62:
                    value = value > rightValue;
                    break;

                case 76:
                    value = value && rightValue;
                    break;

                case 94:
                    value = value != rightValue;
                    break;

                case 121:
                    value = value <= rightValue;
                    break;

                case 122:
                    value = value == rightValue;
                    break;

                case 123:
                    value = value >= rightValue;
                    break;

                case 155:
                    value = value !== rightValue;
                    break;

                case 183:
                    value = value === rightValue;
                    break;

                case 248:
                    value = value || rightValue;
                    break;

            }
            /* eslint-enable eqeqeq */
            return value;

        case ExprType.TERTIARY:
            return evalExpr(
                expr.segs[evalExpr(expr.segs[0], data, owner) ? 1 : 2],
                data,
                owner
            );


        case ExprType.ARRAY:
            value = [];
            for (var i = 0, l = expr.items.length; i < l; i++) {
                var item = expr.items[i];
                var itemValue = evalExpr(item.expr, data, owner);

                if (item.spread) {
                    itemValue && (value = value.concat(itemValue));
                }
                else {
                    value.push(itemValue);
                }
            }
            return value;

        case ExprType.OBJECT:
            value = {};
            for (var i = 0, l = expr.items.length; i < l; i++) {
                var item = expr.items[i];
                var itemValue = evalExpr(item.expr, data, owner);

                if (item.spread) {
                    itemValue && extend(value, itemValue);
                }
                else {
                    value[evalExpr(item.name, data, owner)] = itemValue;
                }
            }
            return value;

        case ExprType.ACCESSOR:
            return data.get(expr);


        case ExprType.INTERP:
            value = evalExpr(expr.expr, data, owner);

            if (owner) {
                for (var i = 0, l = expr.filters.length; i < l; i++) {
                    var filter = expr.filters[i];
                    var filterName = filter.name.paths[0].value;

                    if (owner.filters[filterName]) {
                        value = owner.filters[filterName].apply(
                            owner,
                            [value].concat(evalArgs(filter.args, data, owner))
                        );
                    }
                    else if (DEFAULT_FILTERS[filterName]) {
                        value = DEFAULT_FILTERS[filterName](value);
                    }
                }
            }

            if (value == null) {
                value = '';
            }

            return value;

        case ExprType.CALL:
            if (owner && expr.name.type === ExprType.ACCESSOR) {
                var method = owner;
                var pathsLen = expr.name.paths.length;

                for (var i = 0; method && i < pathsLen; i++) {
                    method = method[evalExpr(expr.name.paths[i], data, owner)];
                }

                if (method) {
                    value = method.apply(owner, evalArgs(expr.args, data, owner));
                }
            }

            break;

        /* eslint-disable no-redeclare */
        case ExprType.TEXT:
            var buf = '';
            for (var i = 0, l = expr.segs.length; i < l; i++) {
                var seg = expr.segs[i];
                buf += seg.value || evalExpr(seg, data, owner);
            }
            return buf;
    }

    return value;
}
956307
function (dt) {
/*Line 337 - 'Atom.js' */        var m = dt.getMonth() + 1;
/*Line 338 - 'Atom.js' */        var y = dt.getFullYear();
/*Line 339 - 'Atom.js' */        var d = dt.getDate();

/*Line 341 - 'Atom.js' */        var str = "";
/*Line 342 - 'Atom.js' */        str +=  ((m > 9) ? m : ("0" + m));
/*Line 343 - 'Atom.js' */        str += "/" + ((d > 9) ? d : ("0" + d));
/*Line 344 - 'Atom.js' */        str += "/" + y;
/*Line 345 - 'Atom.js' */        return str;
/*Line 346 - 'Atom.js' */    }
4621
def prop atom
      val, format, nitems = prop_raw atom
      case format
      when 32; val.unpack("l!#{nitems}")
      when 16; val.unpack("s#{nitems}")
      when 8; val[0, nitems]
      when 0; nil
      end
    end
742075
function expression(rbp, initial) {
    var left, isArray = false, isObject = false, isLetExpr = false;

    // if current expression is a let expression
    if (!initial && state.tokens.next.value === "let" && peek(0).value === "(") {
      if (!state.option.inMoz(true)) {
        warning("W118", state.tokens.next, "let expressions");
      }
      isLetExpr = true;
      // create a new block scope we use only for the current expression
      funct["(blockscope)"].stack();
      advance("let");
      advance("(");
      state.syntax["let"].fud.call(state.syntax["let"].fud, false);
      advance(")");
    }

    if (state.tokens.next.id === "(end)")
      error("E006", state.tokens.curr);

    var isDangerous =
      state.option.asi &&
      state.tokens.prev.line < state.tokens.curr.line &&
      _.contains(["]", ")"], state.tokens.prev.id) &&
      _.contains(["[", "("], state.tokens.curr.id);

    if (isDangerous)
      warning("W014", state.tokens.curr, state.tokens.curr.id);

    advance();

    if (initial) {
      anonname = "anonymous";
      funct["(verb)"] = state.tokens.curr.value;
    }

    if (initial === true && state.tokens.curr.fud) {
      left = state.tokens.curr.fud();
    } else {
      if (state.tokens.curr.nud) {
        left = state.tokens.curr.nud();
      } else {
        error("E030", state.tokens.curr, state.tokens.curr.id);
      }

      while (rbp < state.tokens.next.lbp && !isEndOfExpr()) {
        isArray = state.tokens.curr.value === "Array";
        isObject = state.tokens.curr.value === "Object";

        // #527, new Foo.Array(), Foo.Array(), new Foo.Object(), Foo.Object()
        // Line breaks in IfStatement heads exist to satisfy the checkJSHint
        // "Line too long." error.
        if (left && (left.value || (left.first && left.first.value))) {
          // If the left.value is not "new", or the left.first.value is a "."
          // then safely assume that this is not "new Array()" and possibly
          // not "new Object()"...
          if (left.value !== "new" ||
            (left.first && left.first.value && left.first.value === ".")) {
            isArray = false;
            // ...In the case of Object, if the left.value and state.tokens.curr.value
            // are not equal, then safely assume that this not "new Object()"
            if (left.value !== state.tokens.curr.value) {
              isObject = false;
            }
          }
        }

        advance();

        if (isArray && state.tokens.curr.id === "(" && state.tokens.next.id === ")") {
          warning("W009", state.tokens.curr);
        }

        if (isObject && state.tokens.curr.id === "(" && state.tokens.next.id === ")") {
          warning("W010", state.tokens.curr);
        }

        if (left && state.tokens.curr.led) {
          left = state.tokens.curr.led(left);
        } else {
          error("E033", state.tokens.curr, state.tokens.curr.id);
        }
      }
    }
    if (isLetExpr) {
      funct["(blockscope)"].unstack();
    }
    return left;
  }
955540
function atom() {
        return wrap('atom', and(colwsp(opt(cfws)), star(atext, 1), colwsp(opt(cfws)))());
    }
665646
def p_expr_noin(self, p):
        
        if len(p) == 2:
            p[0] = p[1]
        else:
            p[0] = ast.Comma(left=p[1], right=p[3])
1133383
def dr( self, atom1, atom2 ):
        
        return self.cell.dr( atom1.r, atom2.r )
1160518
@SuppressWarnings("unchecked")
	public Expr translateExpression(WyilFile.Expr expr, Integer selector, LocalEnvironment environment) {
		Expr result;
		try {
			switch (expr.getOpcode()) {
			case WyilFile.EXPR_constant:
				result = translateConstant((WyilFile.Expr.Constant) expr, environment);
				break;
			case WyilFile.EXPR_cast:
				result = translateConvert((WyilFile.Expr.Cast) expr, environment);
				break;
			case WyilFile.EXPR_recordaccess:
			case WyilFile.EXPR_recordborrow:
				result = translateFieldLoad((WyilFile.Expr.RecordAccess) expr, environment);
				break;
			case WyilFile.EXPR_indirectinvoke:
				result = translateIndirectInvoke((WyilFile.Expr.IndirectInvoke) expr, environment);
				break;
			case WyilFile.EXPR_invoke:
				result = translateInvoke((WyilFile.Expr.Invoke) expr, selector, environment);
				break;
			case WyilFile.DECL_lambda:
				result = translateLambda((WyilFile.Decl.Lambda) expr, environment);
				break;
			case WyilFile.EXPR_lambdaaccess:
				result = translateLambda((WyilFile.Expr.LambdaAccess) expr, environment);
				break;
			case WyilFile.EXPR_logicalexistential:
			case WyilFile.EXPR_logicaluniversal:
				result = translateQuantifier((WyilFile.Expr.Quantifier) expr, environment);
				break;
			case WyilFile.EXPR_variablemove:
			case WyilFile.EXPR_variablecopy:
				result = translateVariableAccess((WyilFile.Expr.VariableAccess) expr, environment);
				break;
			case WyilFile.EXPR_staticvariable:
				result = translateStaticVariableAccess((WyilFile.Expr.StaticVariableAccess) expr, environment);
				break;
			case WyilFile.EXPR_logicalnot:
				result = translateNotOperator((WyilFile.Expr.LogicalNot) expr, environment);
				break;
			case WyilFile.EXPR_integernegation:
				result = translateArithmeticNegation((WyilFile.Expr.IntegerNegation) expr, environment);
				break;
			case WyilFile.EXPR_integeraddition:
			case WyilFile.EXPR_integersubtraction:
			case WyilFile.EXPR_integermultiplication:
			case WyilFile.EXPR_integerdivision:
			case WyilFile.EXPR_integerremainder:
			case WyilFile.EXPR_equal:
			case WyilFile.EXPR_notequal:
			case WyilFile.EXPR_integerlessthan:
			case WyilFile.EXPR_integerlessequal:
			case WyilFile.EXPR_integergreaterthan:
			case WyilFile.EXPR_integergreaterequal:
			case WyilFile.EXPR_logiaclimplication:
			case WyilFile.EXPR_logicaliff:
				result = translateBinaryOperator((WyilFile.Expr.BinaryOperator) expr, environment);
				break;
			case WyilFile.EXPR_logicaland:
			case WyilFile.EXPR_logicalor:
				result = translateNaryOperator((WyilFile.Expr.NaryOperator) expr, environment);
				break;
			case WyilFile.EXPR_is:
				result = translateIs((WyilFile.Expr.Is) expr, environment);
				break;
			case WyilFile.EXPR_arrayaccess:
			case WyilFile.EXPR_arrayborrow:
				result = translateArrayIndex((WyilFile.Expr.ArrayAccess) expr, environment);
				break;
			case WyilFile.EXPR_arrayinitialiser:
				result = translateArrayInitialiser((WyilFile.Expr.ArrayInitialiser) expr, environment);
				break;
			case WyilFile.EXPR_arraygenerator:
				result = translateArrayGenerator((WyilFile.Expr.ArrayGenerator) expr, environment);
				break;
			case WyilFile.EXPR_recordinitialiser:
				result = translateRecordInitialiser((WyilFile.Expr.RecordInitialiser) expr, environment);
				break;
			case WyilFile.EXPR_arraylength:
				result = translateArrayLength((WyilFile.Expr.ArrayLength) expr, environment);
				break;
			case WyilFile.EXPR_dereference:
				result = translateDereference((WyilFile.Expr.Dereference) expr, environment);
				break;
			case WyilFile.EXPR_bitwiseshr:
			case WyilFile.EXPR_bitwiseshl:
			case WyilFile.EXPR_bitwiseand:
			case WyilFile.EXPR_bitwiseor:
			case WyilFile.EXPR_bitwisexor:
			case WyilFile.EXPR_bitwisenot:
			case WyilFile.EXPR_new:
				result = translateAsUnknown(expr, environment);
				break;
			default:
				throw new RuntimeException("Deadcode reached (" + expr.getClass().getName() + ")");
			}
		} catch (SyntacticException e) {
			throw e;
		} catch (Throwable e) {
			throw new SyntacticException(e.getMessage(), ((WyilFile) expr.getHeap()).getEntry(), expr, e);
		}
		return allocate(result, expr.getParent(WyilFile.Attribute.Span.class));
	}
234783
function atom(type, actionParams) {
  var getNewState = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : assignData;

  if (typeof actionParams === 'function') {
    return (0, _createAtom2.default)({
      type: type,
      getNewState: actionParams
    });
  }

  return (0, _createAtom2.default)({
    type: type,
    actionParams: actionParams,
    getNewState: getNewState
  });
}