01: /**
02: * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
03: */package net.sourceforge.pmd.cpd;
04:
05: import java.util.ArrayList;
06:
07: /**
08: * @author Romain PELISSE - romain.pelisse@atosorigin.com
09: *
10: */
11: public class FortranTokenizer extends AbstractTokenizer implements
12: Tokenizer {
13: public FortranTokenizer() {
14: this .spanMultipleLinesString = false; // No such thing in Fortran !
15: // setting markers for "string" in Fortran
16: this .stringToken = new ArrayList<String>();
17: this .stringToken.add("\'");
18: // setting markers for 'ignorable character' in Fortran
19: this .ignorableCharacter = new ArrayList<String>();
20: this .ignorableCharacter.add("(");
21: this .ignorableCharacter.add(")");
22: this .ignorableCharacter.add(",");
23:
24: // setting markers for 'ignorable string' in Fortran
25: this .ignorableStmt = new ArrayList<String>();
26: this .ignorableStmt.add("do");
27: this .ignorableStmt.add("while");
28: this .ignorableStmt.add("end");
29: this .ignorableStmt.add("if");
30: // Fortran comment start with an !
31: this .ONE_LINE_COMMENT_CHAR = '!';
32: }
33: }
|