View Javadoc

1   package net.sourceforge.pmd.cpd;
2   
3   import java.util.ArrayList;
4   
5   /**
6     * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
7     * @author Zev Blut zb@ubit.com
8     */
9   
10  
11   public class RubyTokenizer extends AbstractTokenizer
12   {
13   	public RubyTokenizer()
14   	{
15   		// setting markers for "string" in ruby
16   		this.stringToken = new ArrayList<String>();
17   		this.stringToken.add("\'");
18   		this.stringToken.add("\"");
19   		// setting markers for 'ignorable character' in Ruby
20   		this.ignorableCharacter = new ArrayList<String>();
21   		this.ignorableCharacter.add("{");
22   		this.ignorableCharacter.add("}");
23   		this.ignorableCharacter.add("(");
24   		this.ignorableCharacter.add(")");
25   		this.ignorableCharacter.add(";");
26   		this.ignorableCharacter.add(",");
27  
28   		// setting markers for 'ignorable string' in Ruby
29   		this.ignorableStmt = new ArrayList<String>();
30   		this.ignorableStmt.add("while");
31   		this.ignorableStmt.add("do");
32   		this.ignorableStmt.add("end");
33   	}
34   }