|
3 | 3 | import org.variantsync.diffdetective.error.UnparseableFormulaException; |
4 | 4 |
|
5 | 5 | /** |
6 | | - * Extracts the expression from a C preprocessor statement. |
7 | | - * For example, given the annotation "#if defined(A) || B()", the extractor would extract |
8 | | - * "A || B". The extractor detects if, ifdef, ifndef and elif annotations. |
9 | | - * (Other annotations do not have expressions.) |
10 | | - * The given pre-processor statement might also a line in a diff (i.e., preceeded by a - or +). |
| 6 | + * Interface for extracting a formula from a line containing an annotation. |
| 7 | + * The line might be preceded by a '-', '+', or ' '. |
| 8 | + * For example, given the line "+#if defined(A) || B()", the extractor should extract "defined(A) || B". |
| 9 | + * |
| 10 | + * <p> |
| 11 | + * Further alterations of the extracted formula are allowed. For instance, the extracted formula might be abstracted |
| 12 | + * (e.g., by simplifying the call to "defined(A)" leaving only the argument "A", or substituting it with "DEFINED_A"). |
| 13 | + * </p> |
11 | 14 | * |
12 | 15 | * @author Paul Bittner, Sören Viegener, Benjamin Moosherr, Alexander Schultheiß |
13 | 16 | */ |
14 | 17 | public interface DiffLineFormulaExtractor { |
15 | 18 | /** |
16 | | - * Extracts the feature formula as a string from a macro line (possibly within a diff). |
| 19 | + * Extracts the feature formula as a string from a line (possibly within a diff). |
17 | 20 | * |
18 | 21 | * @param line The line of which to get the feature mapping |
19 | 22 | * @return The feature mapping as a String of the given line |
|
0 commit comments