/* * [AlignJavaCommentState.java] * * Summary: Finite state automaton for parsing Java source sufficiently to align it in columns. * * Copyright: (c) 2007-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 2007-04-06 */ package com.mindprod.quoter; /** * Finite state automaton for parsing Java source sufficiently to align it in columns. *

* Various states about comments and quotes. * * @author Roedy Green, Canadian Mind Products * @version 1.0 2007-04-06 * @since 2007-04-06 */ public enum AlignJavaCommentState { /** * normal code. */ OUTSIDE_QUOTES, /** * inside a " ". */ INSIDE_QUOTES, /** * inside a ' '. */ INSIDE_SINGLE_QUOTES, /** * just seen "\. */ SEEN_QUOTE_BACK, /** * just seen '\. */ SEEN_SINGLE_QUOTE_BACK, /** * inside |* *| comment. */ INSIDE_STAR_COMMENT, /** * just seen /. */ SEEN_SLASH, /** * just seen |* ... *. */ SEEN_SLASH_STAR_STAR, /** * inside || C++ style comment. */ INSIDE_SLASH_SLASH }