Class SleighLanguageValidator
java.lang.Object
ghidra.app.plugin.processors.sleigh.SleighLanguageValidator
Validate SLEIGH related XML configuration files: .cspec .pspec and .ldefs
A ResourceFile containing an XML document can be verified with one of the
static methods:
- validateCspecFile
- validateLdefsFile
- validatePspecFile
Alternately the class can be instantiated, which will allocate a single verifier
that can be run on multiple files.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvalidateCspecFile(ResourceFile cspecFile) static voidvalidateLdefsFile(ResourceFile ldefsFile) static voidvalidatePspecFile(ResourceFile pspecFile) voidverify(ResourceFile specFile) Verify the given file against this validator.voidVerify an XML document as a string against this validator.
-
Field Details
-
CSPEC_TYPE
public static final int CSPEC_TYPE- See Also:
-
PSPEC_TYPE
public static final int PSPEC_TYPE- See Also:
-
LDEFS_TYPE
public static final int LDEFS_TYPE- See Also:
-
CSPECTAG_TYPE
public static final int CSPECTAG_TYPE- See Also:
-
-
Constructor Details
-
SleighLanguageValidator
public SleighLanguageValidator(int type)
-
-
Method Details
-
verify
Verify the given file against this validator.- Parameters:
specFile- is the file- Throws:
SleighException- with an explanation if the file does not validate
-
verify
Verify an XML document as a string against this validator. Currently this only supports verifierType == CSPECTAG_TYPE.- Parameters:
title- is a description of the documentdocument- is the XML document body- Throws:
SleighException- with an explanation if the document does not validate
-
validateLdefsFile
- Throws:
SleighException
-
validatePspecFile
- Throws:
SleighException
-
validateCspecFile
- Throws:
SleighException
-