/* * [MFTokenizer.java] * * Summary: Decides which extensions will be processed by the MF finite state automaton parser. * * Copyright: (c) 2004-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 1.0 2010-02-10 initial version. */ package com.mindprod.jprep; import com.mindprod.jtokens.Token; /** * Decides which extensions will be processed by the MF finite state automaton parser. * * @author Roedy Green, Canadian Mind Products * @version 1.0 2010-02-10 initial version. * @since 2010-02-10 */ public final class MFTokenizer implements JPrepTokenizer { /** * Constructor */ public MFTokenizer() { } /** * @inheritDoc */ public String[] getExtensions() { // handles manifests: files of form fieldname: value return new String[] { "mf", "sf", "mft", "mffrag", "sffrag", "mftfrag" }; } /** * Parse program and return array of tokens * * @param big the entire program or fragment to parse. * * @return array of tokens encoding colour and font. */ public Token[] tokenize( String big ) { return MFParser.parse( big ); } }