|
|
|
|
|
|
|
|
|
|
|
|
Re: Trying to generate DSL files using Java [message #1842081 is a reply to message #1842080] |
Tue, 08 June 2021 17:00 |
|
alternatively you can try to adapt serialization to deal with your very strange grammar
serializer = {
generateStub = true
}
public class MyDslSemanticSequencer extends AbstractMyDslSemanticSequencer {
@Inject MyDslGrammarAccess grammarAcess;
@Override
protected void sequence_Cstic(ISerializationContext context, Cstic semanticObject) {
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAcess.getCsticAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
if (semanticObject.getDesc() != null) {
feeder.accept(grammarAcess.getCsticAccess().getDescNameKeyword_3_0_0(), semanticObject.getDesc());
feeder.accept(grammarAcess.getCsticAccess().getNameSTRINGTerminalRuleCall_3_1_0(), semanticObject.getName());
}
feeder.finish();
}
}
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03687 seconds