Examples of atomValue()


Examples of com.ericsson.otp.erlang.OtpErlangAtom.atomValue()

                    "all_loaded", "");
            final List<OtpErlangAtom> mine = new ArrayList<OtpErlangAtom>();
            for (final OtpErlangObject elem : loaded) {
                final OtpErlangTuple t = (OtpErlangTuple) elem;
                final OtpErlangAtom mod = (OtpErlangAtom) t.elementAt(0);
                if (mod.atomValue().startsWith("erlide_")) {
                    // ErlLogger.debug(">>> HAD " + mod + "   " +
                    // t.elementAt(1));
                    mine.add(mod);
                }
            }
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangAtom.atomValue()

        String cached = "reparsed";
        if (res != null && res.arity() > 2) {
            final OtpErlangObject res2 = res.elementAt(2);
            if (res2 instanceof OtpErlangAtom) {
                final OtpErlangAtom atom = (OtpErlangAtom) res2;
                cached = atom.atomValue();
            }
        }
        if (TRACE) {
            ErlLogger.debug("Parsed %d forms and %d comments (%s)",
                    forms != null ? forms.arity() : 0,
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangAtom.atomValue()

     *            the tuple, either function or attribute
     * @return
     */
    private IErlMember create(final IErlModule module, final OtpErlangTuple el) {
        final OtpErlangAtom type = (OtpErlangAtom) el.elementAt(0);
        final String typeS = type.atomValue();
        if ("error".equals(typeS)) {
            final OtpErlangTuple er = (OtpErlangTuple) el.elementAt(1);
            final String msg = helper.formatError(er);
            final ErlParserProblem e = ErlParserProblem.newError(module, msg);
            setPos(e, er.elementAt(0));
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangAtom.atomValue()

        final OtpErlangList parameters = (OtpErlangList) el.elementAt(4);
        final OtpErlangObject head = el.elementAt(5);
        final OtpErlangTuple namePos = (OtpErlangTuple) el.elementAt(7);
        ErlFunction f = null;
        final OtpErlangAtom exportedA = (OtpErlangAtom) el.elementAt(8);
        final boolean exported = Boolean.parseBoolean(exportedA.atomValue());
        try {
            f = new ErlFunction(module, name.atomValue(), arity.intValue(),
                    Util.stringValue(head), exported, parameters);
        } catch (final OtpErlangRangeException e) {
            return f;
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangAtom.atomValue()

        // final ErlAttribute a = new ErlAttribute(parent, nameS, val1, null);
        OtpErlangObject o = val;
        if (o instanceof OtpErlangAtom) {
            final OtpErlangAtom u = (OtpErlangAtom) o;
            if ("u".equals(u.atomValue())) {
                o = null;
            }
        }
        final ErlAttribute a = new ErlAttribute(module, nameS, o, Util.stringValue(extra));
        setPos(a, pos);
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangAtom.atomValue()

                    for (final OtpErlangObject o : fields) {
                        if (o instanceof OtpErlangTuple) {
                            final OtpErlangTuple fieldTuple = (OtpErlangTuple) o;
                            final OtpErlangAtom fieldNameAtom = (OtpErlangAtom) fieldTuple
                                    .elementAt(0);
                            final String fieldName = fieldNameAtom.atomValue();
                            final ErlRecordField field = new ErlRecordField(r, fieldName);
                            final OtpErlangTuple posTuple = (OtpErlangTuple) fieldTuple
                                    .elementAt(1);
                            if (fieldTuple.arity() > 2) {
                                final OtpErlangObject fieldExtra = fieldTuple
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangAtom.atomValue()

        final OtpErlangTuple t = (OtpErlangTuple) val;
        if (t.elementAt(0) instanceof OtpErlangAtom
                && t.elementAt(1) instanceof OtpErlangList) {
            final OtpErlangAtom importModule = (OtpErlangAtom) t.elementAt(0);
            final OtpErlangList functionList = (OtpErlangList) t.elementAt(1);
            final ErlImport imp = new ErlImport(module, importModule.atomValue(),
                    functionList);
            setPos(imp, pos);
            return imp;
        }
        return null;
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangAtom.atomValue()

    }

    @Test
    public void atom_1() throws TermParserException {
        final OtpErlangAtom r = (OtpErlangAtom) termParser.parse("hello");
        Assert.assertEquals(r.atomValue(), "hello");
    }

    @Test
    public void atom_2() throws TermParserException {
        final OtpErlangAtom r = (OtpErlangAtom) termParser.parse("hello   ");
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangAtom.atomValue()

    }

    @Test
    public void atom_2() throws TermParserException {
        final OtpErlangAtom r = (OtpErlangAtom) termParser.parse("hello   ");
        Assert.assertEquals(r.atomValue(), "hello");
    }

    @Test
    public void atom_3() throws TermParserException {
        final OtpErlangAtom r = (OtpErlangAtom) termParser.parse("   hello");
View Full Code Here

Examples of com.ericsson.otp.erlang.OtpErlangAtom.atomValue()

    }

    @Test
    public void atom_3() throws TermParserException {
        final OtpErlangAtom r = (OtpErlangAtom) termParser.parse("   hello");
        Assert.assertEquals(r.atomValue(), "hello");
    }

    @Test
    public void number_1() throws TermParserException {
        final OtpErlangLong r = (OtpErlangLong) termParser.parse("321");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.