edu.cmu.sei.aadl.annex
Interface AnnexParser

All Known Implementing Classes:
AnnexParserProxy, DefaultAnnexParser

public interface AnnexParser

Annex parsers must implement this interface. Each time the AADL parser finds either an annex library or an annex subclause it calls the corresponding annex parser method. Exceptions in an annex parser must be thrown as class antlr.RecognitionException to work with the core AADL parser that is based on the ANTLR parser generator.

Each annex parser will be called for annexes for which it provides an extension as specified in the annexName attribute in the extension point edu.cmu.sei.aadl.annex.parser.

Version:
$Id: AnnexParser.java,v 1.7 2006-03-10 22:28:39 phf Exp $
Author:
lwrage

Method Summary
 AnnexLibrary parseAnnexLibrary(java.lang.String annexName, java.lang.String source, java.lang.String filename, int line, int column, ParseErrorReporter errReporter)
          Parse the content of an annex library element found in an AADL specification or package section.
 AnnexSubclause parseAnnexSubclause(java.lang.String annexName, java.lang.String source, java.lang.String filename, int line, int column, ParseErrorReporter errReporter)
          Parse the content of an annex subclause element found in an AADL classifier.
 

Method Detail

parseAnnexLibrary

AnnexLibrary parseAnnexLibrary(java.lang.String annexName,
                               java.lang.String source,
                               java.lang.String filename,
                               int line,
                               int column,
                               ParseErrorReporter errReporter)
                               throws antlr.RecognitionException
Parse the content of an annex library element found in an AADL specification or package section.

Parameters:
annexName - the name of the annex.
source - the source text string in the annex library.
filename - the name of the currently parsed file.
line - the line where the annex library starts.
column - the column where the annex library starts.
errReporter - The parse error reporter associated with the source AADL file being parsed. Call ParseErrorReporter.error(String, int, String) or ParseErrorReporter.error(LocationReference, String) to report errors in parsing the annex text.
Returns:
An instance of a subclass of AnnexLibrary. The specific class returned will depend on the annex model.
Throws:
antlr.RecognitionException - in case of a syntax error.

parseAnnexSubclause

AnnexSubclause parseAnnexSubclause(java.lang.String annexName,
                                   java.lang.String source,
                                   java.lang.String filename,
                                   int line,
                                   int column,
                                   ParseErrorReporter errReporter)
                                   throws antlr.RecognitionException
Parse the content of an annex subclause element found in an AADL classifier.

Parameters:
annexName - the name of the annex.
source - the source text string in the annex subclause.
filename - the name of the currently parsed file.
line - the line where the annex subclause starts.
column - the column where the annex subclause starts.
errReporter - The parse error reporter associated with the source AADL file being parsed. Call ParseErrorReporter.error(String, int, String) or ParseErrorReporter.error(LocationReference, String) to report errors in parsing the annex text.
Returns:
An instance of a subclass of AnnexSubclause. The specific class returned will depend on the annex model.
Throws:
antlr.RecognitionException - in case of a syntax error.