Package org.jacop.fz
Class Parser
- java.lang.Object
-
- org.jacop.fz.Parser
-
- All Implemented Interfaces:
ParserConstants
,ParserTreeConstants
public class Parser extends java.lang.Object implements ParserTreeConstants, ParserConstants
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
Parser.JJCalls
private static class
Parser.LookaheadSuccess
-
Field Summary
Fields Modifier and Type Field Description (package private) Constraints
cc
(package private) VariablesParameters
cg
(package private) Tables
dict
private Parser.JJCalls[]
jj_2_rtns
private int
jj_endpos
private java.util.List<int[]>
jj_expentries
private int[]
jj_expentry
private int
jj_gc
private int
jj_gen
(package private) SimpleCharStream
jj_input_stream
private int
jj_kind
private int
jj_la
private int[]
jj_la1
private static int[]
jj_la1_0
private static int[]
jj_la1_1
private Token
jj_lastpos
private int[]
jj_lasttokens
private Parser.LookaheadSuccess
jj_ls
Token
jj_nt
Next token.private int
jj_ntk
private boolean
jj_rescan
private Token
jj_scanpos
protected JJTParserState
jjtree
(package private) Options
options
(package private) Solve
solver
(package private) Store
store
Token
token
Current token.ParserTokenManager
token_source
Generated Token Manager.private boolean
trace_enabled
private int
trace_indent
-
Fields inherited from interface org.jacop.fz.ParserConstants
ARRAY, ASGN, BOOL, COLON, COLONCOLON, COMMA, CONSTRAINT, DEFAULT, DOTDOT, EOF, FALSE, FLOAT, FLOAT_LITERAL, IDENT, INT, INT_LITERAL, LB, LBOX, LP, MAXIMIZE, MINIMIZE, OF, OUTPUT, PREDICATE, RB, RBOX, RP, SATISFY, SC, SET, SHOW, SHOW_COND, SINGLE_LINE_COMMENT, SOLVE, STRING_LITERAL, tokenImage, TRUE, VAR
-
Fields inherited from interface org.jacop.fz.ParserTreeConstants
JJTANNEXPR, JJTANNOTATION, JJTARRAYLITERAL, JJTBOOLTIEXPRTAIL, JJTCONSTELEM, JJTCONSTRAINT, JJTCONSTRAINTITEMS, JJTFLOATTIEXPRTAIL, JJTINTFLATEXPR, JJTINTLITERALS, JJTINTTIEXPRTAIL, JJTMODEL, JJTMODELEND, jjtNodeName, JJTSCALARFLATEXPR, JJTSETLITERAL, JJTSETTIEXPRTAIL, JJTSOLVEEXPR, JJTSOLVEITEM, JJTSOLVEKIND, JJTVARDECLITEM, JJTVARDECLITEMS, JJTVARIABLEEXPR, JJTVOID
-
-
Constructor Summary
Constructors Constructor Description Parser(java.io.InputStream stream)
Constructor with InputStream.Parser(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encodingParser(java.io.Reader stream)
Constructor.Parser(ParserTokenManager tm)
Constructor with generated Token Manager.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
ann_expr()
void
ann_exprs()
void
annotation()
void
annotations()
ArrayAccess
array_access_expr()
void
array_decl_tail(ASTVarDeclItem v)
void
array_literal()
Token
bool_literal()
void
bool_ti_expr_tail()
void
constraint_elem()
void
constraint_item()
void
constraint_items()
void
disable_tracing()
Disable tracing.void
enable_tracing()
Enable tracing.void
flat_expr()
void
flat_exprs()
void
float_ti_expr_tail()
ParseException
generateParseException()
Generate ParseException.Token
getNextToken()
Get the next Token.(package private) Store
getStore()
(package private) Tables
getTables()
Token
getToken(int index)
Get the specific Token.Token
ident_anns()
void
int_flat_expr()
int
int_index_expr()
void
int_literals()
void
int_ti_expr_tail()
private boolean
jj_2_1(int xla)
private boolean
jj_2_2(int xla)
private boolean
jj_2_3(int xla)
private boolean
jj_2_4(int xla)
private boolean
jj_2_5(int xla)
private boolean
jj_2_6(int xla)
private boolean
jj_2_7(int xla)
private boolean
jj_2_8(int xla)
private boolean
jj_2_9(int xla)
private boolean
jj_3_1()
private boolean
jj_3_2()
private boolean
jj_3_3()
private boolean
jj_3_4()
private boolean
jj_3_5()
private boolean
jj_3_6()
private boolean
jj_3_7()
private boolean
jj_3_8()
private boolean
jj_3_9()
private boolean
jj_3R_15()
private boolean
jj_3R_16()
private boolean
jj_3R_17()
private boolean
jj_3R_18()
private boolean
jj_3R_19()
private boolean
jj_3R_20()
private boolean
jj_3R_21()
private boolean
jj_3R_22()
private boolean
jj_3R_23()
private boolean
jj_3R_24()
private boolean
jj_3R_25()
private boolean
jj_3R_26()
private boolean
jj_3R_27()
private boolean
jj_3R_28()
private boolean
jj_3R_29()
private boolean
jj_3R_30()
private boolean
jj_3R_31()
private boolean
jj_3R_32()
private boolean
jj_3R_33()
private boolean
jj_3R_34()
private boolean
jj_3R_35()
private boolean
jj_3R_36()
private boolean
jj_3R_37()
private boolean
jj_3R_38()
private boolean
jj_3R_39()
private boolean
jj_3R_40()
private boolean
jj_3R_41()
private boolean
jj_3R_42()
private boolean
jj_3R_43()
private boolean
jj_3R_44()
private boolean
jj_3R_45()
private boolean
jj_3R_46()
private boolean
jj_3R_47()
private boolean
jj_3R_48()
private boolean
jj_3R_49()
private boolean
jj_3R_50()
private void
jj_add_error_token(int kind, int pos)
private Token
jj_consume_token(int kind)
private static void
jj_la1_init_0()
private static void
jj_la1_init_1()
private int
jj_ntk_f()
private void
jj_rescan_token()
private void
jj_save(int index, int xla)
private boolean
jj_scan_token(int kind)
void
model()
GRAMMER STARTSvoid
model_end()
void
non_array_flat_expr()
void
non_array_flat_exprs()
void
non_array_ti_expr_tail()
void
output_elem()
void
output_elems()
void
output_item()
void
pred_arg_array_index()
void
pred_arg_array_tail()
void
pred_decl_arg()
void
pred_decl_args()
void
pred_decl_item()
void
pred_decl_items()
void
ReInit(java.io.InputStream stream)
Reinitialise.void
ReInit(java.io.InputStream stream, java.lang.String encoding)
Reinitialise.void
ReInit(java.io.Reader stream)
Reinitialise.void
ReInit(ParserTokenManager tm)
Reinitialise.void
scalar_flat_expr()
void
scalar_flat_exprs()
void
scalar_ti_expr_tail()
void
set_literal()
void
set_ti_expr_tail()
(package private) void
setOptions(Options opt)
void
solve_expr()
void
solve_item()
void
solve_kind()
boolean
trace_enabled()
Trace enabled.void
var_decl_item()
void
var_decl_items()
void
variable_expr()
-
-
-
Field Detail
-
jjtree
protected JJTParserState jjtree
-
store
Store store
-
dict
Tables dict
-
cg
VariablesParameters cg
-
cc
Constraints cc
-
solver
Solve solver
-
options
Options options
-
token_source
public ParserTokenManager token_source
Generated Token Manager.
-
jj_input_stream
SimpleCharStream jj_input_stream
-
token
public Token token
Current token.
-
jj_nt
public Token jj_nt
Next token.
-
jj_ntk
private int jj_ntk
-
jj_scanpos
private Token jj_scanpos
-
jj_lastpos
private Token jj_lastpos
-
jj_la
private int jj_la
-
jj_gen
private int jj_gen
-
jj_la1
private final int[] jj_la1
-
jj_la1_0
private static int[] jj_la1_0
-
jj_la1_1
private static int[] jj_la1_1
-
jj_2_rtns
private final Parser.JJCalls[] jj_2_rtns
-
jj_rescan
private boolean jj_rescan
-
jj_gc
private int jj_gc
-
jj_ls
private final Parser.LookaheadSuccess jj_ls
-
jj_expentries
private java.util.List<int[]> jj_expentries
-
jj_expentry
private int[] jj_expentry
-
jj_kind
private int jj_kind
-
jj_lasttokens
private int[] jj_lasttokens
-
jj_endpos
private int jj_endpos
-
trace_indent
private int trace_indent
-
trace_enabled
private boolean trace_enabled
-
-
Constructor Detail
-
Parser
public Parser(java.io.InputStream stream)
Constructor with InputStream.
-
Parser
public Parser(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encoding
-
Parser
public Parser(java.io.Reader stream)
Constructor.
-
Parser
public Parser(ParserTokenManager tm)
Constructor with generated Token Manager.
-
-
Method Detail
-
setOptions
void setOptions(Options opt)
-
getStore
Store getStore()
-
getTables
Tables getTables()
-
model
public final void model() throws ParseException
GRAMMER STARTS- Throws:
ParseException
-
pred_decl_items
public final void pred_decl_items() throws ParseException
- Throws:
ParseException
-
var_decl_items
public final void var_decl_items() throws ParseException
- Throws:
ParseException
-
constraint_items
public final void constraint_items() throws ParseException
- Throws:
ParseException
-
model_end
public final void model_end() throws ParseException
- Throws:
ParseException
-
pred_decl_item
public final void pred_decl_item() throws ParseException
- Throws:
ParseException
-
var_decl_item
public final void var_decl_item() throws ParseException
- Throws:
ParseException
-
array_decl_tail
public final void array_decl_tail(ASTVarDeclItem v) throws ParseException
- Throws:
ParseException
-
ident_anns
public final Token ident_anns() throws ParseException
- Throws:
ParseException
-
constraint_item
public final void constraint_item() throws ParseException
- Throws:
ParseException
-
constraint_elem
public final void constraint_elem() throws ParseException
- Throws:
ParseException
-
solve_item
public final void solve_item() throws ParseException
- Throws:
ParseException
-
solve_kind
public final void solve_kind() throws ParseException
- Throws:
ParseException
-
output_item
public final void output_item() throws ParseException
- Throws:
ParseException
-
output_elems
public final void output_elems() throws ParseException
- Throws:
ParseException
-
output_elem
public final void output_elem() throws ParseException
- Throws:
ParseException
-
pred_decl_args
public final void pred_decl_args() throws ParseException
- Throws:
ParseException
-
pred_decl_arg
public final void pred_decl_arg() throws ParseException
- Throws:
ParseException
-
pred_arg_array_index
public final void pred_arg_array_index() throws ParseException
- Throws:
ParseException
-
pred_arg_array_tail
public final void pred_arg_array_tail() throws ParseException
- Throws:
ParseException
-
non_array_ti_expr_tail
public final void non_array_ti_expr_tail() throws ParseException
- Throws:
ParseException
-
scalar_ti_expr_tail
public final void scalar_ti_expr_tail() throws ParseException
- Throws:
ParseException
-
bool_ti_expr_tail
public final void bool_ti_expr_tail() throws ParseException
- Throws:
ParseException
-
int_ti_expr_tail
public final void int_ti_expr_tail() throws ParseException
- Throws:
ParseException
-
float_ti_expr_tail
public final void float_ti_expr_tail() throws ParseException
- Throws:
ParseException
-
set_ti_expr_tail
public final void set_ti_expr_tail() throws ParseException
- Throws:
ParseException
-
ann_exprs
public final void ann_exprs() throws ParseException
- Throws:
ParseException
-
ann_expr
public final void ann_expr() throws ParseException
- Throws:
ParseException
-
flat_exprs
public final void flat_exprs() throws ParseException
- Throws:
ParseException
-
flat_expr
public final void flat_expr() throws ParseException
- Throws:
ParseException
-
non_array_flat_exprs
public final void non_array_flat_exprs() throws ParseException
- Throws:
ParseException
-
non_array_flat_expr
public final void non_array_flat_expr() throws ParseException
- Throws:
ParseException
-
scalar_flat_exprs
public final void scalar_flat_exprs() throws ParseException
- Throws:
ParseException
-
scalar_flat_expr
public final void scalar_flat_expr() throws ParseException
- Throws:
ParseException
-
int_flat_expr
public final void int_flat_expr() throws ParseException
- Throws:
ParseException
-
variable_expr
public final void variable_expr() throws ParseException
- Throws:
ParseException
-
solve_expr
public final void solve_expr() throws ParseException
- Throws:
ParseException
-
array_access_expr
public final ArrayAccess array_access_expr() throws ParseException
- Throws:
ParseException
-
int_index_expr
public final int int_index_expr() throws ParseException
- Throws:
ParseException
-
bool_literal
public final Token bool_literal() throws ParseException
- Throws:
ParseException
-
int_literals
public final void int_literals() throws ParseException
- Throws:
ParseException
-
set_literal
public final void set_literal() throws ParseException
- Throws:
ParseException
-
array_literal
public final void array_literal() throws ParseException
- Throws:
ParseException
-
annotations
public final void annotations() throws ParseException
- Throws:
ParseException
-
annotation
public final void annotation() throws ParseException
- Throws:
ParseException
-
jj_2_1
private boolean jj_2_1(int xla)
-
jj_2_2
private boolean jj_2_2(int xla)
-
jj_2_3
private boolean jj_2_3(int xla)
-
jj_2_4
private boolean jj_2_4(int xla)
-
jj_2_5
private boolean jj_2_5(int xla)
-
jj_2_6
private boolean jj_2_6(int xla)
-
jj_2_7
private boolean jj_2_7(int xla)
-
jj_2_8
private boolean jj_2_8(int xla)
-
jj_2_9
private boolean jj_2_9(int xla)
-
jj_3R_20
private boolean jj_3R_20()
-
jj_3R_19
private boolean jj_3R_19()
-
jj_3R_49
private boolean jj_3R_49()
-
jj_3R_15
private boolean jj_3R_15()
-
jj_3_5
private boolean jj_3_5()
-
jj_3R_41
private boolean jj_3R_41()
-
jj_3R_33
private boolean jj_3R_33()
-
jj_3R_40
private boolean jj_3R_40()
-
jj_3R_28
private boolean jj_3R_28()
-
jj_3R_27
private boolean jj_3R_27()
-
jj_3R_24
private boolean jj_3R_24()
-
jj_3R_18
private boolean jj_3R_18()
-
jj_3_4
private boolean jj_3_4()
-
jj_3R_23
private boolean jj_3R_23()
-
jj_3R_42
private boolean jj_3R_42()
-
jj_3R_29
private boolean jj_3R_29()
-
jj_3R_38
private boolean jj_3R_38()
-
jj_3_1
private boolean jj_3_1()
-
jj_3R_37
private boolean jj_3R_37()
-
jj_3R_25
private boolean jj_3R_25()
-
jj_3R_36
private boolean jj_3R_36()
-
jj_3R_21
private boolean jj_3R_21()
-
jj_3R_35
private boolean jj_3R_35()
-
jj_3R_34
private boolean jj_3R_34()
-
jj_3R_32
private boolean jj_3R_32()
-
jj_3R_44
private boolean jj_3R_44()
-
jj_3R_31
private boolean jj_3R_31()
-
jj_3R_43
private boolean jj_3R_43()
-
jj_3R_39
private boolean jj_3R_39()
-
jj_3_9
private boolean jj_3_9()
-
jj_3_3
private boolean jj_3_3()
-
jj_3R_30
private boolean jj_3R_30()
-
jj_3R_17
private boolean jj_3R_17()
-
jj_3_8
private boolean jj_3_8()
-
jj_3R_16
private boolean jj_3R_16()
-
jj_3R_48
private boolean jj_3R_48()
-
jj_3R_50
private boolean jj_3R_50()
-
jj_3R_26
private boolean jj_3R_26()
-
jj_3R_46
private boolean jj_3R_46()
-
jj_3_7
private boolean jj_3_7()
-
jj_3_6
private boolean jj_3_6()
-
jj_3R_47
private boolean jj_3R_47()
-
jj_3R_45
private boolean jj_3R_45()
-
jj_3_2
private boolean jj_3_2()
-
jj_3R_22
private boolean jj_3R_22()
-
jj_la1_init_0
private static void jj_la1_init_0()
-
jj_la1_init_1
private static void jj_la1_init_1()
-
ReInit
public void ReInit(java.io.InputStream stream)
Reinitialise.
-
ReInit
public void ReInit(java.io.InputStream stream, java.lang.String encoding)
Reinitialise.
-
ReInit
public void ReInit(java.io.Reader stream)
Reinitialise.
-
ReInit
public void ReInit(ParserTokenManager tm)
Reinitialise.
-
jj_consume_token
private Token jj_consume_token(int kind) throws ParseException
- Throws:
ParseException
-
jj_scan_token
private boolean jj_scan_token(int kind)
-
getNextToken
public final Token getNextToken()
Get the next Token.
-
getToken
public final Token getToken(int index)
Get the specific Token.
-
jj_ntk_f
private int jj_ntk_f()
-
jj_add_error_token
private void jj_add_error_token(int kind, int pos)
-
generateParseException
public ParseException generateParseException()
Generate ParseException.
-
trace_enabled
public final boolean trace_enabled()
Trace enabled.
-
enable_tracing
public final void enable_tracing()
Enable tracing.
-
disable_tracing
public final void disable_tracing()
Disable tracing.
-
jj_rescan_token
private void jj_rescan_token()
-
jj_save
private void jj_save(int index, int xla)
-
-