JJTParserState.smali

.class public Lorg/apache/commons/jexl3/parser/JJTParserState;
.super Ljava/lang/Object;
.source "SourceFile"


# instance fields
.field private marks:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation
.end field

.field private mk:I

.field private node_created:Z

.field private nodes:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lorg/apache/commons/jexl3/parser/Node;",
            ">;"
        }
    .end annotation
.end field

.field private sp:I


# direct methods
.method public constructor <init>()V
    .registers 2

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->nodes:Ljava/util/List;

    .line 3
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->marks:Ljava/util/List;

    const/4 v0, 0x0

    .line 4
    iput v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->sp:I

    .line 5
    iput v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->mk:I

    return-void
.end method


# virtual methods
.method public clearNodeScope(Lorg/apache/commons/jexl3/parser/Node;)V
    .registers 3

    .line 1
    :goto_0
    iget p1, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->sp:I

    iget v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->mk:I

    if-le p1, v0, :cond_a

    .line 2
    invoke-virtual {p0}, Lorg/apache/commons/jexl3/parser/JJTParserState;->popNode()Lorg/apache/commons/jexl3/parser/Node;

    goto :goto_0

    .line 3
    :cond_a
    iget-object p1, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->marks:Ljava/util/List;

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v0

    add-int/lit8 v0, v0, -0x1

    invoke-interface {p1, v0}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Ljava/lang/Integer;

    invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I

    move-result p1

    iput p1, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->mk:I

    return-void
.end method

.method public closeNodeScope(Lorg/apache/commons/jexl3/parser/Node;I)V
    .registers 6

    .line 1
    iget-object v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->marks:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    const/4 v2, 0x1

    sub-int/2addr v1, v2

    invoke-interface {v0, v1}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    iput v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->mk:I

    :goto_14
    add-int/lit8 v0, p2, -0x1

    if-lez p2, :cond_24

    .line 2
    invoke-virtual {p0}, Lorg/apache/commons/jexl3/parser/JJTParserState;->popNode()Lorg/apache/commons/jexl3/parser/Node;

    move-result-object p2

    .line 3
    invoke-interface {p2, p1}, Lorg/apache/commons/jexl3/parser/Node;->jjtSetParent(Lorg/apache/commons/jexl3/parser/Node;)V

    .line 4
    invoke-interface {p1, p2, v0}, Lorg/apache/commons/jexl3/parser/Node;->jjtAddChild(Lorg/apache/commons/jexl3/parser/Node;I)V

    move p2, v0

    goto :goto_14

    .line 5
    :cond_24
    invoke-interface {p1}, Lorg/apache/commons/jexl3/parser/Node;->jjtClose()V

    .line 6
    invoke-virtual {p0, p1}, Lorg/apache/commons/jexl3/parser/JJTParserState;->pushNode(Lorg/apache/commons/jexl3/parser/Node;)V

    .line 7
    iput-boolean v2, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->node_created:Z

    return-void
.end method

.method public closeNodeScope(Lorg/apache/commons/jexl3/parser/Node;Z)V
    .registers 6

    const/4 v0, 0x1

    if-eqz p2, :cond_33

    .line 8
    invoke-virtual {p0}, Lorg/apache/commons/jexl3/parser/JJTParserState;->nodeArity()I

    move-result p2

    .line 9
    iget-object v1, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->marks:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v2

    sub-int/2addr v2, v0

    invoke-interface {v1, v2}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/Integer;

    invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I

    move-result v1

    iput v1, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->mk:I

    :goto_1a
    add-int/lit8 v1, p2, -0x1

    if-lez p2, :cond_2a

    .line 10
    invoke-virtual {p0}, Lorg/apache/commons/jexl3/parser/JJTParserState;->popNode()Lorg/apache/commons/jexl3/parser/Node;

    move-result-object p2

    .line 11
    invoke-interface {p2, p1}, Lorg/apache/commons/jexl3/parser/Node;->jjtSetParent(Lorg/apache/commons/jexl3/parser/Node;)V

    .line 12
    invoke-interface {p1, p2, v1}, Lorg/apache/commons/jexl3/parser/Node;->jjtAddChild(Lorg/apache/commons/jexl3/parser/Node;I)V

    move p2, v1

    goto :goto_1a

    .line 13
    :cond_2a
    invoke-interface {p1}, Lorg/apache/commons/jexl3/parser/Node;->jjtClose()V

    .line 14
    invoke-virtual {p0, p1}, Lorg/apache/commons/jexl3/parser/JJTParserState;->pushNode(Lorg/apache/commons/jexl3/parser/Node;)V

    .line 15
    iput-boolean v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->node_created:Z

    goto :goto_49

    .line 16
    :cond_33
    iget-object p1, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->marks:Ljava/util/List;

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result p2

    sub-int/2addr p2, v0

    invoke-interface {p1, p2}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Ljava/lang/Integer;

    invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I

    move-result p1

    iput p1, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->mk:I

    const/4 p1, 0x0

    .line 17
    iput-boolean p1, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->node_created:Z

    :goto_49
    return-void
.end method

.method public nodeArity()I
    .registers 3

    iget v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->sp:I

    iget v1, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->mk:I

    sub-int/2addr v0, v1

    return v0
.end method

.method public nodeCreated()Z
    .registers 2

    iget-boolean v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->node_created:Z

    return v0
.end method

.method public openNodeScope(Lorg/apache/commons/jexl3/parser/Node;)V
    .registers 4

    .line 1
    iget-object v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->marks:Ljava/util/List;

    iget v1, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->mk:I

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 2
    iget v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->sp:I

    iput v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->mk:I

    .line 3
    invoke-interface {p1}, Lorg/apache/commons/jexl3/parser/Node;->jjtOpen()V

    return-void
.end method

.method public peekNode()Lorg/apache/commons/jexl3/parser/Node;
    .registers 3

    iget-object v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->nodes:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lorg/apache/commons/jexl3/parser/Node;

    return-object v0
.end method

.method public popNode()Lorg/apache/commons/jexl3/parser/Node;
    .registers 3

    .line 1
    iget v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->sp:I

    add-int/lit8 v0, v0, -0x1

    iput v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->sp:I

    iget v1, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->mk:I

    if-ge v0, v1, :cond_1e

    .line 2
    iget-object v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->marks:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    invoke-interface {v0, v1}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    iput v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->mk:I

    .line 3
    :cond_1e
    iget-object v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->nodes:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    invoke-interface {v0, v1}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lorg/apache/commons/jexl3/parser/Node;

    return-object v0
.end method

.method public pushNode(Lorg/apache/commons/jexl3/parser/Node;)V
    .registers 3

    .line 1
    iget-object v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->nodes:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 2
    iget p1, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->sp:I

    add-int/lit8 p1, p1, 0x1

    iput p1, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->sp:I

    return-void
.end method

.method public reset()V
    .registers 2

    .line 1
    iget-object v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->nodes:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    .line 2
    iget-object v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->marks:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    const/4 v0, 0x0

    .line 3
    iput v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->sp:I

    .line 4
    iput v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->mk:I

    return-void
.end method

.method public rootNode()Lorg/apache/commons/jexl3/parser/Node;
    .registers 3

    iget-object v0, p0, Lorg/apache/commons/jexl3/parser/JJTParserState;->nodes:Ljava/util/List;

    const/4 v1, 0x0

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lorg/apache/commons/jexl3/parser/Node;

    return-object v0
.end method