Package xtc.lang.cpp

Examples of xtc.lang.cpp.Syntax.kind()


    @Override
    public LexerToken getNextToken() throws IOException {
        Stream lexer = getCurrentLexer().get(0);
        Syntax s = lexer.scan();
        while (s.kind() != Syntax.Kind.EOF) {
            if (s.kind() == Syntax.Kind.CONDITIONAL) {
                Syntax.Conditional c = s.toConditional();
                if (c.tag() == Syntax.ConditionalTag.START) {
                    stack.push(stack.peek().and(translate(c.presenceCondition())));
//                    System.out.println("#if " + stack.peek());
View Full Code Here


    @Override
    public LexerToken getNextToken() throws IOException {
        Stream lexer = getCurrentLexer().get(0);
        Syntax s = lexer.scan();
        while (s.kind() != Syntax.Kind.EOF) {
            if (s.kind() == Syntax.Kind.CONDITIONAL) {
                Syntax.Conditional c = s.toConditional();
                if (c.tag() == Syntax.ConditionalTag.START) {
                    stack.push(stack.peek().and(translate(c.presenceCondition())));
//                    System.out.println("#if " + stack.peek());
                } else if (c.tag() == Syntax.ConditionalTag.NEXT) {
View Full Code Here

//                    System.out.println("#endif");
                }
            }


            if (s.kind() == Syntax.Kind.CONDITIONAL)
                return new XtcToken(s, stack.peek());
            Boolean visible = stack.peek().isSatisfiable();
            if (visible) {
                if (s.kind() == Syntax.Kind.LANGUAGE)
                    return new XtcToken(s, stack.peek());
View Full Code Here

            if (s.kind() == Syntax.Kind.CONDITIONAL)
                return new XtcToken(s, stack.peek());
            Boolean visible = stack.peek().isSatisfiable();
            if (visible) {
                if (s.kind() == Syntax.Kind.LANGUAGE)
                    return new XtcToken(s, stack.peek());
                if (s.kind() == Syntax.Kind.LAYOUT)
                    return new XtcToken(s, stack.peek());
            }
View Full Code Here

                return new XtcToken(s, stack.peek());
            Boolean visible = stack.peek().isSatisfiable();
            if (visible) {
                if (s.kind() == Syntax.Kind.LANGUAGE)
                    return new XtcToken(s, stack.peek());
                if (s.kind() == Syntax.Kind.LAYOUT)
                    return new XtcToken(s, stack.peek());
            }

            s = lexer.scan();
        }
View Full Code Here

        Stack<FeatureExpr> stack = new Stack<FeatureExpr>();
        stack.push(FeatureExprFactory.True());
        for (Stream lexer : lexers) {
            Syntax s = lexer.scan();
            while (s.kind() != Syntax.Kind.EOF) {
                if (s.kind() == Syntax.Kind.CONDITIONAL) {
                    Syntax.Conditional c = s.toConditional();
                    if (c.tag() == Syntax.ConditionalTag.START)
                        stack.push(stack.peek().and(XtcPreprocessor.translate(c.presenceCondition())));
                    else if (c.tag() == Syntax.ConditionalTag.NEXT) {
View Full Code Here

        Stack<FeatureExpr> stack = new Stack<FeatureExpr>();
        stack.push(FeatureExprFactory.True());
        for (Stream lexer : lexers) {
            Syntax s = lexer.scan();
            while (s.kind() != Syntax.Kind.EOF) {
                if (s.kind() == Syntax.Kind.CONDITIONAL) {
                    Syntax.Conditional c = s.toConditional();
                    if (c.tag() == Syntax.ConditionalTag.START)
                        stack.push(stack.peek().and(XtcPreprocessor.translate(c.presenceCondition())));
                    else if (c.tag() == Syntax.ConditionalTag.NEXT) {
                        stack.pop();
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.