Class AiccPrerequisiteParser
java.lang.Object
dev.jcputney.elearning.parser.input.aicc.prereq.AiccPrerequisiteParser
A utility class for parsing AICC prerequisite expressions into structured representations. The
class provides functionality to tokenize, validate, and process prerequisite strings into a
format suitable for further evaluation or manipulation.
This class uses methods to convert the input expression into tokens, rearrange them into postfix notation, construct an Abstract Syntax Tree (AST), and extract identifiers from the expression. The class supports operators such as "AND", "OR", and "NOT", as well as optional markers for dependencies.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<AiccPrerequisiteExpression>Parses a raw prerequisite expression.
-
Method Details
-
parse
Parses a raw prerequisite expression.- Parameters:
rawExpression- the raw expression from the course structure file- Returns:
- an optional parsed expression; empty if the input is blank or cannot be parsed
-