1 20 21 package org.armedbear.j; 22 23 public final class AutoconfMode extends AbstractMode implements Constants, Mode 24 { 25 private static final AutoconfMode mode = new AutoconfMode(); 26 27 private AutoconfMode() 28 { 29 super(AUTOCONF_MODE, AUTOCONF_MODE_NAME); 30 keywords = new Keywords(this); 31 } 32 33 public static final AutoconfMode getMode() 34 { 35 return mode; 36 } 37 38 public final String getCommentStart() 39 { 40 return "dnl "; 41 } 42 43 public final Formatter getFormatter(Buffer buffer) 44 { 45 return new AutoconfFormatter(buffer); 46 } 47 48 private static final String validChars = 49 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_0123456789"; 50 51 public final boolean isIdentifierStart(char c) 52 { 53 return (validChars.indexOf(c) >= 0); 54 } 55 56 public final boolean isIdentifierPart(char c) 57 { 58 return (validChars.indexOf(c) >= 0); 59 } 60 } 61 | Popular Tags |