Interface AnnotationParser

All Known Implementing Classes:
CPPAnnotationParser, JPPAnnotationParser, PreprocessorAnnotationParser

public interface AnnotationParser
Interface for a parser that analyzes annotations in parsed text. The parser is responsible for determining the type of the annotation (see AnnotationType), and parsing the annotation into a Node.

See PreprocessorAnnotationParser for an example of how an implementation of AnnotationParser could look like.

  • Method Summary

    Modifier and Type
    Method
    Description
    Parse the given line as an annotation.
  • Method Details

    • parseAnnotation

      Annotation parseAnnotation(String line) throws UnparseableFormulaException
      Parse the given line as an annotation. Note that line might also be a line in a diff (i.e., preceded by - or +).
      Parameters:
      line - that might contain an annotation
      Returns:
      the annotation type and the associated formula. If line doesn't contain an annotation, returns Annotation(AnnotationType.NONE).
      Throws:
      UnparseableFormulaException - if an annotation is detected but it is malformed