Package org.apache.felix.gogo.runtime
Class Parser
- java.lang.Object
-
- org.apache.felix.gogo.runtime.Parser
-
public class Parser extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Parser.Array
[ a b ...] [ k1=v1 k2=v2 ...]static class
Parser.Closure
{ program }static class
Parser.Executable
static class
Parser.Operator
static class
Parser.Pipeline
token1 | token2 | ...static class
Parser.Program
pipe1 ; pipe2 ; ...static class
Parser.Sequence
( program )static class
Parser.Statement
-
Field Summary
Fields Modifier and Type Field Description protected LinkedList<String>
stack
protected List<Parser.Statement>
statements
protected List<org.apache.felix.gogo.runtime.Token>
tokens
protected org.apache.felix.gogo.runtime.Tokenizer
tz
-
Constructor Summary
Constructors Constructor Description Parser(CharSequence line)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Parser.Array
array()
Parser.Closure
closure()
protected org.apache.felix.gogo.runtime.Token
end(String str)
protected org.apache.felix.gogo.runtime.Token
expect(String str)
protected void
expectNotNull()
protected org.apache.felix.gogo.runtime.Token
next()
Parser.Program
program()
protected void
push(org.apache.felix.gogo.runtime.Token t)
Parser.Sequence
sequence()
protected org.apache.felix.gogo.runtime.Token
start(String str, String missing)
Parser.Statement
statement()
List<Parser.Statement>
statements()
List<org.apache.felix.gogo.runtime.Token>
tokens()
protected org.apache.felix.gogo.runtime.Token
whole(List<? extends org.apache.felix.gogo.runtime.Token> tokens, int index)
protected org.apache.felix.gogo.runtime.Token
whole(org.apache.felix.gogo.runtime.Token b, org.apache.felix.gogo.runtime.Token e)
-
-
-
Field Detail
-
tz
protected final org.apache.felix.gogo.runtime.Tokenizer tz
-
stack
protected final LinkedList<String> stack
-
tokens
protected final List<org.apache.felix.gogo.runtime.Token> tokens
-
statements
protected final List<Parser.Statement> statements
-
-
Constructor Detail
-
Parser
public Parser(CharSequence line)
-
-
Method Detail
-
tokens
public List<org.apache.felix.gogo.runtime.Token> tokens()
-
statements
public List<Parser.Statement> statements()
-
program
public Parser.Program program()
-
push
protected void push(org.apache.felix.gogo.runtime.Token t)
-
next
protected org.apache.felix.gogo.runtime.Token next()
-
sequence
public Parser.Sequence sequence()
-
closure
public Parser.Closure closure()
-
statement
public Parser.Statement statement()
-
array
public Parser.Array array()
-
expectNotNull
protected void expectNotNull()
-
end
protected org.apache.felix.gogo.runtime.Token end(String str)
-
expect
protected org.apache.felix.gogo.runtime.Token expect(String str)
-
whole
protected org.apache.felix.gogo.runtime.Token whole(List<? extends org.apache.felix.gogo.runtime.Token> tokens, int index)
-
whole
protected org.apache.felix.gogo.runtime.Token whole(org.apache.felix.gogo.runtime.Token b, org.apache.felix.gogo.runtime.Token e)
-
-