blob: 5e8fe0501619a96c00576dfa8fe9687c6248035c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package bjc.rgens.parser.elements.vars;
import bjc.rgens.parser.GenerationState;
import bjc.rgens.parser.GrammarException;
import bjc.rgens.parser.Rule;
public class ARefVariableElement extends VariableElement {
public String value;
public ARefVariableElement(String val) {
super(false);
value = val;
}
public void generate(GenerationState state) {
Rule rl = state.findRuleVar(value, state);
GenerationState newState = state.newBuf();
rl.generate(newState);
String res = newState.contents.toString();
state.contents.append(res);
}
}
|