use of org.eclipse.titan.designer.parsers.asn1parser.Asn1Parser in project titan.EclipsePlug-ins by eclipse.
the class Ass_pard method check.
/**
* Pre-process the block of formal parameters into a list. This list
* together with actual parameters can be used to identify the
* assignments correctly.
*
* @param timestamp
* the timestamp of the actual semantic check cycle.
*/
public void check(final CompilationTimeStamp timestamp) {
if (null != lastTimeChecked && (!isErroneous || !lastTimeChecked.isLess(timestamp))) {
return;
}
lastTimeChecked = timestamp;
isErroneous = false;
if (null == mParameterList) {
isErroneous = true;
return;
}
if (null != mParameters) {
return;
}
final Asn1Parser parser = BlockLevelTokenStreamTracker.getASN1ParserForBlock(mParameterList);
mParameters = parser.pr_special_FormalParameterList().parameters;
final List<SyntacticErrorStorage> errors = parser.getErrorStorage();
if (null != errors && !errors.isEmpty()) {
mParameters = null;
for (int i = 0; i < errors.size(); i++) {
ParserMarkerSupport.createOnTheFlyMixedMarker((IFile) mParameterList.getLocation().getFile(), errors.get(i), IMarker.SEVERITY_ERROR);
}
}
if (null == mParameters) {
isErroneous = true;
} else {
mParameters.trimToSize();
}
}
use of org.eclipse.titan.designer.parsers.asn1parser.Asn1Parser in project titan.EclipsePlug-ins by eclipse.
the class ObjectClassSyntax_Parser method parseObject.
private ASN1Object parseObject() {
ASN1Object object = null;
if (mBlock != null) {
final Asn1Parser parser = BlockLevelTokenStreamTracker.getASN1ParserForBlock(mBlock, internalIndex);
if (parser != null) {
object = parser.pr_special_Object().object;
internalIndex += parser.nof_consumed_tokens();
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);
}
}
}
}
return object;
}
use of org.eclipse.titan.designer.parsers.asn1parser.Asn1Parser in project titan.EclipsePlug-ins by eclipse.
the class ObjectClassSyntax_Parser method parseObjectSet.
private ObjectSet parseObjectSet() {
ObjectSet objectSet = null;
if (mBlock != null) {
final Asn1Parser parser = BlockLevelTokenStreamTracker.getASN1ParserForBlock(mBlock, internalIndex);
if (parser != null) {
objectSet = parser.pr_special_ObjectSet().objectSet;
internalIndex += parser.nof_consumed_tokens();
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);
}
}
}
}
return objectSet;
}
use of org.eclipse.titan.designer.parsers.asn1parser.Asn1Parser in project titan.EclipsePlug-ins by eclipse.
the class ObjectClassSyntax_Parser method parseType.
private ASN1Type parseType() {
ASN1Type type = null;
if (mBlock != null) {
final Asn1Parser parser = BlockLevelTokenStreamTracker.getASN1ParserForBlock(mBlock, internalIndex);
if (parser != null) {
type = parser.pr_special_Type().type;
internalIndex += parser.nof_consumed_tokens();
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);
}
}
}
}
return type;
}
use of org.eclipse.titan.designer.parsers.asn1parser.Asn1Parser in project titan.EclipsePlug-ins by eclipse.
the class ObjectClassSyntax_Parser method parseValue.
private boolean parseValue() {
if (mBlock != null) {
final Asn1Parser parser = BlockLevelTokenStreamTracker.getASN1ParserForBlock(mBlock, internalIndex);
if (parser != null) {
parser.pr_special_Value();
internalIndex += parser.nof_consumed_tokens();
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);
}
}
return true;
}
return false;
}
return false;
}
Aggregations