uk.ac.man.cs.rainbow.compiler.parser
Class Parser
java.lang.Object
|
+--uk.ac.man.cs.rainbow.compiler.parser.Parser
- All Implemented Interfaces:
- uk.ac.man.cs.rainbow.compiler.parser.ParserConstants
- public class Parser
- extends Object
- implements uk.ac.man.cs.rainbow.compiler.parser.ParserConstants
Grammar processed using JavaCC .
Although the parser is generated as non-static,
it can currently only have one instance because some error-handling
goes via Errors.message
.
Warning! I have had to insert a new method into a file
generated by javacc:
Token.intValue
public int intValue() {
return (Integer.decode(image)).intValue();
}
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
token_source
public uk.ac.man.cs.rainbow.compiler.parser.ParserTokenManager token_source
token
public Token token
jj_nt
public Token jj_nt
lookingAhead
public boolean lookingAhead
EOF
public static final int EOF
COLON
public static final int COLON
LET
public static final int LET
END
public static final int END
SEMICOLON
public static final int SEMICOLON
BECOMES
public static final int BECOMES
RBRACKET
public static final int RBRACKET
END_LOOP
public static final int END_LOOP
END_CHOICE
public static final int END_CHOICE
END_SELECT
public static final int END_SELECT
DURING
public static final int DURING
END_SYNC
public static final int END_SYNC
DOLLAR
public static final int DOLLAR
ARROW
public static final int ARROW
BARS
public static final int BARS
CHEVRON
public static final int CHEVRON
BAR_CHEVRON
public static final int BAR_CHEVRON
CLOSE_CURLY
public static final int CLOSE_CURLY
SPLIT
public static final int SPLIT
END_SPLIT
public static final int END_SPLIT
MERGE
public static final int MERGE
END_MERGE
public static final int END_MERGE
END_ARBITRATE
public static final int END_ARBITRATE
OF
public static final int OF
OTHERWISE
public static final int OTHERWISE
END_CASE
public static final int END_CASE
END_FOR
public static final int END_FOR
THEN
public static final int THEN
ELSE
public static final int ELSE
END_IF
public static final int END_IF
DO
public static final int DO
END_WHILE
public static final int END_WHILE
NUMBER
public static final int NUMBER
ID
public static final int ID
DEFAULT
public static final int DEFAULT
tokenImage
public static final String[] tokenImage
Parser
public Parser(InputStream stream)
Parser
public Parser(uk.ac.man.cs.rainbow.compiler.parser.ParserTokenManager tm)
parse
public Program parse(Errors e)
throws ParseException
qualified_name
public final Identifier qualified_name(ParseContext context)
throws ParseException
ids
public final LocalIdentifier ids(ParseContext context)
throws ParseException
boolean_constant
public final Expression boolean_constant(ParseContext context)
throws ParseException
program
public final Program program(ParseContext context)
throws ParseException
decl_global
public final GlobalDeclaration decl_global(ParseContext context)
throws ParseException
value_decl
public final ValueBinding value_decl(ParseContext context)
throws ParseException
local_y_decl
public final LocalDeclaration local_y_decl(ParseContext context)
throws ParseException
chan_decl
public final ChannelDeclaration chan_decl(ParseContext context)
throws ParseException
type
public final CompilerType type(ParseContext context)
throws ParseException
tagtype
public final TaggedType tagtype(ParseContext context)
throws ParseException
field
public final TaggedType field(ParseContext context)
throws ParseException
expression
public final Expression expression(ParseContext context)
throws ParseException
exp9
public final Expression exp9(ParseContext context)
throws ParseException
exp10
public final Expression exp10(ParseContext context)
throws ParseException
exp11
public final Expression exp11(ParseContext context)
throws ParseException
exp12
public final Expression exp12(ParseContext context)
throws ParseException
exp13
public final Expression exp13(ParseContext context)
throws ParseException
exp14
public final Expression exp14(ParseContext context)
throws ParseException
exp15
public final Expression exp15(ParseContext context)
throws ParseException
exp16
public final Expression exp16(ParseContext context)
throws ParseException
exp17
public final Expression exp17(ParseContext context)
throws ParseException
exp19
public final Expression exp19(ParseContext context)
throws ParseException
exp_atom
public final Expression exp_atom(ParseContext context)
throws ParseException
guard_expr
public final GuardExp guard_expr(ParseContext context)
throws ParseException
t_signature
public final Parameter t_signature(ParseContext context)
throws ParseException
p_signature
public final Parameter p_signature(ParseContext context)
throws ParseException
f_signature
public final FunctionSignature f_signature(ParseContext context)
throws ParseException
p_params
public final Parameter p_params(ParseContext context)
throws ParseException
t_params
public final Parameter t_params(ParseContext context)
throws ParseException
f_params
public final Parameter f_params(ParseContext context)
throws ParseException
block_y_body
public final YellowBlock block_y_body(ParseContext context)
throws ParseException
command_y
public final YellowCommand command_y(ParseContext context)
throws ParseException
guardedchoice
public final GuardedCommand guardedchoice(ParseContext context)
throws ParseException
synchronise
public final Sync synchronise(ParseContext context)
throws ParseException
ichannel_binding
public final InputChannelBinding ichannel_binding(ParseContext context)
throws ParseException
block_g_body
public final GreenBlock block_g_body(ParseContext context)
throws ParseException
network
public final PlainNetwork network(ParseContext context)
throws ParseException
pipe_separator
public final PipeEnds pipe_separator(ParseContext context)
throws ParseException
pipe_and_ends
public final Pipeline pipe_and_ends(ParseContext context)
throws ParseException
labelled_network
public final LabelledNetwork labelled_network(ParseContext context)
throws ParseException
pipeline
public final Pipeline pipeline(ParseContext context)
throws ParseException
table_body
public final TableBody table_body(ParseContext context)
throws ParseException
t_row
public final TableRow t_row(ParseContext context)
throws ParseException
i_pattern
public final InputPattern i_pattern(ParseContext context)
throws ParseException
simple_pattern
public final SimplePattern simple_pattern(ParseContext context)
throws ParseException
component_g
public final GreenComponent component_g(ParseContext context)
throws ParseException
ReInit
public void ReInit(InputStream stream)
ReInit
public void ReInit(uk.ac.man.cs.rainbow.compiler.parser.ParserTokenManager tm)
getNextToken
public final Token getNextToken()
getToken
public final Token getToken(int index)
generateParseException
public final ParseException generateParseException()
enable_tracing
public final void enable_tracing()
disable_tracing
public final void disable_tracing()