use of org.eclipse.titan.designer.parsers.asn1parser.Asn1Parser in project titan.EclipsePlug-ins by eclipse.
the class ASN1_Set_Type method parseBlockSet.
/**
* Parses the block as if it were the block of a set.
*/
public void parseBlockSet() {
if (null == mBlock) {
return;
}
final Asn1Parser parser = BlockLevelTokenStreamTracker.getASN1ParserForBlock(mBlock);
if (null == parser) {
return;
}
components = parser.pr_special_ComponentTypeLists().list;
final List<SyntacticErrorStorage> errors = parser.getErrorStorage();
if (null != errors && !errors.isEmpty()) {
isErroneous = true;
components = null;
for (int i = 0; i < errors.size(); i++) {
ParserMarkerSupport.createOnTheFlyMixedMarker((IFile) mBlock.getLocation().getFile(), errors.get(i), IMarker.SEVERITY_ERROR);
}
}
if (components == null) {
isErroneous = true;
return;
}
components.setFullNameParent(this);
components.setMyScope(getMyScope());
components.setMyType(this);
}
use of org.eclipse.titan.designer.parsers.asn1parser.Asn1Parser in project titan.EclipsePlug-ins by eclipse.
the class ASN1_BitString_Type method parseBlockBitstring.
private void parseBlockBitstring() {
if (null == mBlock) {
return;
}
final Asn1Parser parser = BlockLevelTokenStreamTracker.getASN1ParserForBlock(mBlock);
if (null == parser) {
return;
}
namedValues = parser.pr_special_NamedBitList().namedValues;
final List<SyntacticErrorStorage> errors = parser.getErrorStorage();
if (null != errors && !errors.isEmpty()) {
isErroneous = true;
namedValues = null;
for (int i = 0; i < errors.size(); i++) {
ParserMarkerSupport.createOnTheFlyMixedMarker((IFile) mBlock.getLocation().getFile(), errors.get(i), IMarker.SEVERITY_ERROR);
}
}
if (namedValues != null) {
namedValues.setFullNameParent(this);
namedValues.setMyScope(getMyScope());
}
}
use of org.eclipse.titan.designer.parsers.asn1parser.Asn1Parser in project titan.EclipsePlug-ins by eclipse.
the class ASN1_Choice_Type method parseBlockChoice.
/**
* Parses the block as if it were the block of a choice.
*/
public void parseBlockChoice() {
if (null == mBlock) {
return;
}
final Asn1Parser parser = BlockLevelTokenStreamTracker.getASN1ParserForBlock(mBlock);
if (null == parser) {
return;
}
components = parser.pr_special_AlternativeTypeLists().list;
final List<SyntacticErrorStorage> errors = parser.getErrorStorage();
if (null != errors && !errors.isEmpty()) {
isErroneous = true;
components = null;
for (int i = 0; i < errors.size(); i++) {
ParserMarkerSupport.createOnTheFlyMixedMarker((IFile) mBlock.getLocation().getFile(), errors.get(i), IMarker.SEVERITY_ERROR);
}
}
if (components == null) {
isErroneous = true;
return;
}
components.setFullNameParent(this);
components.setMyScope(getMyScope());
components.setMyType(this);
}
use of org.eclipse.titan.designer.parsers.asn1parser.Asn1Parser in project titan.EclipsePlug-ins by eclipse.
the class ObjectClass_Definition method parseBlockFieldSpecs.
private void parseBlockFieldSpecs() {
if (null == fieldSpecsBlock) {
return;
}
final Asn1Parser parser = BlockLevelTokenStreamTracker.getASN1ParserForBlock(fieldSpecsBlock);
if (null == parser) {
return;
}
fieldSpecifications = parser.pr_special_FieldSpecList().fieldSpecifications;
final List<SyntacticErrorStorage> errors = parser.getErrorStorage();
if (null != errors && !errors.isEmpty()) {
fieldSpecifications = null;
for (int i = 0; i < errors.size(); i++) {
ParserMarkerSupport.createOnTheFlyMixedMarker((IFile) fieldSpecsBlock.getLocation().getFile(), errors.get(i), IMarker.SEVERITY_ERROR);
}
}
if (null == fieldSpecifications) {
isErroneous = true;
return;
}
fieldSpecifications.setFullNameParent(this);
fieldSpecifications.setMyObjectClass(this);
}
use of org.eclipse.titan.designer.parsers.asn1parser.Asn1Parser in project titan.EclipsePlug-ins by eclipse.
the class ObjectClassSyntax_Builder method visitSequence.
public void visitSequence(final ObjectClassSyntax_sequence parameter) {
if (parameter.getIsBuilded()) {
return;
}
final Asn1Parser parser = SyntaxLevelTokenStreamTracker.getASN1ParserForBlock(mBlock);
if (null == parser) {
return;
}
final List<ObjectClassSyntax_Node> nodes = parser.pr_special_ObjectClassSyntax_Builder(fieldSpecifications).nodes;
if (null != nodes) {
for (final ObjectClassSyntax_Node node : nodes) {
parameter.addNode(node);
}
}
final List<SyntacticErrorStorage> errors = parser.getErrorStorage();
if (null != errors && !errors.isEmpty()) {
for (int i = 0; i < errors.size(); i++) {
ParserMarkerSupport.createOnTheFlyMixedMarker((IFile) mBlock.getLocation().getFile(), errors.get(i), IMarker.SEVERITY_ERROR);
}
} else if (parameter.getIsOptional() && 0 == parameter.getNofNodes()) {
parameter.getLocation().reportSemanticError("Empty optional group is not allowed");
}
parameter.setIsBuilded(true);
parameter.trimToSize();
}
Aggregations