import java.io.IOException;
import java.util.List;
import java.util.ArrayList;
+import javax.swing.text.BadLocationException;
import javax.swing.text.Element;
@javax.annotation.Generated("JFlex")
%char
%type int
-%switch
-
%{
List<String> returnValues;
List<String> argsValues;
String functionName;
int end;
+ int start;
private ScilabDocument doc;
private String id;
- private boolean inRETS;
+ private MatchingBlockScanner matchBlock;
public FunctionScanner(ScilabDocument doc) {
this.doc = doc;
returnValues = new ArrayList();
argsValues = new ArrayList();
+ this.matchBlock = new MatchingBlockScanner(doc);
}
public String getFunctionName() {
try {
returnValues = new ArrayList();
argsValues = new ArrayList();
+ start = p0;
end = p1;
yyreset(new ScilabDocumentReader(doc, p0, p1));
yybegin(BROKEN);
return ret | broken;
}
Element elem = doc.getDefaultRootElement();
- int start = end + 1;
elem = elem.getElement(elem.getElementIndex(end + 1));
end = elem.getEndOffset();
yyreset(new ScilabDocumentReader(doc, elem.getStartOffset(), end));
- if (inRETS) {
- inRETS = false;
- yybegin(RETS);
- } else {
- yybegin(ARGS);
- }
+ yybegin(ARGS);
}
} catch (IOException e) {
return ScilabDocument.ScilabLeafElement.NOTHING;
white = [ \t]+
eol = \n
-comments = ("//".*)?{eol}
-break = ".."(".")*{white}*{comments}
+comments = {white}*("//".*)?{eol}
+break = ".."(".")*{comments}
brokenline = ([^\.]* | ([^\.]*"."[^\.]+)+){break}
id = [a-zA-Z%_#!$?][a-zA-Z0-9_#!$?]*
-spec = [^a-zA-Z0-9_#!$?]
+spec = [^a-zA-Z0-9_#!$?]?
equal = {white}* "=" {white}*
-rpar = ")"[,; \t]*{comments}
+rpar = ")"{comments}
fun = {white}* "function" {white}
funb = {white}* "function["
endfun = {white}* "endfunction" {spec}
+end = "end"
%x FUNCTION, TYPEID, FUNNAME, RETS, ARGS, BROKEN
}
{endfun} {
- return ScilabDocument.ScilabLeafElement.ENDFUN;
+ return ScilabDocument.ScilabLeafElement.ENDFUN;
+ }
+
+ {end} {
+ MatchingBlockScanner.MatchingPositions pos = matchBlock.getMatchingBlock(start + yychar + yylength(), false);
+ if (pos != null) {
+ try {
+ String match = doc.getText(pos.secondB, pos.secondE - pos.secondB);
+ if (match.equals("function")) {
+ return ScilabDocument.ScilabLeafElement.ENDFUN;
+ }
+ } catch (BadLocationException e) { }
+ }
}
. |
yybegin(FUNNAME);
}
- {break} {
- inRETS = true;
- return ScilabDocument.ScilabLeafElement.BROKEN;
- }
-
. |
{eol} {
return ScilabDocument.ScilabLeafElement.NOTHING;
%char
%type int
-%switch
-
%{
private ScilabDocument doc;
private Element elem;
qstring = (\"|\'){string}(\"|\')
transp = ({spec} | ")" | "]" | "}") "'"
-indentP = ("function" | "if" | "for" | "while" | "try" | "select")
+indentP = ("function" | "if" | "for" | "while" | "try" | "select" | "switch")
indentPx = {indentP}{spec}+
xindentP = {spec}{indentP}
indentM = ("endfunction" | "end")
indentMx = {indentM}{spec}+
xindentM = {spec}{indentM}
-indentMP = ("else" | "elseif" | "catch" | "case")
+indentMP = ("else" | "elseif" | "catch" | "case" | "otherwise")
indentMPx = {indentMP}{spec}+
xindentMP = {spec}{indentMP}
. |
{eol} { }
-}
\ No newline at end of file
+}
%type int
%buffer 256
-%switch
-
%{
private ScilabDocument doc;
private Element elem;
public MatchingBlockScanner(ScilabDocument doc) {
this.doc = doc;
this.elem = doc.getDefaultRootElement();
- this.scilabLexer = doc.createLexer();
+ this.scilabLexer = new ScilabLexer(doc, null, false);
}
public MatchingPositions getNextBlock(int pos, boolean lr) {
gnirtsq = \"{string}(\"|\')
transp = ({spec} | ")" | "]" | "}") "'"
-openK = ("if" | "for" | "while" | "select" | "try" | "function")
+openK = ("if" | "for" | "while" | "select" | "try" | "function" | "switch")
openKx = {openK}{spec}+
elseif = "elseif" | "else"
xcloseK = ({spec} | "%" ){closeK}
closeS = ")" | "]" | "}"
-esolcK = ("fi" | "rof" | "elihw" | "tceles" | "yrt" | "noitcnuf")
+esolcK = ("fi" | "rof" | "elihw" | "tceles" | "yrt" | "noitcnuf" | "hctiws")
esolcKx = {spec}{esolcK}
xesolcK = {esolcK}{spec}
nepoK = ("dne" | "noitcnufdne")
package org.scilab.modules.scinotes;
+import java.io.IOException;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
-import java.util.Iterator;
-import java.util.ArrayList;
import java.util.List;
import java.util.Set;
-import java.io.IOException;
import javax.swing.text.BadLocationException;
import javax.swing.text.Element;
-
import org.scilab.modules.commons.ScilabCommonsUtils;
@javax.annotation.Generated("JFlex")
%unicode
%char
%type int
-%switch
%pack
%{
private boolean transposable;
private Element elem;
private boolean breakstring;
+ private boolean breakcomment;
+ private MatchingBlockScanner matchBlock;
static {
- // For SciNotes colors in preferences
- commands.add("cos");
+ // For SciNotes colors in preferences
+ commands.add("cos");
macros.add("cosh");
}
public ScilabLexer(ScilabDocument doc) {
- this(doc, true);
+ this(doc, new MatchingBlockScanner(doc), true);
}
public ScilabLexer(ScilabDocument doc, boolean update) {
+ this(doc, new MatchingBlockScanner(doc), update);
+ }
+
+ public ScilabLexer(ScilabDocument doc, MatchingBlockScanner matchBlock, boolean update) {
this.doc = doc;
this.elem = doc.getDefaultRootElement();
this.infile = doc.getFunctionsInDoc();
+ this.matchBlock = matchBlock;
if (update) {
- update();
- }
- }
+ update();
+ }
+ }
public static void update() {
- if (ScilabCommonsUtils.isScilabThread()) {
- String[] vars = ScilabKeywords.GetVariablesName();
- String[] funs = ScilabKeywords.GetFunctionsName();
- String[] macs = ScilabKeywords.GetMacrosName();
- variables.clear();
- commands.clear();
- macros.clear();
- if (vars != null) {
- variables.addAll(Arrays.asList(vars));
- }
- if (funs != null) {
- commands.addAll(Arrays.asList(funs));
- }
- if (macs != null) {
- macros.addAll(Arrays.asList(macs));
- }
+ if (ScilabCommonsUtils.isScilabThread()) {
+ String[] vars = ScilabKeywords.GetVariablesName();
+ String[] funs = ScilabKeywords.GetFunctionsName();
+ String[] macs = ScilabKeywords.GetMacrosName();
+ variables.clear();
+ commands.clear();
+ macros.clear();
+ if (vars != null) {
+ variables.addAll(Arrays.asList(vars));
+ }
+ if (funs != null) {
+ commands.addAll(Arrays.asList(funs));
+ }
+ if (macs != null) {
+ macros.addAll(Arrays.asList(macs));
+ }
}
}
breakstring = false;
yyreset(new ScilabDocumentReader(doc, p0, p1));
int currentLine = elem.getElementIndex(start);
- if (currentLine != 0 && ((ScilabDocument.ScilabLeafElement) elem.getElement(currentLine - 1)).isBrokenString()) {
- yybegin(QSTRING);
+ if (currentLine != 0) {
+ ScilabDocument.ScilabLeafElement e = (ScilabDocument.ScilabLeafElement) elem.getElement(currentLine - 1);
+ if (e.isBrokenString()) {
+ yybegin(QSTRING);
+ } else if (e.isBlockComment()) {
+ yybegin(BLOCKCOMMENT);
+ }
}
}
public int scan() throws IOException {
int ret = yylex();
- if (start + yychar + yylength() == end - 1) {
+ int lastPos = start + yychar + yylength();
+ if (lastPos == end - 1) {
((ScilabDocument.ScilabLeafElement) elem.getElement(elem.getElementIndex(start))).setBrokenString(breakstring);
breakstring = false;
+ } else if (lastPos == end) {
+ ((ScilabDocument.ScilabLeafElement) elem.getElement(elem.getElementIndex(start))).setBlockComment(yystate() == BLOCKCOMMENT);
}
- return ret;
+ return ret;
+ }
+
+ public boolean isLineFinishedByBlockComment(int start, int end) {
+ this.start = start;
+ this.end = end;
+ try {
+ yyreset(new ScilabDocumentReader(doc, start, end));
+ int tok = 0;
+ while (tok != ScilabLexerConstants.EOF) {
+ tok = yylex();
+ }
+ } catch (Exception e) { }
+
+ return yystate() == BLOCKCOMMENT;
}
public int getKeyword(int pos, boolean strict) {
close = "]" | ")" | "}"
comment = "//"
+startcomment = ("/" "*"+)
+endcomment = ("*"+) "/"
quote = "'"
cstes = "%t" | "%T" | "%f" | "%F" | "%e" | "%pi" | "%inf" | "%i" | "%z" | "%s" | "%nan" | "%eps" | "SCI" | "WSCI" | "SCIHOME" | "TMPDIR"
-operator = ".'" | ".*" | "./" | ".\\" | ".^" | ".**" | "+" | "-" | "/" | "\\" | "*" | "^" | "**" | "==" | "~=" | "<>" | "<" | ">" | "<=" | ">=" | ".*." | "./." | ".\\." | "/." | "=" | "&" | "|" | "@" | "@=" | "~"
+operator = ".'" | ".*" | "./" | ".\\" | ".^" | ".**" | "+" | "-" | "/" | "\\" | "*" | "^" | "**" | "==" | "~=" | "<>" | "<" | ">" | "<=" | ">=" | ".*." | "./." | ".\\." | "/." | "=" | "&" | "|" | "@" | "@=" | "~" | "&&" | "||"
functionKwds = "function" | "endfunction"
-structureKwds = "then" | "do" | "catch" | "case"
+structureKwds = "then" | "do" | "catch" | "case" | "otherwise"
elseif = "elseif" | "else"
-openCloseStructureKwds = "if" | "for" | "while" | "try" | "select" | "end"
+openCloseStructureKwds = "if" | "for" | "while" | "try" | "select" | "switch"
-controlKwds = "abort" | "break" | "quit" | "return" | "resume" | "pause" | "continue" | "exit"
+end = "end"
-authors = "Calixte Denizet" | "Calixte DENIZET" | "Sylvestre Ledru" | "Sylvestre LEDRU" | "Antoine Elias" | "Antoine ELIAS" | "Bruno Jofret" | "Bruno JOFRET" | "Claude Gomez" | "Claude GOMEZ" | "Clement David" | "Clement DAVID" | "Manuel Juliachs" | "Manuel JULIACHS" | "Sheldon Cooper" | "Leonard Hofstadter" | "Serge Steer" | "Serge STEER" | "Vincent Couvert" | "Vincent COUVERT" | "Adeline Carnis" | "Adeline CARNIS" | "Charlotte Hecquet" | "Charlotte HECQUET" | "Paul Bignier" | "Paul BIGNIER" | "Alexandre Herisse" | "Alexandre HERISSE" | "Simon Marchetto" | "Simon MARCHETTO" | "Vladislav Trubkin" | "Vladislav TRUBKIN" | "Cedric Delamarre" | "Cedric DELAMARRE" | "Inria" | "INRIA" | "DIGITEO" | "Digiteo" | "Scilab Enterprises" | "ENPC"
+controlKwds = "abort" | "break" | "quit" | "return" | "resume" | "pause" | "continue" | "exit"
-error = "Scilab Entreprises" | "Scilab Entreprise" | "Scilab Enterprise"
-todo = ("TODO" | "todo" | "Todo")[ \t]*:[^\n]*
+authors = "Calixte Denizet" | "Calixte DENIZET" | "Sylvestre Ledru" | "Sylvestre LEDRU" | "Yann Collette" | "Yann COLLETTE" | "Allan Cornet" | "Allan CORNET" | "Allan Simon" | "Allan SIMON" | "Antoine Elias" | "Antoine ELIAS" | "Bernard Hugueney" | "Bernard HUGUENEY" | "Bruno Jofret" | "Bruno JOFRET" | "Claude Gomez" | "Claude GOMEZ" | "Clement David" | "Clement DAVID" | "Jerome Picard" | "Jerome PICARD" | "Manuel Juliachs" | "Manuel JULIACHS" | "Michael Baudin" | "Michael BAUDIN" | "Pierre Lando" | "Pierre LANDO" | "Pierre Marechal" | "Pierre MARECHAL" | "Serge Steer" | "Serge STEER" | "Vincent Couvert" | "Vincent COUVERT" | "Vincent Liard" | "Vincent LIARD" | "Zhour Madini-Zouine" | "Zhour MADINI-ZOUINE" | "Vincent Lejeune" | "Vincent LEJEUNE" | "Sylvestre Koumar" | "Sylvestre KOUMAR" | "Simon Gareste" | "Simon GARESTE" | "Cedric Delamarre" | "Cedric DELAMARRE" | "Inria" | "INRIA" | "DIGITEO" | "Digiteo" | "ENPC"
break = ".."(".")*
-breakinstring = {break}[ \t]*({comment} | {eol})
+breakinstring = {break}[ \t]*{comment}?
special = "$" | ":" | {break}
badid = ([0-9$][a-zA-Z0-9_#!$?]+)
whitabs = (" "+"\t" | "\t"+" ")[ \t]*
-badop = [+-]([\*\/\\\^] | "."[\*\+\-\/\\\^]) | ":=" | "->" | ("="[ \t]*">") | ("="[ \t]*"<") | " !=" | "&&" | "||" | ([*+-/\\\^]"=")
+badop = [+-]([\*\/\\\^] | "."[\*\+\-\/\\\^]) | ":=" | "->" | " !=" | ("&&" "&"+) | ("||" "|"+) | ([*+-/\\\^]"=")
dot = "."
-url = ("http://"|"https://"|"ftp://"|"dav://"|"davs://"|"sftp://"|"ftps://"|"smb:///"|"file://")[^ \t\f\n\r\'\"]+
-mailaddr = [ \t]*[a-zA-Z0-9_\.\-]+"@"([a-zA-Z0-9\-]+".")+[a-zA-Z]{2,5}[ \t]*
-mail = ("<" {mailaddr} ">") | ("mailto:" {mailaddr})
+url = "http://"[^ \t\f\n\r\'\"]+
+mail = "<"[ \t]*[a-zA-Z0-9_\.\-]+"@"([a-zA-Z0-9\-]+".")+[a-zA-Z]{2,5}[ \t]*">"
-latex = "$$"(([^$]*|"\\$")+)"$$"
+latex = "$"(([^$]*|"\\$")+)"$"
latexinstring = (\"|\')"$"(([^$\'\"]*|"\\$"|([\'\"]{2}))+)"$"(\"|\')
digit = [0-9]
exp = [dDeE][+-]?{digit}*
number = ({digit}+"."?{digit}*{exp}?)|("."{digit}+{exp}?)
-arabic_char = [\u0600-\u06FF\u0750-\u077F\uFB50-\uFDFF\uFE70-\uFEFF]
-hebrew_char = [\u0590-\u05FF\uFB1D-\uFB4F]
-nko_char = [\u07C0-\u07FF]
-thaana_char = [\u0780-\u07BF]
-rtl_char = {arabic_char}|{hebrew_char}|{nko_char}|{thaana_char}
-rtl_comment = {rtl_char}[^\n]*
-rtl_in_string = {rtl_char}(([^\'\"\r\n\.]*)|([\'\"]{2}))+
-
-%x QSTRING, COMMENT, FIELD, COMMANDS, COMMANDSWHITE, BREAKSTRING
+%x QSTRING, COMMENT, BLOCKCOMMENT, FIELD, COMMANDS, COMMANDSWHITE, BREAKSTRING
%%
yybegin(COMMENT);
}
+ {startcomment} {
+ transposable = false;
+ yypushback(2);
+ yybegin(BLOCKCOMMENT);
+ }
+
{operator} {
transposable = false;
return ScilabLexerConstants.OPERATOR;
return ScilabLexerConstants.OSKEYWORD;
}
+ {end} {
+ transposable = false;
+ if (matchBlock != null) {
+ MatchingBlockScanner.MatchingPositions pos = matchBlock.getMatchingBlock(start + yychar + yylength(), false);
+ if (pos != null) {
+ try {
+ String match = doc.getText(pos.secondB, pos.secondE - pos.secondB);
+ if (match.equals("function")) {
+ return ScilabLexerConstants.FKEYWORD;
+ }
+ } catch (BadLocationException e) { }
+ }
+ }
+ return ScilabLexerConstants.OSKEYWORD;
+ }
+
{structureKwds} {
transposable = false;
return ScilabLexerConstants.SKEYWORD;
}
{latexinstring} {
- return ScilabLexerConstants.LATEXINSTRING;
+ return ScilabLexerConstants.LATEX;
}
{quote} {
}
" " {
- transposable = false;
return ScilabLexerConstants.WHITE;
}
"\t" {
- transposable = false;
return ScilabLexerConstants.TAB;
}
"\t" {
return ScilabLexerConstants.TAB;
}
-
- . |
- {eol} {
+ .
+ {
yypushback(1);
yybegin(YYINITIAL);
}
+
+ {eol} { }
}
<FIELD> {
return ScilabLexerConstants.FIELD;
}
- . |
- {eol} {
+ . {
yypushback(1);
yybegin(YYINITIAL);
}
+
+ {eol} { }
}
<QSTRING> {
return ScilabLexerConstants.TAB_STRING;
}
- {rtl_in_string} |
{string} |
"." {
return ScilabLexerConstants.STRING;
}
}
-<COMMENT> {
- {todo} {
- return ScilabLexerConstants.TODO;
- }
+<BLOCKCOMMENT> {
+ {authors} {
+ return ScilabLexerConstants.AUTHORS;
+ }
+
+ {url} {
+ return ScilabLexerConstants.URL;
+ }
+
+ {mail} {
+ return ScilabLexerConstants.MAIL;
+ }
+
+ {latex} {
+ return ScilabLexerConstants.LATEX;
+ }
+
+ " " {
+ return ScilabLexerConstants.WHITE_COMMENT;
+ }
- {error} {
- return ScilabLexerConstants.ERROR;
- }
+ "\t" {
+ return ScilabLexerConstants.TAB_COMMENT;
+ }
+ {endcomment} {
+ yybegin(YYINITIAL);
+ return ScilabLexerConstants.COMMENT;
+ }
+ . |
+ {eol} {
+ return ScilabLexerConstants.COMMENT;
+ }
+}
+
+<COMMENT> {
{authors} {
return ScilabLexerConstants.AUTHORS;
}
"\t" {
return ScilabLexerConstants.TAB_COMMENT;
}
-
- {rtl_comment} {
- return ScilabLexerConstants.COMMENT;
- }
- [^ \t\n]+ {
+ . |
+ {eol} {
return ScilabLexerConstants.COMMENT;
}
-
- {eol} {
- yybegin(YYINITIAL);
- return ScilabLexerConstants.DEFAULT;
- }
}
<BREAKSTRING> {
-/* The following code was generated by JFlex 1.4.3 on 05/04/13 17:28 */
+/* The following code was generated by JFlex 1.6.1 */
//CHECKSTYLE:OFF
import java.io.IOException;
import java.util.List;
import java.util.ArrayList;
+import javax.swing.text.BadLocationException;
import javax.swing.text.Element;
@javax.annotation.Generated("JFlex")
@SuppressWarnings("fallthrough")
/**
- * This class is a scanner generated by
- * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
- * on 05/04/13 17:28 from the specification file
- * <tt>function.jflex</tt>
+ * This class is a scanner generated by
+ * <a href="http://www.jflex.de/">JFlex</a> 1.6.1
+ * from the specification file <tt>../../../../jflex/function.jflex</tt>
*/
public final class FunctionScanner {
- /** This character denotes the end of file */
- public static final int YYEOF = -1;
-
- /** initial size of the lookahead buffer */
- private static final int ZZ_BUFFERSIZE = 16384;
-
- /** lexical states */
- public static final int RETS = 8;
- public static final int TYPEID = 4;
- public static final int BROKEN = 12;
- public static final int YYINITIAL = 0;
- public static final int ARGS = 10;
- public static final int FUNNAME = 6;
- public static final int FUNCTION = 2;
-
- /**
- * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
- * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
- * at the beginning of a line
- * l is of the form l = 2*k, k a non negative integer
- */
- private static final int ZZ_LEXSTATE[] = {
- 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6
- };
-
- /**
- * Translates characters to character classes
- */
- private static final String ZZ_CMAP_PACKED =
- "\11\0\1\1\1\2\25\0\1\1\1\7\1\0\2\7\1\5\2\0" +
- "\1\25\1\11\2\0\1\26\1\0\1\4\1\3\12\6\1\0\1\12" +
- "\1\0\1\10\1\0\1\7\1\0\32\7\1\22\1\0\1\27\1\0" +
- "\1\7\1\0\2\7\1\16\1\24\1\23\1\13\2\7\1\20\4\7" +
- "\1\15\1\21\4\7\1\17\1\14\5\7\uff85\0";
-
- /**
- * Translates characters to character classes
- */
- private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
-
- /**
- * Translates DFA states to action switch labels.
- */
- private static final int [] ZZ_ACTION = zzUnpackAction();
-
- private static final String ZZ_ACTION_PACKED_0 =
- "\7\0\4\1\1\2\1\3\1\4\1\5\1\1\1\6" +
- "\1\7\1\1\1\10\1\1\1\11\1\12\1\4\1\1" +
- "\1\13\1\4\2\1\1\14\1\1\2\15\12\0\1\16" +
- "\10\0\1\17\2\0\1\20\15\0\1\21\3\0\1\22";
-
- private static int [] zzUnpackAction() {
- int [] result = new int[74];
- int offset = 0;
- offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
- return result;
+ /** This character denotes the end of file */
+ public static final int YYEOF = -1;
+
+ /** initial size of the lookahead buffer */
+ private static final int ZZ_BUFFERSIZE = 16384;
+
+ /** lexical states */
+ public static final int YYINITIAL = 0;
+ public static final int FUNCTION = 2;
+ public static final int TYPEID = 4;
+ public static final int FUNNAME = 6;
+ public static final int RETS = 8;
+ public static final int ARGS = 10;
+ public static final int BROKEN = 12;
+
+ /**
+ * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+ * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+ * at the beginning of a line
+ * l is of the form l = 2*k, k a non negative integer
+ */
+ private static final int ZZ_LEXSTATE[] = {
+ 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6
+ };
+
+ /**
+ * Translates characters to character classes
+ */
+ private static final String ZZ_CMAP_PACKED =
+ "\11\0\1\1\1\2\1\4\1\4\1\4\22\0\1\1\1\10\1\0"+
+ "\2\10\1\6\2\0\1\25\1\12\2\0\1\26\1\0\1\5\1\3"+
+ "\12\7\3\0\1\11\1\0\1\10\1\0\32\10\1\22\1\0\1\27"+
+ "\1\0\1\10\1\0\2\10\1\16\1\24\1\23\1\13\2\10\1\20"+
+ "\4\10\1\15\1\21\4\10\1\17\1\14\5\10\12\0\1\4\u1fa2\0"+
+ "\1\4\1\4\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\udfe6\0";
+
+ /**
+ * Translates characters to character classes
+ */
+ private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
+
+ /**
+ * Translates DFA states to action switch labels.
+ */
+ private static final int [] ZZ_ACTION = zzUnpackAction();
+
+ private static final String ZZ_ACTION_PACKED_0 =
+ "\7\0\4\1\1\2\1\3\1\4\1\5\1\1\1\6"+
+ "\1\7\1\1\1\10\1\1\1\11\1\12\1\4\1\13"+
+ "\1\4\2\1\1\14\1\1\1\15\1\0\1\15\13\0"+
+ "\1\16\5\0\1\17\1\0\1\20\15\0\1\21\2\0"+
+ "\2\22";
+
+ private static int [] zzUnpackAction() {
+ int [] result = new int[71];
+ int offset = 0;
+ offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackAction(String packed, int offset, int [] result) {
+ int i = 0; /* index in packed string */
+ int j = offset; /* index in unpacked array */
+ int l = packed.length();
+ while (i < l) {
+ int count = packed.charAt(i++);
+ int value = packed.charAt(i++);
+ do result[j++] = value; while (--count > 0);
}
-
- private static int zzUnpackAction(String packed, int offset, int [] result) {
- int i = 0; /* index in packed string */
- int j = offset; /* index in unpacked array */
- int l = packed.length();
- while (i < l) {
- int count = packed.charAt(i++);
- int value = packed.charAt(i++);
- do {
- result[j++] = value;
- } while (--count > 0);
- }
- return j;
+ return j;
+ }
+
+
+ /**
+ * Translates a state to a row index in the transition table
+ */
+ private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+ private static final String ZZ_ROWMAP_PACKED_0 =
+ "\0\0\0\30\0\60\0\110\0\140\0\170\0\220\0\250"+
+ "\0\300\0\330\0\360\0\u0108\0\250\0\u0120\0\250\0\u0138"+
+ "\0\u0150\0\250\0\u0168\0\250\0\u0180\0\u0198\0\250\0\u01b0"+
+ "\0\u01c8\0\250\0\u01e0\0\u01f8\0\u0210\0\u0228\0\u0240\0\u0240"+
+ "\0\u0258\0\300\0\330\0\u0270\0\u0288\0\u02a0\0\u0138\0\u02b8"+
+ "\0\u0168\0\u0180\0\u02d0\0\u01e0\0\u02e8\0\u0300\0\u0228\0\u0258"+
+ "\0\u0318\0\u0330\0\u0348\0\u0360\0\250\0\u0378\0\u0348\0\u0390"+
+ "\0\u03a8\0\u03c0\0\u03d8\0\u03f0\0\u0408\0\u0420\0\u0438\0\u0450"+
+ "\0\u0468\0\u0480\0\u0498\0\u04b0\0\u04c8\0\u04e0\0\250";
+
+ private static int [] zzUnpackRowMap() {
+ int [] result = new int[71];
+ int offset = 0;
+ offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+ int i = 0; /* index in packed string */
+ int j = offset; /* index in unpacked array */
+ int l = packed.length();
+ while (i < l) {
+ int high = packed.charAt(i++) << 16;
+ result[j++] = high | packed.charAt(i++);
}
+ return j;
+ }
+
+ /**
+ * The transition table of the DFA
+ */
+ private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+ private static final String ZZ_TRANS_PACKED_0 =
+ "\1\10\1\11\2\10\1\0\6\10\1\12\7\10\1\13"+
+ "\10\10\1\0\1\10\1\14\1\10\1\14\2\10\7\14"+
+ "\1\15\2\14\4\10\1\16\1\17\1\20\1\0\4\10"+
+ "\1\21\13\10\1\22\3\10\1\23\1\24\1\25\1\0"+
+ "\1\10\1\26\1\10\1\26\2\10\7\26\1\10\2\26"+
+ "\1\27\3\10\1\30\2\10\1\0\1\10\1\31\1\10"+
+ "\1\31\2\10\7\31\1\10\2\31\1\10\1\32\1\33"+
+ "\1\10\1\30\2\10\1\0\1\34\1\35\1\10\1\35"+
+ "\1\10\1\36\7\35\1\10\2\35\1\10\1\32\1\10"+
+ "\4\37\1\40\1\41\22\37\31\0\1\42\11\0\1\43"+
+ "\7\0\1\44\20\0\1\45\30\0\1\46\21\0\2\14"+
+ "\2\0\7\14\1\0\2\14\4\0\1\16\1\17\1\47"+
+ "\5\0\1\21\21\0\1\50\25\0\1\21\27\0\1\51"+
+ "\1\24\1\52\21\0\1\27\5\0\1\53\33\0\2\26"+
+ "\2\0\7\26\1\0\2\26\4\0\1\30\35\0\2\31"+
+ "\2\0\7\31\1\0\2\31\4\0\1\54\7\0\1\55"+
+ "\23\0\1\56\31\0\2\35\2\0\7\35\1\0\2\35"+
+ "\4\0\1\57\1\24\1\52\24\0\5\40\1\60\27\40"+
+ "\1\56\22\40\15\0\1\61\27\0\1\62\36\0\1\63"+
+ "\3\0\2\50\1\17\1\50\1\0\23\50\2\53\1\24"+
+ "\1\53\1\0\23\53\1\0\1\55\27\0\1\64\1\65"+
+ "\1\66\1\0\1\56\46\0\1\67\21\0\1\70\24\0"+
+ "\1\71\15\0\1\64\1\65\1\66\27\0\1\72\43\0"+
+ "\1\73\24\0\1\74\13\0\2\72\1\65\1\72\1\0"+
+ "\23\72\20\0\1\75\24\0\1\76\33\0\1\77\24\0"+
+ "\1\100\26\0\1\101\31\0\1\102\11\0\1\103\20\0"+
+ "\1\15\25\0\1\104\10\0\1\103\47\0\1\105\23\0"+
+ "\1\106\12\0\7\107\2\0\2\107\7\0\1\107\2\0"+
+ "\3\107";
+
+ private static int [] zzUnpackTrans() {
+ int [] result = new int[1272];
+ int offset = 0;
+ offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackTrans(String packed, int offset, int [] result) {
+ int i = 0; /* index in packed string */
+ int j = offset; /* index in unpacked array */
+ int l = packed.length();
+ while (i < l) {
+ int count = packed.charAt(i++);
+ int value = packed.charAt(i++);
+ value--;
+ do result[j++] = value; while (--count > 0);
+ }
+ return j;
+ }
+
+
+ /* error codes */
+ private static final int ZZ_UNKNOWN_ERROR = 0;
+ private static final int ZZ_NO_MATCH = 1;
+ private static final int ZZ_PUSHBACK_2BIG = 2;
+
+ /* error messages for the codes above */
+ private static final String ZZ_ERROR_MSG[] = {
+ "Unknown internal scanner error",
+ "Error: could not match input",
+ "Error: pushback value was too large"
+ };
+
+ /**
+ * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+ */
+ private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+ private static final String ZZ_ATTRIBUTE_PACKED_0 =
+ "\7\0\1\11\4\1\1\11\1\1\1\11\2\1\1\11"+
+ "\1\1\1\11\2\1\1\11\2\1\1\11\5\1\1\0"+
+ "\1\1\13\0\1\1\5\0\1\1\1\0\1\11\15\0"+
+ "\1\1\2\0\1\1\1\11";
+
+ private static int [] zzUnpackAttribute() {
+ int [] result = new int[71];
+ int offset = 0;
+ offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+ int i = 0; /* index in packed string */
+ int j = offset; /* index in unpacked array */
+ int l = packed.length();
+ while (i < l) {
+ int count = packed.charAt(i++);
+ int value = packed.charAt(i++);
+ do result[j++] = value; while (--count > 0);
+ }
+ return j;
+ }
+ /** the input device */
+ private java.io.Reader zzReader;
- /* error codes */
- private static final int ZZ_UNKNOWN_ERROR = 0;
- private static final int ZZ_NO_MATCH = 1;
- private static final int ZZ_PUSHBACK_2BIG = 2;
-
- /* error messages for the codes above */
- private static final String ZZ_ERROR_MSG[] = {
- "Unkown internal scanner error",
- "Error: could not match input",
- "Error: pushback value was too large"
- };
-
- /** the input device */
- private java.io.Reader zzReader;
-
- /** the current state of the DFA */
- private int zzState;
+ /** the current state of the DFA */
+ private int zzState;
- /** the current lexical state */
- private int zzLexicalState = YYINITIAL;
+ /** the current lexical state */
+ private int zzLexicalState = YYINITIAL;
- /** this buffer contains the current text to be matched and is
- the source of the yytext() string */
- private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+ /** this buffer contains the current text to be matched and is
+ the source of the yytext() string */
+ private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
- /** the textposition at the last accepting state */
- private int zzMarkedPos;
+ /** the textposition at the last accepting state */
+ private int zzMarkedPos;
- /** the current text position in the buffer */
- private int zzCurrentPos;
+ /** the current text position in the buffer */
+ private int zzCurrentPos;
- /** startRead marks the beginning of the yytext() string in the buffer */
- private int zzStartRead;
+ /** startRead marks the beginning of the yytext() string in the buffer */
+ private int zzStartRead;
- /** endRead marks the last character in the buffer, that has been read
- from input */
- private int zzEndRead;
+ /** endRead marks the last character in the buffer, that has been read
+ from input */
+ private int zzEndRead;
- /** number of newlines encountered up to the start of the matched text */
- private int yyline;
+ /** number of newlines encountered up to the start of the matched text */
+ private int yyline;
- /** the number of characters up to the start of the matched text */
- private int yychar;
+ /** the number of characters up to the start of the matched text */
+ private int yychar;
- /**
- * the number of characters from the last newline up to the start of the
- * matched text
- */
- private int yycolumn;
+ /**
+ * the number of characters from the last newline up to the start of the
+ * matched text
+ */
+ private int yycolumn;
- /**
- * zzAtBOL == true <=> the scanner is currently at the beginning of a line
- */
- private boolean zzAtBOL = true;
+ /**
+ * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+ */
+ private boolean zzAtBOL = true;
- /** zzAtEOF == true <=> the scanner is at the EOF */
- private boolean zzAtEOF;
+ /** zzAtEOF == true <=> the scanner is at the EOF */
+ private boolean zzAtEOF;
- /** denotes if the user-EOF-code has already been executed */
- private boolean zzEOFDone;
+ /** denotes if the user-EOF-code has already been executed */
+ private boolean zzEOFDone;
+
+ /**
+ * The number of occupied positions in zzBuffer beyond zzEndRead.
+ * When a lead/high surrogate has been read from the input stream
+ * into the final zzBuffer position, this will have a value of 1;
+ * otherwise, it will have a value of 0.
+ */
+ private int zzFinalHighSurrogate = 0;
- /* user code: */
+ /* user code: */
List<String> returnValues;
List<String> argsValues;
String functionName;
int end;
+ int start;
private ScilabDocument doc;
private String id;
- private boolean inRETS;
+ private MatchingBlockScanner matchBlock;
public FunctionScanner(ScilabDocument doc) {
this.doc = doc;
returnValues = new ArrayList();
argsValues = new ArrayList();
+ this.matchBlock = new MatchingBlockScanner(doc);
}
public String getFunctionName() {
try {
returnValues = new ArrayList();
argsValues = new ArrayList();
+ start = p0;
end = p1;
yyreset(new ScilabDocumentReader(doc, p0, p1));
yybegin(BROKEN);
while (true) {
int ret = yylex();
if (ret != ScilabDocument.ScilabLeafElement.BROKEN) {
- return ret | broken;
+ return ret | broken;
}
Element elem = doc.getDefaultRootElement();
- int start = end + 1;
elem = elem.getElement(elem.getElementIndex(end + 1));
end = elem.getEndOffset();
yyreset(new ScilabDocumentReader(doc, elem.getStartOffset(), end));
- if (inRETS) {
- inRETS = false;
- yybegin(RETS);
- } else {
- yybegin(ARGS);
- }
+ yybegin(ARGS);
}
} catch (IOException e) {
return ScilabDocument.ScilabLeafElement.NOTHING;
}
- /**
- * Creates a new scanner
- * There is also a java.io.InputStream version of this constructor.
- *
- * @param in the java.io.Reader to read input from.
- */
- public FunctionScanner(java.io.Reader in) {
- this.zzReader = in;
+ /**
+ * Creates a new scanner
+ *
+ * @param in the java.io.Reader to read input from.
+ */
+ public FunctionScanner(java.io.Reader in) {
+ this.zzReader = in;
+ }
+
+
+ /**
+ * Unpacks the compressed character translation table.
+ *
+ * @param packed the packed character translation table
+ * @return the unpacked character translation table
+ */
+ private static char [] zzUnpackCMap(String packed) {
+ char [] map = new char[0x110000];
+ int i = 0; /* index in packed string */
+ int j = 0; /* index in unpacked array */
+ while (i < 138) {
+ int count = packed.charAt(i++);
+ char value = packed.charAt(i++);
+ do map[j++] = value; while (--count > 0);
}
-
- /**
- * Creates a new scanner.
- * There is also java.io.Reader version of this constructor.
- *
- * @param in the java.io.Inputstream to read input from.
- */
- public FunctionScanner(java.io.InputStream in) {
- this(new java.io.InputStreamReader(in));
+ return map;
+ }
+
+
+ /**
+ * Refills the input buffer.
+ *
+ * @return <code>false</code>, iff there was new input.
+ *
+ * @exception java.io.IOException if any I/O-Error occurs
+ */
+ private boolean zzRefill() throws java.io.IOException {
+
+ /* first: make room (if you can) */
+ if (zzStartRead > 0) {
+ zzEndRead += zzFinalHighSurrogate;
+ zzFinalHighSurrogate = 0;
+ System.arraycopy(zzBuffer, zzStartRead,
+ zzBuffer, 0,
+ zzEndRead-zzStartRead);
+
+ /* translate stored positions */
+ zzEndRead-= zzStartRead;
+ zzCurrentPos-= zzStartRead;
+ zzMarkedPos-= zzStartRead;
+ zzStartRead = 0;
}
- /**
- * Unpacks the compressed character translation table.
- *
- * @param packed the packed character translation table
- * @return the unpacked character translation table
- */
- private static char [] zzUnpackCMap(String packed) {
- char [] map = new char[0x10000];
- int i = 0; /* index in packed string */
- int j = 0; /* index in unpacked array */
- while (i < 94) {
- int count = packed.charAt(i++);
- char value = packed.charAt(i++);
- do {
- map[j++] = value;
- } while (--count > 0);
- }
- return map;
+ /* is the buffer big enough? */
+ if (zzCurrentPos >= zzBuffer.length - zzFinalHighSurrogate) {
+ /* if not: blow it up */
+ char newBuffer[] = new char[zzBuffer.length*2];
+ System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+ zzBuffer = newBuffer;
+ zzEndRead += zzFinalHighSurrogate;
+ zzFinalHighSurrogate = 0;
}
+ /* fill the buffer with new input */
+ int requested = zzBuffer.length - zzEndRead;
+ int numRead = zzReader.read(zzBuffer, zzEndRead, requested);
- /**
- * Refills the input buffer.
- *
- * @return <code>false</code>, iff there was new input.
- *
- * @exception java.io.IOException if any I/O-Error occurs
- */
- private boolean zzRefill() throws java.io.IOException {
-
- /* first: make room (if you can) */
- if (zzStartRead > 0) {
- System.arraycopy(zzBuffer, zzStartRead,
- zzBuffer, 0,
- zzEndRead - zzStartRead);
-
- /* translate stored positions */
- zzEndRead -= zzStartRead;
- zzCurrentPos -= zzStartRead;
- zzMarkedPos -= zzStartRead;
- zzStartRead = 0;
- }
-
- /* is the buffer big enough? */
- if (zzCurrentPos >= zzBuffer.length) {
- /* if not: blow it up */
- char newBuffer[] = new char[zzCurrentPos * 2];
- System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
- zzBuffer = newBuffer;
- }
-
- /* finally: fill the buffer with new input */
- int numRead = zzReader.read(zzBuffer, zzEndRead,
- zzBuffer.length - zzEndRead);
-
- if (numRead > 0) {
- zzEndRead += numRead;
- return false;
- }
- // unlikely but not impossible: read 0 characters, but not at end of stream
- if (numRead == 0) {
- int c = zzReader.read();
- if (c == -1) {
- return true;
- } else {
- zzBuffer[zzEndRead++] = (char) c;
- return false;
- }
- }
-
- // numRead < 0
- return true;
+ /* not supposed to occur according to specification of java.io.Reader */
+ if (numRead == 0) {
+ throw new java.io.IOException("Reader returned 0 characters. See JFlex examples for workaround.");
}
-
-
- /**
- * Closes the input stream.
- */
- public final void yyclose() throws java.io.IOException {
- zzAtEOF = true; /* indicate end of file */
- zzEndRead = zzStartRead; /* invalidate buffer */
-
- if (zzReader != null) {
- zzReader.close();
+ if (numRead > 0) {
+ zzEndRead += numRead;
+ /* If numRead == requested, we might have requested to few chars to
+ encode a full Unicode character. We assume that a Reader would
+ otherwise never return half characters. */
+ if (numRead == requested) {
+ if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
+ --zzEndRead;
+ zzFinalHighSurrogate = 1;
}
+ }
+ /* potentially more input available */
+ return false;
}
-
- /**
- * Resets the scanner to read from a new input stream.
- * Does not close the old reader.
- *
- * All internal variables are reset, the old input stream
- * <b>cannot</b> be reused (internal buffer is discarded and lost).
- * Lexical state is set to <tt>ZZ_INITIAL</tt>.
- *
- * @param reader the new input stream
- */
- public final void yyreset(java.io.Reader reader) {
- zzReader = reader;
- zzAtBOL = true;
- zzAtEOF = false;
- zzEOFDone = false;
- zzEndRead = zzStartRead = 0;
- zzCurrentPos = zzMarkedPos = 0;
- yyline = yychar = yycolumn = 0;
- zzLexicalState = YYINITIAL;
+ /* numRead < 0 ==> end of stream */
+ return true;
+ }
+
+
+ /**
+ * Closes the input stream.
+ */
+ public final void yyclose() throws java.io.IOException {
+ zzAtEOF = true; /* indicate end of file */
+ zzEndRead = zzStartRead; /* invalidate buffer */
+
+ if (zzReader != null)
+ zzReader.close();
+ }
+
+
+ /**
+ * Resets the scanner to read from a new input stream.
+ * Does not close the old reader.
+ *
+ * All internal variables are reset, the old input stream
+ * <b>cannot</b> be reused (internal buffer is discarded and lost).
+ * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+ *
+ * Internal scan buffer is resized down to its initial length, if it has grown.
+ *
+ * @param reader the new input stream
+ */
+ public final void yyreset(java.io.Reader reader) {
+ zzReader = reader;
+ zzAtBOL = true;
+ zzAtEOF = false;
+ zzEOFDone = false;
+ zzEndRead = zzStartRead = 0;
+ zzCurrentPos = zzMarkedPos = 0;
+ zzFinalHighSurrogate = 0;
+ yyline = yychar = yycolumn = 0;
+ zzLexicalState = YYINITIAL;
+ if (zzBuffer.length > ZZ_BUFFERSIZE)
+ zzBuffer = new char[ZZ_BUFFERSIZE];
+ }
+
+
+ /**
+ * Returns the current lexical state.
+ */
+ public final int yystate() {
+ return zzLexicalState;
+ }
+
+
+ /**
+ * Enters a new lexical state
+ *
+ * @param newState the new lexical state
+ */
+ public final void yybegin(int newState) {
+ zzLexicalState = newState;
+ }
+
+
+ /**
+ * Returns the text matched by the current regular expression.
+ */
+ public final String yytext() {
+ return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+ }
+
+
+ /**
+ * Returns the character at position <tt>pos</tt> from the
+ * matched text.
+ *
+ * It is equivalent to yytext().charAt(pos), but faster
+ *
+ * @param pos the position of the character to fetch.
+ * A value from 0 to yylength()-1.
+ *
+ * @return the character at position pos
+ */
+ public final char yycharat(int pos) {
+ return zzBuffer[zzStartRead+pos];
+ }
+
+
+ /**
+ * Returns the length of the matched text region.
+ */
+ public final int yylength() {
+ return zzMarkedPos-zzStartRead;
+ }
+
+
+ /**
+ * Reports an error that occured while scanning.
+ *
+ * In a wellformed scanner (no or only correct usage of
+ * yypushback(int) and a match-all fallback rule) this method
+ * will only be called with things that "Can't Possibly Happen".
+ * If this method is called, something is seriously wrong
+ * (e.g. a JFlex bug producing a faulty scanner etc.).
+ *
+ * Usual syntax/scanner level error handling should be done
+ * in error fallback rules.
+ *
+ * @param errorCode the code of the errormessage to display
+ */
+ private void zzScanError(int errorCode) {
+ String message;
+ try {
+ message = ZZ_ERROR_MSG[errorCode];
}
-
-
- /**
- * Returns the current lexical state.
- */
- public final int yystate() {
- return zzLexicalState;
+ catch (ArrayIndexOutOfBoundsException e) {
+ message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
}
+ throw new Error(message);
+ }
- /**
- * Enters a new lexical state
- *
- * @param newState the new lexical state
- */
- public final void yybegin(int newState) {
- zzLexicalState = newState;
- }
+ /**
+ * Pushes the specified amount of characters back into the input stream.
+ *
+ * They will be read again by then next call of the scanning method
+ *
+ * @param number the number of characters to be read again.
+ * This number must not be greater than yylength()!
+ */
+ public void yypushback(int number) {
+ if ( number > yylength() )
+ zzScanError(ZZ_PUSHBACK_2BIG);
- /**
- * Returns the text matched by the current regular expression.
- */
- public final String yytext() {
- return new String( zzBuffer, zzStartRead, zzMarkedPos - zzStartRead );
- }
+ zzMarkedPos -= number;
+ }
- /**
- * Returns the character at position <tt>pos</tt> from the
- * matched text.
- *
- * It is equivalent to yytext().charAt(pos), but faster
- *
- * @param pos the position of the character to fetch.
- * A value from 0 to yylength()-1.
- *
- * @return the character at position pos
- */
- public final char yycharat(int pos) {
- return zzBuffer[zzStartRead + pos];
- }
+ /**
+ * Resumes scanning until the next regular expression is matched,
+ * the end of input is encountered or an I/O-Error occurs.
+ *
+ * @return the next token
+ * @exception java.io.IOException if any I/O-Error occurs
+ */
+ public int yylex() throws java.io.IOException {
+ int zzInput;
+ int zzAction;
+ // cached fields:
+ int zzCurrentPosL;
+ int zzMarkedPosL;
+ int zzEndReadL = zzEndRead;
+ char [] zzBufferL = zzBuffer;
+ char [] zzCMapL = ZZ_CMAP;
- /**
- * Returns the length of the matched text region.
- */
- public final int yylength() {
- return zzMarkedPos - zzStartRead;
- }
+ int [] zzTransL = ZZ_TRANS;
+ int [] zzRowMapL = ZZ_ROWMAP;
+ int [] zzAttrL = ZZ_ATTRIBUTE;
+ while (true) {
+ zzMarkedPosL = zzMarkedPos;
- /**
- * Reports an error that occured while scanning.
- *
- * In a wellformed scanner (no or only correct usage of
- * yypushback(int) and a match-all fallback rule) this method
- * will only be called with things that "Can't Possibly Happen".
- * If this method is called, something is seriously wrong
- * (e.g. a JFlex bug producing a faulty scanner etc.).
- *
- * Usual syntax/scanner level error handling should be done
- * in error fallback rules.
- *
- * @param errorCode the code of the errormessage to display
- */
- private void zzScanError(int errorCode) {
- String message;
- try {
- message = ZZ_ERROR_MSG[errorCode];
- } catch (ArrayIndexOutOfBoundsException e) {
- message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
- }
+ yychar+= zzMarkedPosL-zzStartRead;
- throw new Error(message);
- }
+ zzAction = -1;
+ zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+
+ zzState = ZZ_LEXSTATE[zzLexicalState];
- /**
- * Pushes the specified amount of characters back into the input stream.
- *
- * They will be read again by then next call of the scanning method
- *
- * @param number the number of characters to be read again.
- * This number must not be greater than yylength()!
- */
- public void yypushback(int number) {
- if ( number > yylength() ) {
- zzScanError(ZZ_PUSHBACK_2BIG);
- }
-
- zzMarkedPos -= number;
- }
-
-
- /**
- * Resumes scanning until the next regular expression is matched,
- * the end of input is encountered or an I/O-Error occurs.
- *
- * @return the next token
- * @exception java.io.IOException if any I/O-Error occurs
- */
- public int yylex() throws java.io.IOException {
- int zzInput;
- int zzAction;
-
- // cached fields:
- int zzCurrentPosL;
- int zzMarkedPosL;
- int zzEndReadL = zzEndRead;
- char [] zzBufferL = zzBuffer;
- char [] zzCMapL = ZZ_CMAP;
+ // set up zzAction for empty match case:
+ int zzAttributes = zzAttrL[zzState];
+ if ( (zzAttributes & 1) == 1 ) {
+ zzAction = zzState;
+ }
+ zzForAction: {
while (true) {
- zzMarkedPosL = zzMarkedPos;
-
- yychar += zzMarkedPosL - zzStartRead;
-
- zzAction = -1;
-
- zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
-
- zzState = ZZ_LEXSTATE[zzLexicalState];
-
-
- zzForAction: {
- while (true) {
-
- if (zzCurrentPosL < zzEndReadL) {
- zzInput = zzBufferL[zzCurrentPosL++];
- } else if (zzAtEOF) {
- zzInput = YYEOF;
- break zzForAction;
- } else {
- // store back cached positions
- zzCurrentPos = zzCurrentPosL;
- zzMarkedPos = zzMarkedPosL;
- boolean eof = zzRefill();
- // get translated positions and possibly new buffer
- zzCurrentPosL = zzCurrentPos;
- zzMarkedPosL = zzMarkedPos;
- zzBufferL = zzBuffer;
- zzEndReadL = zzEndRead;
- if (eof) {
- zzInput = YYEOF;
- break zzForAction;
- } else {
- zzInput = zzBufferL[zzCurrentPosL++];
- }
- }
- zzInput = zzCMapL[zzInput];
-
- boolean zzIsFinal = false;
- boolean zzNoLookAhead = false;
-
- zzForNext: {
- switch (zzState) {
- case 0:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- zzState = 8;
- break zzForNext;
- case 11:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- case 19:
- zzIsFinal = true;
- zzState = 10;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 7;
- break zzForNext;
- }
-
- case 1:
- switch (zzInput) {
- case 5:
- case 7:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 19:
- case 20:
- zzIsFinal = true;
- zzState = 11;
- break zzForNext;
- case 18:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 12;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 7;
- break zzForNext;
- }
-
- case 2:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- zzState = 13;
- break zzForNext;
- case 2:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 14;
- break zzForNext;
- case 3:
- zzIsFinal = true;
- zzState = 15;
- break zzForNext;
- case 8:
- zzIsFinal = true;
- zzState = 16;
- break zzForNext;
- case 21:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 17;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 7;
- break zzForNext;
- }
-
- case 3:
- switch (zzInput) {
- case 0:
- case 4:
- case 6:
- case 8:
- case 9:
- case 10:
- case 18:
- case 22:
- case 23:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 7;
- break zzForNext;
- case 1:
- zzIsFinal = true;
- zzState = 18;
- break zzForNext;
- case 2:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 19;
- break zzForNext;
- case 3:
- zzIsFinal = true;
- zzState = 20;
- break zzForNext;
- case 21:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 22;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzState = 21;
- break zzForNext;
- }
-
- case 4:
- switch (zzInput) {
- case 0:
- case 2:
- case 3:
- case 6:
- case 8:
- case 9:
- case 10:
- case 18:
- case 21:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 7;
- break zzForNext;
- case 1:
- zzIsFinal = true;
- zzState = 23;
- break zzForNext;
- case 4:
- zzIsFinal = true;
- zzState = 24;
- break zzForNext;
- case 22:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 26;
- break zzForNext;
- case 23:
- zzIsFinal = true;
- zzState = 27;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzState = 25;
- break zzForNext;
- }
-
- case 5:
- switch (zzInput) {
- case 0:
- case 2:
- case 3:
- case 6:
- case 8:
- case 10:
- case 18:
- case 21:
- case 23:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 7;
- break zzForNext;
- case 1:
- zzIsFinal = true;
- zzState = 23;
- break zzForNext;
- case 22:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 26;
- break zzForNext;
- case 4:
- zzIsFinal = true;
- zzState = 28;
- break zzForNext;
- case 9:
- zzIsFinal = true;
- zzState = 30;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzState = 29;
- break zzForNext;
- }
-
- case 6:
- switch (zzInput) {
- case 4:
- zzIsFinal = true;
- zzState = 32;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzState = 31;
- break zzForNext;
- }
-
- case 8:
- switch (zzInput) {
- case 1:
- zzState = 33;
- break zzForNext;
- case 11:
- zzState = 34;
- break zzForNext;
- case 19:
- zzState = 35;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 9:
- switch (zzInput) {
- case 12:
- zzState = 36;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 10:
- switch (zzInput) {
- case 13:
- zzState = 37;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 11:
- switch (zzInput) {
- case 6:
- case 7:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 19:
- case 20:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 13:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- break zzForNext;
- case 8:
- zzIsFinal = true;
- zzState = 16;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 15:
- switch (zzInput) {
- case 3:
- zzState = 38;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 16:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 18:
- switch (zzInput) {
- case 21:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 22;
- break zzForNext;
- case 1:
- zzState = 39;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 20:
- switch (zzInput) {
- case 3:
- zzState = 40;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 21:
- switch (zzInput) {
- case 6:
- case 7:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 19:
- case 20:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 23:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 24:
- switch (zzInput) {
- case 4:
- zzState = 41;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 25:
- switch (zzInput) {
- case 6:
- case 7:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 19:
- case 20:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 27:
- switch (zzInput) {
- case 1:
- zzState = 42;
- break zzForNext;
- case 8:
- zzIsFinal = true;
- zzState = 43;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 28:
- switch (zzInput) {
- case 4:
- zzState = 44;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 29:
- switch (zzInput) {
- case 6:
- case 7:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 19:
- case 20:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 30:
- switch (zzInput) {
- case 2:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 19;
- break zzForNext;
- case 1:
- case 10:
- case 22:
- zzState = 45;
- break zzForNext;
- case 3:
- zzState = 46;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 31:
- switch (zzInput) {
- case 4:
- zzState = 48;
- break zzForNext;
- default:
- zzState = 47;
- break zzForNext;
- }
-
- case 32:
- switch (zzInput) {
- case 4:
- zzState = 44;
- break zzForNext;
- default:
- zzState = 47;
- break zzForNext;
- }
-
- case 33:
- switch (zzInput) {
- case 1:
- break zzForNext;
- case 11:
- zzState = 34;
- break zzForNext;
- case 19:
- zzState = 35;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 34:
- switch (zzInput) {
- case 12:
- zzState = 36;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 35:
- switch (zzInput) {
- case 13:
- zzState = 37;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 36:
- switch (zzInput) {
- case 13:
- zzState = 49;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 37:
- switch (zzInput) {
- case 20:
- zzState = 50;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 38:
- switch (zzInput) {
- case 2:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 14;
- break zzForNext;
- default:
- break zzForNext;
- }
-
- case 39:
- switch (zzInput) {
- case 21:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 22;
- break zzForNext;
- case 1:
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 40:
- switch (zzInput) {
- case 2:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 19;
- break zzForNext;
- default:
- break zzForNext;
- }
-
- case 41:
- switch (zzInput) {
- case 4:
- break zzForNext;
- case 1:
- zzState = 51;
- break zzForNext;
- case 2:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 52;
- break zzForNext;
- case 3:
- zzState = 53;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 42:
- switch (zzInput) {
- case 1:
- break zzForNext;
- case 8:
- zzIsFinal = true;
- zzState = 43;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 43:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 44:
- switch (zzInput) {
- case 4:
- break zzForNext;
- case 1:
- zzState = 54;
- break zzForNext;
- case 2:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 55;
- break zzForNext;
- case 3:
- zzState = 56;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 45:
- switch (zzInput) {
- case 2:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 19;
- break zzForNext;
- case 1:
- case 10:
- case 22:
- break zzForNext;
- case 3:
- zzState = 46;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 46:
- switch (zzInput) {
- case 3:
- zzState = 40;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 47:
- switch (zzInput) {
- case 4:
- zzState = 48;
- break zzForNext;
- default:
- break zzForNext;
- }
-
- case 48:
- switch (zzInput) {
- case 4:
- zzState = 44;
- break zzForNext;
- default:
- zzState = 47;
- break zzForNext;
- }
-
- case 49:
- switch (zzInput) {
- case 14:
- zzState = 57;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 50:
- switch (zzInput) {
- case 11:
- zzState = 58;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 51:
- switch (zzInput) {
- case 1:
- break zzForNext;
- case 2:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 52;
- break zzForNext;
- case 3:
- zzState = 53;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 53:
- switch (zzInput) {
- case 3:
- zzState = 59;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 54:
- switch (zzInput) {
- case 1:
- break zzForNext;
- case 2:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 55;
- break zzForNext;
- case 3:
- zzState = 56;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 56:
- switch (zzInput) {
- case 3:
- zzState = 60;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 57:
- switch (zzInput) {
- case 15:
- zzState = 61;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 58:
- switch (zzInput) {
- case 12:
- zzState = 62;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 59:
- switch (zzInput) {
- case 2:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 52;
- break zzForNext;
- default:
- break zzForNext;
- }
-
- case 60:
- switch (zzInput) {
- case 2:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 55;
- break zzForNext;
- default:
- break zzForNext;
- }
-
- case 61:
- switch (zzInput) {
- case 16:
- zzState = 63;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 62:
- switch (zzInput) {
- case 13:
- zzState = 64;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 63:
- switch (zzInput) {
- case 17:
- zzState = 65;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 64:
- switch (zzInput) {
- case 14:
- zzState = 66;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 65:
- switch (zzInput) {
- case 13:
- zzState = 67;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 66:
- switch (zzInput) {
- case 15:
- zzState = 68;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 67:
- switch (zzInput) {
- case 18:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 12;
- break zzForNext;
- case 1:
- zzIsFinal = true;
- zzState = 69;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 68:
- switch (zzInput) {
- case 16:
- zzState = 70;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 69:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 70:
- switch (zzInput) {
- case 17:
- zzState = 71;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 71:
- switch (zzInput) {
- case 13:
- zzState = 72;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 72:
- switch (zzInput) {
- case 6:
- case 7:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 19:
- case 20:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 73;
- break zzForNext;
- }
-
- default:
- // if this is ever reached, there is a serious bug in JFlex
- zzScanError(ZZ_UNKNOWN_ERROR);
- break;
- }
- }
-
- if ( zzIsFinal ) {
- zzAction = zzState;
- zzMarkedPosL = zzCurrentPosL;
- if ( zzNoLookAhead ) {
- break zzForAction;
- }
- }
-
- }
+
+ if (zzCurrentPosL < zzEndReadL) {
+ zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
+ zzCurrentPosL += Character.charCount(zzInput);
+ }
+ else if (zzAtEOF) {
+ zzInput = YYEOF;
+ break zzForAction;
+ }
+ else {
+ // store back cached positions
+ zzCurrentPos = zzCurrentPosL;
+ zzMarkedPos = zzMarkedPosL;
+ boolean eof = zzRefill();
+ // get translated positions and possibly new buffer
+ zzCurrentPosL = zzCurrentPos;
+ zzMarkedPosL = zzMarkedPos;
+ zzBufferL = zzBuffer;
+ zzEndReadL = zzEndRead;
+ if (eof) {
+ zzInput = YYEOF;
+ break zzForAction;
}
+ else {
+ zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
+ zzCurrentPosL += Character.charCount(zzInput);
+ }
+ }
+ int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+ if (zzNext == -1) break zzForAction;
+ zzState = zzNext;
+
+ zzAttributes = zzAttrL[zzState];
+ if ( (zzAttributes & 1) == 1 ) {
+ zzAction = zzState;
+ zzMarkedPosL = zzCurrentPosL;
+ if ( (zzAttributes & 8) == 8 ) break zzForAction;
+ }
- // store back cached position
- zzMarkedPos = zzMarkedPosL;
-
- switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
- case 5 : {
- functionName = id;
- return ScilabDocument.ScilabLeafElement.FUN;
- }
- case 19:
- break;
- case 15: {
- inRETS = true;
- return ScilabDocument.ScilabLeafElement.BROKEN;
- }
- case 20:
- break;
- case 9: {
- functionName = yytext();
- }
- case 21:
- break;
- case 13: {
- return 0;
- }
- case 22:
- break;
- case 6: {
- returnValues.add(id);
- yybegin(FUNNAME);
- }
- case 23:
- break;
- case 1: {
- return ScilabDocument.ScilabLeafElement.NOTHING;
- }
- case 24:
- break;
- case 16: {
- return ScilabDocument.ScilabLeafElement.BROKEN;
- }
- case 25:
- break;
- case 12: {
- argsValues.add(yytext());
- }
- case 26:
- break;
- case 2: {
- id = yytext();
- yybegin(TYPEID);
- }
- case 27:
- break;
- case 10: {
- yybegin(ARGS);
- }
- case 28:
- break;
- case 18: {
- return ScilabDocument.ScilabLeafElement.ENDFUN;
- }
- case 29:
- break;
- case 3: {
- yybegin(RETS);
- }
- case 30:
- break;
- case 8: {
- return ScilabDocument.ScilabLeafElement.FUN;
- }
- case 31:
- break;
- case 7: {
- functionName = id;
- yybegin(ARGS);
- }
- case 32:
- break;
- case 17: {
- yybegin(FUNCTION);
- }
- case 33:
- break;
- case 11: {
- returnValues.add(yytext());
- }
- case 34:
- break;
- case 14: {
- yybegin(FUNNAME);
- }
- case 35:
- break;
- case 4: {
- }
- case 36:
- break;
- default:
- if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
- zzAtEOF = true;
- {
- return ScilabDocument.ScilabLeafElement.NOTHING;
- }
- } else {
- zzScanError(ZZ_NO_MATCH);
- }
+ }
+ }
+
+ // store back cached position
+ zzMarkedPos = zzMarkedPosL;
+
+ if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+ zzAtEOF = true;
+ { return ScilabDocument.ScilabLeafElement.NOTHING;
+ }
+ }
+ else {
+ switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+ case 1:
+ { return ScilabDocument.ScilabLeafElement.NOTHING;
+ }
+ case 19: break;
+ case 2:
+ { id = yytext();
+ yybegin(TYPEID);
+ }
+ case 20: break;
+ case 3:
+ { yybegin(RETS);
+ }
+ case 21: break;
+ case 4:
+ {
+ }
+ case 22: break;
+ case 5:
+ { functionName = id;
+ return ScilabDocument.ScilabLeafElement.FUN;
+ }
+ case 23: break;
+ case 6:
+ { returnValues.add(id);
+ yybegin(FUNNAME);
+ }
+ case 24: break;
+ case 7:
+ { functionName = id;
+ yybegin(ARGS);
+ }
+ case 25: break;
+ case 8:
+ { return ScilabDocument.ScilabLeafElement.FUN;
+ }
+ case 26: break;
+ case 9:
+ { functionName = yytext();
+ }
+ case 27: break;
+ case 10:
+ { yybegin(ARGS);
+ }
+ case 28: break;
+ case 11:
+ { returnValues.add(yytext());
+ }
+ case 29: break;
+ case 12:
+ { argsValues.add(yytext());
+ }
+ case 30: break;
+ case 13:
+ { return 0;
+ }
+ case 31: break;
+ case 14:
+ { yybegin(FUNNAME);
+ }
+ case 32: break;
+ case 15:
+ { MatchingBlockScanner.MatchingPositions pos = matchBlock.getMatchingBlock(start + yychar + yylength(), false);
+ if (pos != null) {
+ try {
+ String match = doc.getText(pos.secondB, pos.secondE - pos.secondB);
+ if (match.equals("function")) {
+ return ScilabDocument.ScilabLeafElement.ENDFUN;
+ }
+ } catch (BadLocationException e) { }
+ }
+ }
+ case 33: break;
+ case 16:
+ { return ScilabDocument.ScilabLeafElement.BROKEN;
+ }
+ case 34: break;
+ case 17:
+ { yybegin(FUNCTION);
+ }
+ case 35: break;
+ case 18:
+ { return ScilabDocument.ScilabLeafElement.ENDFUN;
}
+ case 36: break;
+ default:
+ zzScanError(ZZ_NO_MATCH);
}
+ }
}
+ }
}
-/* The following code was generated by JFlex 1.4.3 on 23/05/12 15:23 */
+/* The following code was generated by JFlex 1.6.1 */
-//CHECKSTYLE:OFF
+//CHECKSTYLE:OFF
package org.scilab.modules.scinotes;
@SuppressWarnings("fallthrough")
/**
- * This class is a scanner generated by
- * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
- * on 23/05/12 15:23 from the specification file
- * <tt>./jflex/indentation.jflex</tt>
+ * This class is a scanner generated by
+ * <a href="http://www.jflex.de/">JFlex</a> 1.6.1
+ * from the specification file <tt>../../../../jflex/indentation.jflex</tt>
*/
public final class IndentScanner {
- /** This character denotes the end of file */
- public static final int YYEOF = -1;
-
- /** initial size of the lookahead buffer */
- private static final int ZZ_BUFFERSIZE = 16384;
-
- /** lexical states */
- public static final int BEG = 8;
- public static final int TAB = 6;
- public static final int WHITE = 4;
- public static final int YYINITIAL = 0;
- public static final int INDENT = 2;
-
- /**
- * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
- * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
- * at the beginning of a line
- * l is of the form l = 2*k, k a non negative integer
- */
- private static final int ZZ_LEXSTATE[] = {
- 0, 0, 1, 1, 2, 2, 3, 3, 4, 5
- };
-
- /**
- * Translates characters to character classes
- */
- private static final String ZZ_CMAP_PACKED =
- "\11\0\1\31\1\1\2\0\1\4\22\0\1\30\1\3\1\6\3\3" +
- "\1\0\1\5\1\0\1\7\5\0\1\2\12\3\5\0\1\3\1\0" +
- "\32\3\2\0\1\7\1\0\1\3\1\0\1\27\1\3\1\13\1\26" +
- "\1\23\1\10\1\3\1\21\1\15\2\3\1\22\1\3\1\12\1\16" +
- "\2\3\1\17\1\25\1\14\1\11\1\3\1\20\1\3\1\24\1\3" +
- "\2\0\1\7\uff82\0";
-
- /**
- * Translates characters to character classes
- */
- private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
-
- /**
- * Translates DFA states to action switch labels.
- */
- private static final int [] ZZ_ACTION = zzUnpackAction();
-
- private static final String ZZ_ACTION_PACKED_0 =
- "\2\0\2\1\2\0\1\2\1\3\13\2\2\1\1\4" +
- "\11\0\1\2\4\0\1\4\17\0\1\2\1\0\1\5" +
- "\6\0\1\2\4\0\1\6\1\0\1\2\1\6\4\0" +
- "\1\2\2\0\2\2\4\0\1\2\2\0\1\2\1\0" +
- "\3\2\1\5";
-
- private static int [] zzUnpackAction() {
- int [] result = new int[92];
- int offset = 0;
- offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
- return result;
+ /** This character denotes the end of file */
+ public static final int YYEOF = -1;
+
+ /** initial size of the lookahead buffer */
+ private static final int ZZ_BUFFERSIZE = 16384;
+
+ /** lexical states */
+ public static final int YYINITIAL = 0;
+ public static final int INDENT = 2;
+ public static final int WHITE = 4;
+ public static final int TAB = 6;
+ public static final int BEG = 8;
+
+ /**
+ * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
+ * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
+ * at the beginning of a line
+ * l is of the form l = 2*k, k a non negative integer
+ */
+ private static final int ZZ_LEXSTATE[] = {
+ 0, 0, 1, 1, 2, 2, 3, 3, 4, 5
+ };
+
+ /**
+ * Translates characters to character classes
+ */
+ private static final String ZZ_CMAP_PACKED =
+ "\11\0\1\32\1\1\1\4\1\4\1\3\22\0\1\31\1\5\1\7"+
+ "\3\5\1\0\1\6\1\0\1\10\5\0\1\2\12\5\5\0\1\5"+
+ "\1\0\32\5\2\0\1\10\1\0\1\5\1\0\1\30\1\5\1\14"+
+ "\1\27\1\24\1\11\1\5\1\22\1\16\2\5\1\23\1\5\1\13"+
+ "\1\17\2\5\1\20\1\26\1\15\1\12\1\5\1\21\1\5\1\25"+
+ "\1\5\2\0\1\10\7\0\1\4\u1fa2\0\1\4\1\4\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\udfe6\0";
+
+ /**
+ * Translates characters to character classes
+ */
+ private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
+
+ /**
+ * Translates DFA states to action switch labels.
+ */
+ private static final int [] ZZ_ACTION = zzUnpackAction();
+
+ private static final String ZZ_ACTION_PACKED_0 =
+ "\2\0\2\1\2\0\1\2\1\3\14\2\2\1\1\4"+
+ "\12\0\1\2\4\0\1\4\23\0\1\2\2\0\1\5"+
+ "\10\0\1\2\5\0\1\6\2\0\1\2\1\6\6\0"+
+ "\1\2\3\0\2\2\7\0\1\2\4\0\1\2\2\0"+
+ "\3\2\1\5";
+
+ private static int [] zzUnpackAction() {
+ int [] result = new int[112];
+ int offset = 0;
+ offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackAction(String packed, int offset, int [] result) {
+ int i = 0; /* index in packed string */
+ int j = offset; /* index in unpacked array */
+ int l = packed.length();
+ while (i < l) {
+ int count = packed.charAt(i++);
+ int value = packed.charAt(i++);
+ do result[j++] = value; while (--count > 0);
}
-
- private static int zzUnpackAction(String packed, int offset, int [] result) {
- int i = 0; /* index in packed string */
- int j = offset; /* index in unpacked array */
- int l = packed.length();
- while (i < l) {
- int count = packed.charAt(i++);
- int value = packed.charAt(i++);
- do {
- result[j++] = value;
- } while (--count > 0);
- }
- return j;
+ return j;
+ }
+
+
+ /**
+ * Translates a state to a row index in the transition table
+ */
+ private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+ private static final String ZZ_ROWMAP_PACKED_0 =
+ "\0\0\0\33\0\66\0\121\0\154\0\207\0\0\0\0"+
+ "\0\242\0\275\0\330\0\363\0\u010e\0\u0129\0\u0144\0\u015f"+
+ "\0\u017a\0\u0195\0\u01b0\0\u01cb\0\u01e6\0\u0201\0\u021c\0\u0237"+
+ "\0\u0252\0\u026d\0\u0288\0\u02a3\0\u02be\0\u02d9\0\u02f4\0\u030f"+
+ "\0\330\0\u032a\0\u0345\0\u0360\0\u037b\0\u0396\0\u03b1\0\u03cc"+
+ "\0\u03e7\0\u0402\0\u041d\0\u0438\0\u0453\0\u046e\0\u0489\0\u04a4"+
+ "\0\u04bf\0\u04da\0\u04f5\0\u0510\0\u052b\0\u0546\0\u0561\0\u057c"+
+ "\0\u0597\0\u05b2\0\u03b1\0\u05cd\0\u05e8\0\u0603\0\u061e\0\u0639"+
+ "\0\u0654\0\u066f\0\u068a\0\u06a5\0\u06c0\0\u06db\0\u06f6\0\u0711"+
+ "\0\u072c\0\u0747\0\u0762\0\u077d\0\u03b1\0\u0798\0\u07b3\0\u07ce"+
+ "\0\u07e9\0\u0804\0\u081f\0\u083a\0\u0855\0\u0870\0\u088b\0\u08a6"+
+ "\0\u08c1\0\u08dc\0\u08f7\0\u0912\0\u092d\0\u0948\0\u0963\0\u097e"+
+ "\0\u0999\0\u09b4\0\u09cf\0\u09ea\0\u0a05\0\u0a20\0\u0a3b\0\u0a56"+
+ "\0\u0a71\0\u0a8c\0\u0aa7\0\u0ac2\0\u0add\0\u0af8\0\u0b13\0\u03b1";
+
+ private static int [] zzUnpackRowMap() {
+ int [] result = new int[112];
+ int offset = 0;
+ offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+ int i = 0; /* index in packed string */
+ int j = offset; /* index in unpacked array */
+ int l = packed.length();
+ while (i < l) {
+ int high = packed.charAt(i++) << 16;
+ result[j++] = high | packed.charAt(i++);
}
+ return j;
+ }
+
+ /**
+ * The transition table of the DFA
+ */
+ private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+ private static final String ZZ_TRANS_PACKED_0 =
+ "\33\0\1\7\1\10\1\11\2\0\1\12\2\13\1\14"+
+ "\1\15\2\12\1\16\1\17\1\20\1\21\1\12\1\22"+
+ "\2\12\1\23\1\12\1\24\2\12\2\7\3\10\2\0"+
+ "\24\10\1\25\4\10\2\0\25\10\1\26\3\7\2\0"+
+ "\31\7\2\0\24\7\2\27\2\0\1\30\36\0\1\7"+
+ "\2\0\1\31\2\0\1\32\1\33\1\34\1\35\1\0"+
+ "\1\36\2\0\1\37\1\0\1\40\4\0\1\41\1\0"+
+ "\1\41\1\0\2\41\2\42\23\41\6\0\1\7\32\0"+
+ "\1\7\2\0\1\31\1\43\1\0\1\32\1\33\1\34"+
+ "\1\44\1\0\1\36\2\0\1\37\1\0\1\40\12\0"+
+ "\1\7\2\0\1\31\2\0\1\32\1\33\1\34\1\35"+
+ "\1\0\1\36\2\0\1\37\1\0\1\40\1\0\1\45"+
+ "\10\0\1\7\2\0\1\31\2\0\1\32\1\33\1\34"+
+ "\1\35\1\46\1\36\2\0\1\37\1\0\1\40\12\0"+
+ "\1\7\2\0\1\47\2\0\1\32\1\33\1\34\1\35"+
+ "\1\0\1\36\2\0\1\37\1\0\1\40\12\0\1\7"+
+ "\2\0\1\31\2\0\1\32\1\50\1\34\1\35\1\0"+
+ "\1\36\2\0\1\37\1\0\1\40\12\0\1\7\2\0"+
+ "\1\31\2\0\1\32\1\33\1\34\1\35\1\0\1\36"+
+ "\1\51\1\0\1\37\1\0\1\40\12\0\1\7\2\0"+
+ "\1\31\1\0\1\52\1\32\1\33\1\34\1\35\1\0"+
+ "\1\36\1\0\1\53\1\37\1\0\1\40\12\0\1\7"+
+ "\2\0\1\31\2\0\1\32\1\33\1\34\1\35\1\0"+
+ "\1\54\2\0\1\55\1\0\1\40\35\0\1\25\33\0"+
+ "\1\26\31\0\2\27\1\30\1\7\1\30\2\0\26\30"+
+ "\12\0\1\56\4\0\1\57\43\0\1\60\22\0\1\61"+
+ "\23\0\1\7\36\0\1\62\37\0\1\63\23\0\1\64"+
+ "\7\0\1\65\30\0\1\66\2\0\1\67\14\0\2\41"+
+ "\36\0\1\70\34\0\1\62\2\0\1\47\27\0\1\71"+
+ "\10\0\1\72\31\0\1\47\12\0\1\73\3\0\20\73"+
+ "\22\0\1\61\1\0\1\74\26\0\1\75\43\0\1\76"+
+ "\31\0\1\77\22\0\1\100\3\0\1\63\23\0\1\64"+
+ "\7\0\1\101\22\0\1\102\37\0\1\7\27\0\1\103"+
+ "\10\0\1\104\31\0\1\7\27\0\1\105\26\0\1\106"+
+ "\43\0\1\107\31\0\1\110\22\0\1\111\37\0\1\112"+
+ "\23\0\1\113\32\0\1\114\42\0\1\115\32\0\1\116"+
+ "\31\0\1\117\14\0\1\73\3\0\1\120\17\73\26\0"+
+ "\1\121\23\0\1\122\41\0\1\123\1\0\1\110\20\0"+
+ "\1\124\32\0\1\125\42\0\1\7\32\0\1\126\31\0"+
+ "\1\104\20\0\1\127\45\0\1\130\23\0\1\103\41\0"+
+ "\1\131\23\0\1\132\37\0\1\115\30\0\1\133\36\0"+
+ "\1\47\13\0\1\73\3\0\1\73\1\134\16\73\7\0"+
+ "\1\73\3\0\5\73\1\135\12\73\16\0\1\136\32\0"+
+ "\1\137\33\0\1\140\37\0\1\7\30\0\1\141\24\0"+
+ "\1\56\36\0\1\34\30\0\1\142\34\0\1\143\35\0"+
+ "\1\144\16\0\1\73\3\0\2\73\1\145\15\73\7\0"+
+ "\1\73\3\0\1\115\17\73\24\0\1\47\25\0\1\47"+
+ "\33\0\1\146\35\0\1\147\26\0\1\7\34\0\1\150"+
+ "\31\0\1\151\21\0\1\73\3\0\3\73\1\152\14\73"+
+ "\21\0\1\153\31\0\1\154\27\0\1\47\45\0\1\72"+
+ "\11\0\1\73\3\0\4\73\1\155\13\73\15\0\1\7"+
+ "\45\0\1\104\11\0\1\73\3\0\5\73\1\156\12\73"+
+ "\7\0\1\73\3\0\6\73\1\157\11\73\7\0\1\73"+
+ "\3\0\2\73\1\160\15\73\2\0";
+
+ private static int [] zzUnpackTrans() {
+ int [] result = new int[2862];
+ int offset = 0;
+ offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackTrans(String packed, int offset, int [] result) {
+ int i = 0; /* index in packed string */
+ int j = offset; /* index in unpacked array */
+ int l = packed.length();
+ while (i < l) {
+ int count = packed.charAt(i++);
+ int value = packed.charAt(i++);
+ value--;
+ do result[j++] = value; while (--count > 0);
+ }
+ return j;
+ }
+
+
+ /* error codes */
+ private static final int ZZ_UNKNOWN_ERROR = 0;
+ private static final int ZZ_NO_MATCH = 1;
+ private static final int ZZ_PUSHBACK_2BIG = 2;
+
+ /* error messages for the codes above */
+ private static final String ZZ_ERROR_MSG[] = {
+ "Unknown internal scanner error",
+ "Error: could not match input",
+ "Error: pushback value was too large"
+ };
+
+ /**
+ * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+ */
+ private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+ private static final String ZZ_ATTRIBUTE_PACKED_0 =
+ "\1\10\1\0\2\1\2\0\2\11\17\1\12\0\1\1"+
+ "\4\0\1\1\23\0\1\1\2\0\1\1\10\0\1\1"+
+ "\5\0\1\1\2\0\2\1\6\0\1\1\3\0\2\1"+
+ "\7\0\1\1\4\0\1\1\2\0\4\1";
+
+ private static int [] zzUnpackAttribute() {
+ int [] result = new int[112];
+ int offset = 0;
+ offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+ int i = 0; /* index in packed string */
+ int j = offset; /* index in unpacked array */
+ int l = packed.length();
+ while (i < l) {
+ int count = packed.charAt(i++);
+ int value = packed.charAt(i++);
+ do result[j++] = value; while (--count > 0);
+ }
+ return j;
+ }
+ /** the input device */
+ private java.io.Reader zzReader;
- /* error codes */
- private static final int ZZ_UNKNOWN_ERROR = 0;
- private static final int ZZ_NO_MATCH = 1;
- private static final int ZZ_PUSHBACK_2BIG = 2;
-
- /* error messages for the codes above */
- private static final String ZZ_ERROR_MSG[] = {
- "Unkown internal scanner error",
- "Error: could not match input",
- "Error: pushback value was too large"
- };
-
- /** the input device */
- private java.io.Reader zzReader;
-
- /** the current state of the DFA */
- private int zzState;
+ /** the current state of the DFA */
+ private int zzState;
- /** the current lexical state */
- private int zzLexicalState = YYINITIAL;
+ /** the current lexical state */
+ private int zzLexicalState = YYINITIAL;
- /** this buffer contains the current text to be matched and is
- the source of the yytext() string */
- private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
+ /** this buffer contains the current text to be matched and is
+ the source of the yytext() string */
+ private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
- /** the textposition at the last accepting state */
- private int zzMarkedPos;
+ /** the textposition at the last accepting state */
+ private int zzMarkedPos;
- /** the current text position in the buffer */
- private int zzCurrentPos;
+ /** the current text position in the buffer */
+ private int zzCurrentPos;
- /** startRead marks the beginning of the yytext() string in the buffer */
- private int zzStartRead;
+ /** startRead marks the beginning of the yytext() string in the buffer */
+ private int zzStartRead;
- /** endRead marks the last character in the buffer, that has been read
- from input */
- private int zzEndRead;
+ /** endRead marks the last character in the buffer, that has been read
+ from input */
+ private int zzEndRead;
- /** number of newlines encountered up to the start of the matched text */
- private int yyline;
+ /** number of newlines encountered up to the start of the matched text */
+ private int yyline;
- /** the number of characters up to the start of the matched text */
- private int yychar;
+ /** the number of characters up to the start of the matched text */
+ private int yychar;
- /**
- * the number of characters from the last newline up to the start of the
- * matched text
- */
- private int yycolumn;
+ /**
+ * the number of characters from the last newline up to the start of the
+ * matched text
+ */
+ private int yycolumn;
- /**
- * zzAtBOL == true <=> the scanner is currently at the beginning of a line
- */
- private boolean zzAtBOL = true;
+ /**
+ * zzAtBOL == true <=> the scanner is currently at the beginning of a line
+ */
+ private boolean zzAtBOL = true;
- /** zzAtEOF == true <=> the scanner is at the EOF */
- private boolean zzAtEOF;
+ /** zzAtEOF == true <=> the scanner is at the EOF */
+ private boolean zzAtEOF;
- /** denotes if the user-EOF-code has already been executed */
- private boolean zzEOFDone;
+ /** denotes if the user-EOF-code has already been executed */
+ private boolean zzEOFDone;
+
+ /**
+ * The number of occupied positions in zzBuffer beyond zzEndRead.
+ * When a lead/high surrogate has been read from the input stream
+ * into the final zzBuffer position, this will have a value of 1;
+ * otherwise, it will have a value of 0.
+ */
+ private int zzFinalHighSurrogate = 0;
- /* user code: */
+ /* user code: */
private ScilabDocument doc;
private Element elem;
public IndentScanner(ScilabDocument doc) {
- this.doc = doc;
- this.elem = doc.getDefaultRootElement();
+ this.doc = doc;
+ this.elem = doc.getDefaultRootElement();
}
-
+
public int getIndentNumber(int lineNumber, char type) {
if (lineNumber < 0) {
- return 0;
- }
+ return 0;
+ }
try {
- Element line = elem.getElement(lineNumber);
- int startL = line.getStartOffset();
- int endL = line.getEndOffset();
- yyreset(new ScilabDocumentReader(doc, startL, endL));
- switch (type) {
- case ' ':
- yybegin(WHITE);
- break;
- case '\t':
- yybegin(TAB);
- break;
- default:
- yybegin(WHITE);
- }
- return yylex();
- } catch (IOException e) {
- return 0;
- }
- }
+ Element line = elem.getElement(lineNumber);
+ int startL = line.getStartOffset();
+ int endL = line.getEndOffset();
+ yyreset(new ScilabDocumentReader(doc, startL, endL));
+ switch (type) {
+ case ' ':
+ yybegin(WHITE);
+ break;
+ case '\t':
+ yybegin(TAB);
+ break;
+ default:
+ yybegin(WHITE);
+ }
+ return yylex();
+ } catch (IOException e) {
+ return 0;
+ }
+ }
public int getTabsAtBeginning(int pos) {
- Element line = elem.getElement(pos);
- int startL = line.getStartOffset();
- int endL = line.getEndOffset();
- try {
- yyreset(new ScilabDocumentReader(doc, startL, endL));
- yybegin(BEG);
- if (yylex() == 1) {
- return yylength();
- }
- } catch (IOException e) {
- return 0;
- }
- return 0;
- }
+ Element line = elem.getElement(pos);
+ int startL = line.getStartOffset();
+ int endL = line.getEndOffset();
+ try {
+ yyreset(new ScilabDocumentReader(doc, startL, endL));
+ yybegin(BEG);
+ if (yylex() == 1) {
+ return yylength();
+ }
+ } catch (IOException e) {
+ return 0;
+ }
+ return 0;
+ }
public void getIndentLevel(int pos, int[] level) {
- Element line = elem.getElement(elem.getElementIndex(pos));
- int startL = line.getStartOffset();
- int endL = line.getEndOffset();
- level[0] = 0;
- level[1] = 0;
- try {
- yyreset(new ScilabDocumentReader(doc, startL, endL));
- yybegin(INDENT);
- do {
- switch (yylex()) {
- case 0:
- break;
- case 1:
- level[1]++;
- break;
- case 2:
- if (level[1] > 0) {
- level[1]--;
- } else {
- level[0]++;
- }
- break;
- case 3:
- if (level[1] == 0) {
- level[0]++;
- level[1]++;
- }
- }
- } while (zzMarkedPos != 0);
- } catch (IOException e) { }
+ Element line = elem.getElement(elem.getElementIndex(pos));
+ int startL = line.getStartOffset();
+ int endL = line.getEndOffset();
+ level[0] = 0;
+ level[1] = 0;
+ try {
+ yyreset(new ScilabDocumentReader(doc, startL, endL));
+ yybegin(INDENT);
+ do {
+ switch (yylex()) {
+ case 0:
+ break;
+ case 1:
+ level[1]++;
+ break;
+ case 2:
+ if (level[1] > 0) {
+ level[1]--;
+ } else {
+ level[0]++;
+ }
+ break;
+ case 3:
+ if (level[1] == 0) {
+ level[0]++;
+ level[1]++;
+ }
+ }
+ } while (zzMarkedPos != 0);
+ } catch (IOException e) { }
}
- /**
- * Creates a new scanner
- * There is also a java.io.InputStream version of this constructor.
- *
- * @param in the java.io.Reader to read input from.
- */
- public IndentScanner(java.io.Reader in) {
- this.zzReader = in;
+ /**
+ * Creates a new scanner
+ *
+ * @param in the java.io.Reader to read input from.
+ */
+ public IndentScanner(java.io.Reader in) {
+ this.zzReader = in;
+ }
+
+
+ /**
+ * Unpacks the compressed character translation table.
+ *
+ * @param packed the packed character translation table
+ * @return the unpacked character translation table
+ */
+ private static char [] zzUnpackCMap(String packed) {
+ char [] map = new char[0x110000];
+ int i = 0; /* index in packed string */
+ int j = 0; /* index in unpacked array */
+ while (i < 150) {
+ int count = packed.charAt(i++);
+ char value = packed.charAt(i++);
+ do map[j++] = value; while (--count > 0);
}
-
- /**
- * Creates a new scanner.
- * There is also java.io.Reader version of this constructor.
- *
- * @param in the java.io.Inputstream to read input from.
- */
- public IndentScanner(java.io.InputStream in) {
- this(new java.io.InputStreamReader(in));
+ return map;
+ }
+
+
+ /**
+ * Refills the input buffer.
+ *
+ * @return <code>false</code>, iff there was new input.
+ *
+ * @exception java.io.IOException if any I/O-Error occurs
+ */
+ private boolean zzRefill() throws java.io.IOException {
+
+ /* first: make room (if you can) */
+ if (zzStartRead > 0) {
+ zzEndRead += zzFinalHighSurrogate;
+ zzFinalHighSurrogate = 0;
+ System.arraycopy(zzBuffer, zzStartRead,
+ zzBuffer, 0,
+ zzEndRead-zzStartRead);
+
+ /* translate stored positions */
+ zzEndRead-= zzStartRead;
+ zzCurrentPos-= zzStartRead;
+ zzMarkedPos-= zzStartRead;
+ zzStartRead = 0;
}
- /**
- * Unpacks the compressed character translation table.
- *
- * @param packed the packed character translation table
- * @return the unpacked character translation table
- */
- private static char [] zzUnpackCMap(String packed) {
- char [] map = new char[0x10000];
- int i = 0; /* index in packed string */
- int j = 0; /* index in unpacked array */
- while (i < 106) {
- int count = packed.charAt(i++);
- char value = packed.charAt(i++);
- do {
- map[j++] = value;
- } while (--count > 0);
- }
- return map;
+ /* is the buffer big enough? */
+ if (zzCurrentPos >= zzBuffer.length - zzFinalHighSurrogate) {
+ /* if not: blow it up */
+ char newBuffer[] = new char[zzBuffer.length*2];
+ System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
+ zzBuffer = newBuffer;
+ zzEndRead += zzFinalHighSurrogate;
+ zzFinalHighSurrogate = 0;
}
+ /* fill the buffer with new input */
+ int requested = zzBuffer.length - zzEndRead;
+ int numRead = zzReader.read(zzBuffer, zzEndRead, requested);
- /**
- * Refills the input buffer.
- *
- * @return <code>false</code>, iff there was new input.
- *
- * @exception java.io.IOException if any I/O-Error occurs
- */
- private boolean zzRefill() throws java.io.IOException {
-
- /* first: make room (if you can) */
- if (zzStartRead > 0) {
- System.arraycopy(zzBuffer, zzStartRead,
- zzBuffer, 0,
- zzEndRead - zzStartRead);
-
- /* translate stored positions */
- zzEndRead -= zzStartRead;
- zzCurrentPos -= zzStartRead;
- zzMarkedPos -= zzStartRead;
- zzStartRead = 0;
- }
-
- /* is the buffer big enough? */
- if (zzCurrentPos >= zzBuffer.length) {
- /* if not: blow it up */
- char newBuffer[] = new char[zzCurrentPos * 2];
- System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
- zzBuffer = newBuffer;
- }
-
- /* finally: fill the buffer with new input */
- int numRead = zzReader.read(zzBuffer, zzEndRead,
- zzBuffer.length - zzEndRead);
-
- if (numRead > 0) {
- zzEndRead += numRead;
- return false;
- }
- // unlikely but not impossible: read 0 characters, but not at end of stream
- if (numRead == 0) {
- int c = zzReader.read();
- if (c == -1) {
- return true;
- } else {
- zzBuffer[zzEndRead++] = (char) c;
- return false;
- }
- }
-
- // numRead < 0
- return true;
+ /* not supposed to occur according to specification of java.io.Reader */
+ if (numRead == 0) {
+ throw new java.io.IOException("Reader returned 0 characters. See JFlex examples for workaround.");
}
-
-
- /**
- * Closes the input stream.
- */
- public final void yyclose() throws java.io.IOException {
- zzAtEOF = true; /* indicate end of file */
- zzEndRead = zzStartRead; /* invalidate buffer */
-
- if (zzReader != null) {
- zzReader.close();
+ if (numRead > 0) {
+ zzEndRead += numRead;
+ /* If numRead == requested, we might have requested to few chars to
+ encode a full Unicode character. We assume that a Reader would
+ otherwise never return half characters. */
+ if (numRead == requested) {
+ if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
+ --zzEndRead;
+ zzFinalHighSurrogate = 1;
}
+ }
+ /* potentially more input available */
+ return false;
}
-
- /**
- * Resets the scanner to read from a new input stream.
- * Does not close the old reader.
- *
- * All internal variables are reset, the old input stream
- * <b>cannot</b> be reused (internal buffer is discarded and lost).
- * Lexical state is set to <tt>ZZ_INITIAL</tt>.
- *
- * @param reader the new input stream
- */
- public final void yyreset(java.io.Reader reader) {
- zzReader = reader;
- zzAtBOL = true;
- zzAtEOF = false;
- zzEOFDone = false;
- zzEndRead = zzStartRead = 0;
- zzCurrentPos = zzMarkedPos = 0;
- yyline = yychar = yycolumn = 0;
- zzLexicalState = YYINITIAL;
- }
-
-
- /**
- * Returns the current lexical state.
- */
- public final int yystate() {
- return zzLexicalState;
+ /* numRead < 0 ==> end of stream */
+ return true;
+ }
+
+
+ /**
+ * Closes the input stream.
+ */
+ public final void yyclose() throws java.io.IOException {
+ zzAtEOF = true; /* indicate end of file */
+ zzEndRead = zzStartRead; /* invalidate buffer */
+
+ if (zzReader != null)
+ zzReader.close();
+ }
+
+
+ /**
+ * Resets the scanner to read from a new input stream.
+ * Does not close the old reader.
+ *
+ * All internal variables are reset, the old input stream
+ * <b>cannot</b> be reused (internal buffer is discarded and lost).
+ * Lexical state is set to <tt>ZZ_INITIAL</tt>.
+ *
+ * Internal scan buffer is resized down to its initial length, if it has grown.
+ *
+ * @param reader the new input stream
+ */
+ public final void yyreset(java.io.Reader reader) {
+ zzReader = reader;
+ zzAtBOL = true;
+ zzAtEOF = false;
+ zzEOFDone = false;
+ zzEndRead = zzStartRead = 0;
+ zzCurrentPos = zzMarkedPos = 0;
+ zzFinalHighSurrogate = 0;
+ yyline = yychar = yycolumn = 0;
+ zzLexicalState = YYINITIAL;
+ if (zzBuffer.length > ZZ_BUFFERSIZE)
+ zzBuffer = new char[ZZ_BUFFERSIZE];
+ }
+
+
+ /**
+ * Returns the current lexical state.
+ */
+ public final int yystate() {
+ return zzLexicalState;
+ }
+
+
+ /**
+ * Enters a new lexical state
+ *
+ * @param newState the new lexical state
+ */
+ public final void yybegin(int newState) {
+ zzLexicalState = newState;
+ }
+
+
+ /**
+ * Returns the text matched by the current regular expression.
+ */
+ public final String yytext() {
+ return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
+ }
+
+
+ /**
+ * Returns the character at position <tt>pos</tt> from the
+ * matched text.
+ *
+ * It is equivalent to yytext().charAt(pos), but faster
+ *
+ * @param pos the position of the character to fetch.
+ * A value from 0 to yylength()-1.
+ *
+ * @return the character at position pos
+ */
+ public final char yycharat(int pos) {
+ return zzBuffer[zzStartRead+pos];
+ }
+
+
+ /**
+ * Returns the length of the matched text region.
+ */
+ public final int yylength() {
+ return zzMarkedPos-zzStartRead;
+ }
+
+
+ /**
+ * Reports an error that occured while scanning.
+ *
+ * In a wellformed scanner (no or only correct usage of
+ * yypushback(int) and a match-all fallback rule) this method
+ * will only be called with things that "Can't Possibly Happen".
+ * If this method is called, something is seriously wrong
+ * (e.g. a JFlex bug producing a faulty scanner etc.).
+ *
+ * Usual syntax/scanner level error handling should be done
+ * in error fallback rules.
+ *
+ * @param errorCode the code of the errormessage to display
+ */
+ private void zzScanError(int errorCode) {
+ String message;
+ try {
+ message = ZZ_ERROR_MSG[errorCode];
}
-
-
- /**
- * Enters a new lexical state
- *
- * @param newState the new lexical state
- */
- public final void yybegin(int newState) {
- zzLexicalState = newState;
- }
-
-
- /**
- * Returns the text matched by the current regular expression.
- */
- public final String yytext() {
- return new String( zzBuffer, zzStartRead, zzMarkedPos - zzStartRead );
- }
-
-
- /**
- * Returns the character at position <tt>pos</tt> from the
- * matched text.
- *
- * It is equivalent to yytext().charAt(pos), but faster
- *
- * @param pos the position of the character to fetch.
- * A value from 0 to yylength()-1.
- *
- * @return the character at position pos
- */
- public final char yycharat(int pos) {
- return zzBuffer[zzStartRead + pos];
- }
-
-
- /**
- * Returns the length of the matched text region.
- */
- public final int yylength() {
- return zzMarkedPos - zzStartRead;
- }
-
-
- /**
- * Reports an error that occurred while scanning.
- *
- * In a wellformed scanner (no or only correct usage of
- * yypushback(int) and a match-all fallback rule) this method
- * will only be called with things that "Can't Possibly Happen".
- * If this method is called, something is seriously wrong
- * (e.g. a JFlex bug producing a faulty scanner etc.).
- *
- * Usual syntax/scanner level error handling should be done
- * in error fallback rules.
- *
- * @param errorCode the code of the errormessage to display
- */
- private void zzScanError(int errorCode) {
- String message;
- try {
- message = ZZ_ERROR_MSG[errorCode];
- } catch (ArrayIndexOutOfBoundsException e) {
- message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
- }
-
- throw new Error(message);
+ catch (ArrayIndexOutOfBoundsException e) {
+ message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
}
-
- /**
- * Pushes the specified amount of characters back into the input stream.
- *
- * They will be read again by then next call of the scanning method
- *
- * @param number the number of characters to be read again.
- * This number must not be greater than yylength()!
- */
- public void yypushback(int number) {
- if ( number > yylength() ) {
- zzScanError(ZZ_PUSHBACK_2BIG);
+ throw new Error(message);
+ }
+
+
+ /**
+ * Pushes the specified amount of characters back into the input stream.
+ *
+ * They will be read again by then next call of the scanning method
+ *
+ * @param number the number of characters to be read again.
+ * This number must not be greater than yylength()!
+ */
+ public void yypushback(int number) {
+ if ( number > yylength() )
+ zzScanError(ZZ_PUSHBACK_2BIG);
+
+ zzMarkedPos -= number;
+ }
+
+
+ /**
+ * Resumes scanning until the next regular expression is matched,
+ * the end of input is encountered or an I/O-Error occurs.
+ *
+ * @return the next token
+ * @exception java.io.IOException if any I/O-Error occurs
+ */
+ public int yylex() throws java.io.IOException {
+ int zzInput;
+ int zzAction;
+
+ // cached fields:
+ int zzCurrentPosL;
+ int zzMarkedPosL;
+ int zzEndReadL = zzEndRead;
+ char [] zzBufferL = zzBuffer;
+ char [] zzCMapL = ZZ_CMAP;
+
+ int [] zzTransL = ZZ_TRANS;
+ int [] zzRowMapL = ZZ_ROWMAP;
+ int [] zzAttrL = ZZ_ATTRIBUTE;
+
+ while (true) {
+ zzMarkedPosL = zzMarkedPos;
+
+ yychar+= zzMarkedPosL-zzStartRead;
+
+ if (zzMarkedPosL > zzStartRead) {
+ switch (zzBufferL[zzMarkedPosL-1]) {
+ case '\n':
+ case '\u000B':
+ case '\u000C':
+ case '\u0085':
+ case '\u2028':
+ case '\u2029':
+ zzAtBOL = true;
+ break;
+ case '\r':
+ if (zzMarkedPosL < zzEndReadL)
+ zzAtBOL = zzBufferL[zzMarkedPosL] != '\n';
+ else if (zzAtEOF)
+ zzAtBOL = false;
+ else {
+ boolean eof = zzRefill();
+ zzMarkedPosL = zzMarkedPos;
+ zzEndReadL = zzEndRead;
+ zzBufferL = zzBuffer;
+ if (eof)
+ zzAtBOL = false;
+ else
+ zzAtBOL = zzBufferL[zzMarkedPosL] != '\n';
+ }
+ break;
+ default:
+ zzAtBOL = false;
}
+ }
+ zzAction = -1;
- zzMarkedPos -= number;
- }
-
+ zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
+
+ if (zzAtBOL)
+ zzState = ZZ_LEXSTATE[zzLexicalState+1];
+ else
+ zzState = ZZ_LEXSTATE[zzLexicalState];
- /**
- * Resumes scanning until the next regular expression is matched,
- * the end of input is encountered or an I/O-Error occurs.
- *
- * @return the next token
- * @exception java.io.IOException if any I/O-Error occurs
- */
- public int yylex() throws java.io.IOException {
- int zzInput;
- int zzAction;
-
- // cached fields:
- int zzCurrentPosL;
- int zzMarkedPosL;
- int zzEndReadL = zzEndRead;
- char [] zzBufferL = zzBuffer;
- char [] zzCMapL = ZZ_CMAP;
+ // set up zzAction for empty match case:
+ int zzAttributes = zzAttrL[zzState];
+ if ( (zzAttributes & 1) == 1 ) {
+ zzAction = zzState;
+ }
+ zzForAction: {
while (true) {
- zzMarkedPosL = zzMarkedPos;
-
- yychar += zzMarkedPosL - zzStartRead;
-
- if (zzMarkedPosL > zzStartRead) {
- switch (zzBufferL[zzMarkedPosL - 1]) {
- case '\n':
- case '\u000B':
- case '\u000C':
- case '\u0085':
- case '\u2028':
- case '\u2029':
- zzAtBOL = true;
- break;
- case '\r':
- if (zzMarkedPosL < zzEndReadL) {
- zzAtBOL = zzBufferL[zzMarkedPosL] != '\n';
- } else if (zzAtEOF) {
- zzAtBOL = false;
- } else {
- boolean eof = zzRefill();
- zzMarkedPosL = zzMarkedPos;
- zzEndReadL = zzEndRead;
- zzBufferL = zzBuffer;
- if (eof) {
- zzAtBOL = false;
- } else {
- zzAtBOL = zzBufferL[zzMarkedPosL] != '\n';
- }
- }
- break;
- default:
- zzAtBOL = false;
- }
+
+ if (zzCurrentPosL < zzEndReadL) {
+ zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
+ zzCurrentPosL += Character.charCount(zzInput);
+ }
+ else if (zzAtEOF) {
+ zzInput = YYEOF;
+ break zzForAction;
+ }
+ else {
+ // store back cached positions
+ zzCurrentPos = zzCurrentPosL;
+ zzMarkedPos = zzMarkedPosL;
+ boolean eof = zzRefill();
+ // get translated positions and possibly new buffer
+ zzCurrentPosL = zzCurrentPos;
+ zzMarkedPosL = zzMarkedPos;
+ zzBufferL = zzBuffer;
+ zzEndReadL = zzEndRead;
+ if (eof) {
+ zzInput = YYEOF;
+ break zzForAction;
}
- zzAction = -1;
-
- zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
-
- if (zzAtBOL) {
- zzState = ZZ_LEXSTATE[zzLexicalState + 1];
- } else {
- zzState = ZZ_LEXSTATE[zzLexicalState];
+ else {
+ zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
+ zzCurrentPosL += Character.charCount(zzInput);
}
+ }
+ int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
+ if (zzNext == -1) break zzForAction;
+ zzState = zzNext;
+
+ zzAttributes = zzAttrL[zzState];
+ if ( (zzAttributes & 1) == 1 ) {
+ zzAction = zzState;
+ zzMarkedPosL = zzCurrentPosL;
+ if ( (zzAttributes & 8) == 8 ) break zzForAction;
+ }
-
- zzForAction: {
- while (true) {
-
- if (zzCurrentPosL < zzEndReadL) {
- zzInput = zzBufferL[zzCurrentPosL++];
- } else if (zzAtEOF) {
- zzInput = YYEOF;
- break zzForAction;
- } else {
- // store back cached positions
- zzCurrentPos = zzCurrentPosL;
- zzMarkedPos = zzMarkedPosL;
- boolean eof = zzRefill();
- // get translated positions and possibly new buffer
- zzCurrentPosL = zzCurrentPos;
- zzMarkedPosL = zzMarkedPos;
- zzBufferL = zzBuffer;
- zzEndReadL = zzEndRead;
- if (eof) {
- zzInput = YYEOF;
- break zzForAction;
- } else {
- zzInput = zzBufferL[zzCurrentPosL++];
- }
- }
- zzInput = zzCMapL[zzInput];
-
- boolean zzIsFinal = false;
- boolean zzNoLookAhead = false;
-
- zzForNext: {
- switch (zzState) {
- case 1:
- switch (zzInput) {
- case 0:
- case 4:
- case 24:
- case 25:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- case 1:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 7;
- break zzForNext;
- case 2:
- zzIsFinal = true;
- zzState = 8;
- break zzForNext;
- case 5:
- case 6:
- zzIsFinal = true;
- zzState = 10;
- break zzForNext;
- case 7:
- zzIsFinal = true;
- zzState = 11;
- break zzForNext;
- case 8:
- zzIsFinal = true;
- zzState = 12;
- break zzForNext;
- case 11:
- zzIsFinal = true;
- zzState = 13;
- break zzForNext;
- case 12:
- zzIsFinal = true;
- zzState = 14;
- break zzForNext;
- case 13:
- zzIsFinal = true;
- zzState = 15;
- break zzForNext;
- case 16:
- zzIsFinal = true;
- zzState = 16;
- break zzForNext;
- case 19:
- zzIsFinal = true;
- zzState = 17;
- break zzForNext;
- case 21:
- zzIsFinal = true;
- zzState = 18;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzState = 9;
- break zzForNext;
- }
-
- case 2:
- switch (zzInput) {
- case 24:
- zzIsFinal = true;
- zzState = 19;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 7;
- break zzForNext;
- }
-
- case 3:
- switch (zzInput) {
- case 25:
- zzIsFinal = true;
- zzState = 20;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 7;
- break zzForNext;
- }
-
- case 4:
- switch (zzInput) {
- default:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- }
-
- case 5:
- switch (zzInput) {
- case 24:
- case 25:
- zzIsFinal = true;
- zzState = 21;
- break zzForNext;
- default:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- }
-
- case 8:
- switch (zzInput) {
- case 2:
- zzState = 22;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 9:
- switch (zzInput) {
- case 5:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- case 8:
- zzState = 23;
- break zzForNext;
- case 11:
- zzState = 24;
- break zzForNext;
- case 12:
- zzState = 25;
- break zzForNext;
- case 13:
- zzState = 26;
- break zzForNext;
- case 16:
- zzState = 27;
- break zzForNext;
- case 19:
- zzState = 28;
- break zzForNext;
- case 21:
- zzState = 29;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 10:
- switch (zzInput) {
- case 5:
- case 6:
- zzIsFinal = true;
- zzState = 31;
- break zzForNext;
- case 1:
- case 4:
- break zzForAction;
- default:
- zzState = 30;
- break zzForNext;
- }
-
- case 11:
- switch (zzInput) {
- case 5:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 12:
- switch (zzInput) {
- case 5:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- case 8:
- zzState = 23;
- break zzForNext;
- case 11:
- zzState = 24;
- break zzForNext;
- case 12:
- zzState = 25;
- break zzForNext;
- case 13:
- zzState = 26;
- break zzForNext;
- case 16:
- zzState = 27;
- break zzForNext;
- case 19:
- zzState = 28;
- break zzForNext;
- case 21:
- zzState = 29;
- break zzForNext;
- case 9:
- zzState = 32;
- break zzForNext;
- case 14:
- zzState = 33;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 13:
- switch (zzInput) {
- case 5:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- case 8:
- zzState = 23;
- break zzForNext;
- case 11:
- zzState = 24;
- break zzForNext;
- case 12:
- zzState = 25;
- break zzForNext;
- case 13:
- zzState = 26;
- break zzForNext;
- case 16:
- zzState = 27;
- break zzForNext;
- case 19:
- zzState = 28;
- break zzForNext;
- case 21:
- zzState = 29;
- break zzForNext;
- case 23:
- zzState = 34;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 14:
- switch (zzInput) {
- case 5:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- case 8:
- zzState = 23;
- break zzForNext;
- case 11:
- zzState = 24;
- break zzForNext;
- case 12:
- zzState = 25;
- break zzForNext;
- case 13:
- zzState = 26;
- break zzForNext;
- case 16:
- zzState = 27;
- break zzForNext;
- case 19:
- zzState = 28;
- break zzForNext;
- case 21:
- zzState = 29;
- break zzForNext;
- case 15:
- zzState = 35;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 15:
- switch (zzInput) {
- case 5:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- case 11:
- zzState = 24;
- break zzForNext;
- case 12:
- zzState = 25;
- break zzForNext;
- case 13:
- zzState = 26;
- break zzForNext;
- case 16:
- zzState = 27;
- break zzForNext;
- case 19:
- zzState = 28;
- break zzForNext;
- case 21:
- zzState = 29;
- break zzForNext;
- case 8:
- zzIsFinal = true;
- zzState = 36;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 16:
- switch (zzInput) {
- case 5:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- case 8:
- zzState = 23;
- break zzForNext;
- case 11:
- zzState = 24;
- break zzForNext;
- case 12:
- zzState = 25;
- break zzForNext;
- case 13:
- zzState = 26;
- break zzForNext;
- case 16:
- zzState = 27;
- break zzForNext;
- case 19:
- zzState = 28;
- break zzForNext;
- case 21:
- zzState = 29;
- break zzForNext;
- case 17:
- zzState = 37;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 17:
- switch (zzInput) {
- case 5:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- case 8:
- zzState = 23;
- break zzForNext;
- case 11:
- zzState = 24;
- break zzForNext;
- case 12:
- zzState = 25;
- break zzForNext;
- case 13:
- zzState = 26;
- break zzForNext;
- case 16:
- zzState = 27;
- break zzForNext;
- case 19:
- zzState = 28;
- break zzForNext;
- case 21:
- zzState = 29;
- break zzForNext;
- case 10:
- zzState = 38;
- break zzForNext;
- case 18:
- zzState = 39;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 18:
- switch (zzInput) {
- case 5:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- case 8:
- zzState = 23;
- break zzForNext;
- case 11:
- zzState = 24;
- break zzForNext;
- case 12:
- zzState = 25;
- break zzForNext;
- case 13:
- zzState = 26;
- break zzForNext;
- case 16:
- zzState = 27;
- break zzForNext;
- case 21:
- zzState = 29;
- break zzForNext;
- case 19:
- zzState = 40;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 19:
- switch (zzInput) {
- case 24:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 20:
- switch (zzInput) {
- case 25:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 21:
- switch (zzInput) {
- case 24:
- case 25:
- zzIsFinal = true;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 22:
- switch (zzInput) {
- case 1:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- default:
- break zzForNext;
- }
-
- case 23:
- switch (zzInput) {
- case 9:
- zzState = 41;
- break zzForNext;
- case 14:
- zzState = 42;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 24:
- switch (zzInput) {
- case 23:
- zzState = 43;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 25:
- switch (zzInput) {
- case 15:
- zzState = 44;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 26:
- switch (zzInput) {
- case 8:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 27:
- switch (zzInput) {
- case 17:
- zzState = 45;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 28:
- switch (zzInput) {
- case 10:
- zzState = 46;
- break zzForNext;
- case 18:
- zzState = 47;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 29:
- switch (zzInput) {
- case 19:
- zzState = 48;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 30:
- switch (zzInput) {
- case 5:
- case 6:
- zzIsFinal = true;
- zzState = 31;
- break zzForNext;
- case 1:
- case 4:
- break zzForAction;
- default:
- break zzForNext;
- }
-
- case 31:
- switch (zzInput) {
- case 5:
- case 6:
- zzState = 30;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 32:
- switch (zzInput) {
- case 10:
- zzState = 49;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 33:
- switch (zzInput) {
- case 15:
- zzIsFinal = true;
- zzState = 36;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 34:
- switch (zzInput) {
- case 12:
- zzState = 50;
- break zzForNext;
- case 21:
- zzState = 51;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 35:
- switch (zzInput) {
- case 20:
- zzIsFinal = true;
- zzState = 36;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 36:
- switch (zzInput) {
- case 0:
- case 1:
- case 2:
- case 4:
- case 5:
- case 6:
- case 7:
- case 24:
- case 25:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 52;
- break zzForNext;
- }
-
- case 37:
- switch (zzInput) {
- case 13:
- zzState = 53;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 38:
- switch (zzInput) {
- case 22:
- zzIsFinal = true;
- zzState = 54;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 39:
- switch (zzInput) {
- case 21:
- zzState = 55;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 40:
- switch (zzInput) {
- case 10:
- zzState = 46;
- break zzForNext;
- case 18:
- zzState = 56;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 41:
- switch (zzInput) {
- case 10:
- zzState = 57;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 42:
- switch (zzInput) {
- case 15:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 43:
- switch (zzInput) {
- case 12:
- zzState = 58;
- break zzForNext;
- case 21:
- zzState = 59;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 44:
- switch (zzInput) {
- case 20:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 45:
- switch (zzInput) {
- case 13:
- zzState = 60;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 46:
- switch (zzInput) {
- case 22:
- zzIsFinal = true;
- zzState = 61;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 47:
- switch (zzInput) {
- case 21:
- zzState = 62;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 48:
- switch (zzInput) {
- case 18:
- zzState = 63;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 49:
- switch (zzInput) {
- case 11:
- zzState = 64;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 50:
- switch (zzInput) {
- case 11:
- zzState = 65;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 51:
- switch (zzInput) {
- case 19:
- zzIsFinal = true;
- zzState = 66;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 52:
- switch (zzInput) {
- case 0:
- case 1:
- case 2:
- case 4:
- case 5:
- case 6:
- case 7:
- case 24:
- case 25:
- break zzForAction;
- default:
- zzIsFinal = true;
- break zzForNext;
- }
-
- case 53:
- switch (zzInput) {
- case 18:
- zzState = 67;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 54:
- switch (zzInput) {
- case 8:
- zzIsFinal = true;
- zzState = 68;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 4:
- case 5:
- case 6:
- case 7:
- case 24:
- case 25:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 52;
- break zzForNext;
- }
-
- case 55:
- switch (zzInput) {
- case 19:
- zzIsFinal = true;
- zzState = 69;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 56:
- switch (zzInput) {
- case 21:
- zzState = 62;
- break zzForNext;
- case 19:
- zzState = 70;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 57:
- switch (zzInput) {
- case 11:
- zzState = 71;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 58:
- switch (zzInput) {
- case 11:
- zzState = 72;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 59:
- switch (zzInput) {
- case 19:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 60:
- switch (zzInput) {
- case 18:
- zzState = 59;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 61:
- switch (zzInput) {
- case 8:
- zzState = 73;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 62:
- switch (zzInput) {
- case 19:
- zzIsFinal = true;
- zzState = 74;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 63:
- switch (zzInput) {
- case 19:
- zzState = 75;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 64:
- switch (zzInput) {
- case 12:
- zzState = 76;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 65:
- switch (zzInput) {
- case 17:
- zzIsFinal = true;
- zzState = 66;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 66:
- switch (zzInput) {
- case 0:
- case 1:
- case 2:
- case 4:
- case 5:
- case 6:
- case 7:
- case 24:
- case 25:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 52;
- break zzForNext;
- }
-
- case 67:
- switch (zzInput) {
- case 19:
- zzIsFinal = true;
- zzState = 36;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 68:
- switch (zzInput) {
- case 9:
- zzIsFinal = true;
- zzState = 77;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 4:
- case 5:
- case 6:
- case 7:
- case 24:
- case 25:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 52;
- break zzForNext;
- }
-
- case 69:
- switch (zzInput) {
- case 13:
- zzIsFinal = true;
- zzState = 78;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 4:
- case 5:
- case 6:
- case 7:
- case 24:
- case 25:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 52;
- break zzForNext;
- }
-
- case 70:
- switch (zzInput) {
- case 11:
- zzState = 79;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 71:
- switch (zzInput) {
- case 12:
- zzState = 80;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 72:
- switch (zzInput) {
- case 17:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 73:
- switch (zzInput) {
- case 9:
- zzState = 41;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 74:
- switch (zzInput) {
- case 13:
- zzState = 26;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 75:
- switch (zzInput) {
- case 11:
- zzState = 81;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 76:
- switch (zzInput) {
- case 13:
- zzState = 82;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 77:
- switch (zzInput) {
- case 10:
- zzIsFinal = true;
- zzState = 83;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 4:
- case 5:
- case 6:
- case 7:
- case 24:
- case 25:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 52;
- break zzForNext;
- }
-
- case 78:
- switch (zzInput) {
- case 8:
- zzIsFinal = true;
- zzState = 66;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 4:
- case 5:
- case 6:
- case 7:
- case 24:
- case 25:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 52;
- break zzForNext;
- }
-
- case 79:
- switch (zzInput) {
- case 12:
- zzIsFinal = true;
- zzState = 36;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 80:
- switch (zzInput) {
- case 13:
- zzState = 84;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 81:
- switch (zzInput) {
- case 12:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 82:
- switch (zzInput) {
- case 14:
- zzState = 85;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 83:
- switch (zzInput) {
- case 11:
- zzIsFinal = true;
- zzState = 86;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 4:
- case 5:
- case 6:
- case 7:
- case 24:
- case 25:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 52;
- break zzForNext;
- }
-
- case 84:
- switch (zzInput) {
- case 14:
- zzState = 87;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 85:
- switch (zzInput) {
- case 10:
- zzIsFinal = true;
- zzState = 36;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 86:
- switch (zzInput) {
- case 12:
- zzIsFinal = true;
- zzState = 88;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 4:
- case 5:
- case 6:
- case 7:
- case 24:
- case 25:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 52;
- break zzForNext;
- }
-
- case 87:
- switch (zzInput) {
- case 10:
- zzIsFinal = true;
- zzNoLookAhead = true;
- zzState = 6;
- break zzForNext;
- default:
- break zzForAction;
- }
-
- case 88:
- switch (zzInput) {
- case 13:
- zzIsFinal = true;
- zzState = 89;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 4:
- case 5:
- case 6:
- case 7:
- case 24:
- case 25:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 52;
- break zzForNext;
- }
-
- case 89:
- switch (zzInput) {
- case 14:
- zzIsFinal = true;
- zzState = 90;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 4:
- case 5:
- case 6:
- case 7:
- case 24:
- case 25:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 52;
- break zzForNext;
- }
-
- case 90:
- switch (zzInput) {
- case 10:
- zzIsFinal = true;
- zzState = 91;
- break zzForNext;
- case 0:
- case 1:
- case 2:
- case 4:
- case 5:
- case 6:
- case 7:
- case 24:
- case 25:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 52;
- break zzForNext;
- }
-
- case 91:
- switch (zzInput) {
- case 0:
- case 1:
- case 2:
- case 4:
- case 5:
- case 6:
- case 7:
- case 24:
- case 25:
- break zzForAction;
- default:
- zzIsFinal = true;
- zzState = 52;
- break zzForNext;
- }
-
- default:
- // if this is ever reached, there is a serious bug in JFlex
- zzScanError(ZZ_UNKNOWN_ERROR);
- break;
- }
- }
-
- if ( zzIsFinal ) {
- zzAction = zzState;
- zzMarkedPosL = zzCurrentPosL;
- if ( zzNoLookAhead ) {
- break zzForAction;
- }
- }
-
- }
+ }
+ }
+
+ // store back cached position
+ zzMarkedPos = zzMarkedPosL;
+
+ if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
+ zzAtEOF = true;
+ { return 0;
+ }
+ }
+ else {
+ switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
+ case 1:
+ { return yylength();
}
-
- // store back cached position
- zzMarkedPos = zzMarkedPosL;
-
- switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
- case 5 : {
- return 2;
- }
- case 7:
- break;
- case 6: {
- return 3;
- }
- case 8:
- break;
- case 1: {
- return yylength();
- }
- case 9:
- break;
- case 3: {
- return 0;
- }
- case 10:
- break;
- case 4: {
- return 1;
- }
- case 11:
- break;
- case 2: {
- }
- case 12:
- break;
- default:
- if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
- zzAtEOF = true;
- {
- return 0;
- }
- } else {
- zzScanError(ZZ_NO_MATCH);
- }
+ case 7: break;
+ case 2:
+ {
+ }
+ case 8: break;
+ case 3:
+ { return 0;
+ }
+ case 9: break;
+ case 4:
+ { return 1;
+ }
+ case 10: break;
+ case 5:
+ { return 2;
+ }
+ case 11: break;
+ case 6:
+ { return 3;
}
+ case 12: break;
+ default:
+ zzScanError(ZZ_NO_MATCH);
}
+ }
}
+ }
}
-/* The following code was generated by JFlex 1.4.3 on 28/04/14 15:53 */
+/* The following code was generated by JFlex 1.6.1 */
//CHECKSTYLE:OFF
/**
* This class is a scanner generated by
- * <a href="http://www.jflex.de/">JFlex</a> 1.4.3
- * on 28/04/14 15:53 from the specification file
- * <tt>matchingblock.jflex</tt>
+ * <a href="http://www.jflex.de/">JFlex</a> 1.6.1
+ * from the specification file <tt>../../../../jflex/matchingblock.jflex</tt>
*/
public final class MatchingBlockScanner {
private static final int ZZ_BUFFERSIZE = 256;
/** lexical states */
- public static final int OPENCLOSE = 6;
- public static final int LR = 2;
public static final int YYINITIAL = 0;
- public static final int PSNART = 10;
+ public static final int LR = 2;
+ public static final int RL = 4;
+ public static final int OPENCLOSE = 6;
public static final int CLOSEOPEN = 8;
+ public static final int PSNART = 10;
public static final int SPEC = 12;
- public static final int RL = 4;
/**
* ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
* Translates characters to character classes
*/
private static final String ZZ_CMAP_PACKED =
- "\12\0\1\1\2\0\1\3\23\0\1\6\1\10\1\6\1\4\1\5"+
- "\1\0\1\7\1\30\1\11\5\0\1\2\12\4\5\0\1\6\1\0"+
- "\32\6\1\30\1\0\1\11\1\0\1\6\1\0\2\6\1\23\1\31"+
- "\1\21\1\13\1\6\1\17\1\12\2\6\1\20\1\6\1\27\1\14"+
- "\2\6\1\15\1\22\1\24\1\26\1\6\1\16\1\6\1\25\1\6"+
- "\1\30\1\0\1\11\uff82\0";
+ "\12\0\1\1\1\4\1\4\1\3\23\0\1\7\1\11\1\7\1\5"+
+ "\1\6\1\0\1\10\1\31\1\12\5\0\1\2\12\5\5\0\1\7"+
+ "\1\0\32\7\1\31\1\0\1\12\1\0\1\7\1\0\2\7\1\24"+
+ "\1\32\1\22\1\14\1\7\1\20\1\13\2\7\1\21\1\7\1\30"+
+ "\1\15\2\7\1\16\1\23\1\25\1\27\1\7\1\17\1\7\1\26"+
+ "\1\7\1\31\1\0\1\12\7\0\1\4\u1fa2\0\1\4\1\4\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\uffff\0\udfe6\0";
/**
* Translates characters to character classes
private static final int [] ZZ_ACTION = zzUnpackAction();
private static final String ZZ_ACTION_PACKED_0 =
- "\7\0\6\1\1\2\6\1\1\3\2\1\1\4\6\1"+
+ "\7\0\6\1\1\2\6\1\1\3\2\1\1\4\7\1"+
"\1\2\1\1\11\2\1\5\1\6\1\0\1\7\2\0"+
- "\1\1\1\3\6\1\11\0\1\2\6\0\1\3\13\0"+
- "\2\1\1\2\2\1\6\0\1\1\1\2\3\0\1\2"+
- "\7\0\5\1\11\0\1\3\4\0\3\1\13\0\2\1"+
+ "\1\1\1\3\7\1\12\0\1\2\7\0\1\3\14\0"+
+ "\2\1\1\2\3\1\7\0\1\1\1\2\4\0\1\2"+
+ "\10\0\6\1\13\0\1\3\5\0\4\1\15\0\2\1"+
"\7\0\2\1\6\0\1\1\1\0\1\2\3\0\3\1"+
"\3\0\1\1\2\0\1\2";
private static int [] zzUnpackAction() {
- int [] result = new int[173];
+ int [] result = new int[189];
int offset = 0;
offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
return result;
}
+ /**
+ * Translates a state to a row index in the transition table
+ */
+ private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
+
+ private static final String ZZ_ROWMAP_PACKED_0 =
+ "\0\0\0\33\0\66\0\121\0\154\0\207\0\242\0\0"+
+ "\0\275\0\330\0\363\0\u010e\0\u0129\0\u0144\0\u015f\0\u017a"+
+ "\0\u0195\0\u01b0\0\u01cb\0\u01e6\0\0\0\u0201\0\u021c\0\0"+
+ "\0\u0237\0\u0252\0\u026d\0\u0288\0\u02a3\0\u02be\0\u02d9\0\0"+
+ "\0\u02f4\0\u030f\0\u032a\0\u0345\0\u0360\0\u037b\0\u0396\0\u03b1"+
+ "\0\u03cc\0\u03e7\0\0\0\0\0\u0402\0\0\0\u041d\0\u0129"+
+ "\0\u0438\0\363\0\u0453\0\u046e\0\u0489\0\u04a4\0\u04bf\0\u04da"+
+ "\0\u04f5\0\u0201\0\u0510\0\u052b\0\u0546\0\u0561\0\u057c\0\u0597"+
+ "\0\u05b2\0\u05cd\0\u05e8\0\u0603\0\u061e\0\u0639\0\u0654\0\u066f"+
+ "\0\u068a\0\u06a5\0\u06c0\0\u06db\0\u06f6\0\u0711\0\u072c\0\u0747"+
+ "\0\u0762\0\u077d\0\u0798\0\u07b3\0\u07ce\0\u07e9\0\u0804\0\u081f"+
+ "\0\u083a\0\u0855\0\u0870\0\u088b\0\u08a6\0\u0510\0\u08c1\0\u08dc"+
+ "\0\u08f7\0\u0912\0\u092d\0\u0948\0\u0963\0\u097e\0\u0999\0\u09b4"+
+ "\0\u09cf\0\u09ea\0\u0a05\0\u06db\0\u0a20\0\u0a3b\0\u0a56\0\u0a71"+
+ "\0\u0a8c\0\u0aa7\0\u0ac2\0\u0add\0\u0af8\0\u0b13\0\u0b2e\0\u0b49"+
+ "\0\u0b64\0\u0b7f\0\u0b9a\0\u0bb5\0\u0bd0\0\u0beb\0\u0c06\0\u0c21"+
+ "\0\u0c3c\0\u0c57\0\u0c72\0\u0c8d\0\u0ca8\0\u0cc3\0\u0cde\0\u0cf9"+
+ "\0\u0d14\0\u0d2f\0\u0d4a\0\u0d65\0\u0d80\0\u0d9b\0\u0db6\0\u0dd1"+
+ "\0\u0dec\0\u0e07\0\u0e22\0\u0e3d\0\u0e58\0\u0e73\0\u0e8e\0\u0ea9"+
+ "\0\u0ec4\0\u0edf\0\u0efa\0\u0f15\0\u0f30\0\u0f4b\0\u0f66\0\u0f81"+
+ "\0\u0f9c\0\u0fb7\0\u0fd2\0\u0fed\0\u1008\0\u1023\0\u103e\0\u1059"+
+ "\0\u1074\0\u108f\0\u10aa\0\u10c5\0\u10e0\0\u10fb\0\u1116\0\u1131"+
+ "\0\u114c\0\u1167\0\u1182\0\u119d\0\u11b8\0\u11d3\0\u11ee\0\u11d3"+
+ "\0\u1209\0\u1224\0\u123f\0\u125a\0\363";
+
+ private static int [] zzUnpackRowMap() {
+ int [] result = new int[189];
+ int offset = 0;
+ offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackRowMap(String packed, int offset, int [] result) {
+ int i = 0; /* index in packed string */
+ int j = offset; /* index in unpacked array */
+ int l = packed.length();
+ while (i < l) {
+ int high = packed.charAt(i++) << 16;
+ result[j++] = high | packed.charAt(i++);
+ }
+ return j;
+ }
+
+ /**
+ * The transition table of the DFA
+ */
+ private static final int [] ZZ_TRANS = zzUnpackTrans();
+
+ private static final String ZZ_TRANS_PACKED_0 =
+ "\33\0\2\10\1\11\2\0\1\12\1\13\1\14\2\15"+
+ "\1\16\1\17\1\20\2\14\1\21\2\14\1\22\1\23"+
+ "\1\14\1\24\3\14\1\25\1\14\1\10\1\26\1\10"+
+ "\2\0\1\27\1\10\1\27\1\30\1\15\1\25\1\27"+
+ "\1\31\1\27\1\32\1\27\1\33\1\27\1\34\2\27"+
+ "\1\35\1\36\1\27\1\37\1\40\1\41\3\40\2\0"+
+ "\6\40\1\42\1\43\2\40\1\44\2\40\1\45\1\46"+
+ "\1\40\1\47\3\40\1\25\4\40\2\0\1\50\1\40"+
+ "\1\50\2\40\1\25\15\50\1\51\1\40\1\52\10\0"+
+ "\1\53\22\0\3\54\2\0\26\54\2\0\1\55\40\0"+
+ "\1\56\11\0\1\57\15\0\1\13\1\0\1\13\3\0"+
+ "\16\13\1\0\1\13\5\0\1\13\1\0\1\13\1\56"+
+ "\2\0\16\13\1\0\1\13\1\60\1\0\1\60\1\0"+
+ "\4\60\2\61\21\60\10\0\1\56\27\0\1\13\1\0"+
+ "\1\13\1\56\2\0\1\13\1\62\14\13\1\0\1\13"+
+ "\5\0\1\13\1\0\1\13\1\56\2\0\2\13\1\63"+
+ "\11\13\1\64\1\13\1\0\1\13\5\0\1\13\1\0"+
+ "\1\13\1\56\2\0\5\13\1\65\10\13\1\0\1\13"+
+ "\5\0\1\13\1\0\1\13\1\56\2\0\15\13\1\66"+
+ "\1\0\1\13\5\0\1\13\1\0\1\13\1\56\2\0"+
+ "\4\13\1\67\2\13\1\70\6\13\1\0\1\13\5\0"+
+ "\1\13\1\0\1\13\1\56\2\0\3\13\1\71\12\13"+
+ "\1\0\1\13\1\72\1\0\1\73\1\0\27\72\14\0"+
+ "\1\74\1\0\1\75\1\0\1\76\1\0\1\77\2\0"+
+ "\1\100\1\101\1\0\1\102\1\0\1\103\13\0\1\104"+
+ "\1\74\1\0\1\75\1\0\1\76\1\0\1\77\2\0"+
+ "\1\100\1\101\1\0\1\102\1\0\1\103\14\0\1\74"+
+ "\1\105\1\75\1\0\1\76\1\0\1\77\2\0\1\100"+
+ "\1\101\1\0\1\102\1\0\1\103\14\0\1\74\1\0"+
+ "\1\75\1\0\1\76\1\0\1\77\1\0\1\106\1\100"+
+ "\1\101\1\0\1\102\1\0\1\103\14\0\1\74\1\0"+
+ "\1\75\1\0\1\76\1\107\1\77\2\0\1\100\1\101"+
+ "\1\0\1\102\1\0\1\103\14\0\1\74\1\0\1\75"+
+ "\1\0\1\76\1\0\1\77\1\0\1\110\1\100\1\101"+
+ "\1\0\1\102\1\0\1\103\14\0\1\74\1\0\1\111"+
+ "\1\0\1\76\1\0\1\77\2\0\1\100\1\101\1\0"+
+ "\1\102\1\0\1\103\14\0\1\74\1\112\1\75\1\0"+
+ "\1\76\1\0\1\77\2\0\1\100\1\101\1\0\1\102"+
+ "\1\0\1\103\14\0\1\74\1\0\1\75\1\0\1\76"+
+ "\1\0\1\77\2\0\1\100\1\101\1\0\1\113\1\0"+
+ "\1\103\14\0\1\114\33\0\1\115\11\0\1\116\23\0"+
+ "\1\117\33\0\1\120\30\0\1\121\2\0\1\122\26\0"+
+ "\1\123\44\0\1\124\1\0\1\125\15\0\1\126\12\0"+
+ "\1\124\1\0\1\125\30\0\1\127\1\0\1\125\1\55"+
+ "\1\10\1\55\2\0\26\55\30\0\1\130\12\0\2\60"+
+ "\26\0\1\13\1\0\1\13\3\0\3\13\1\62\12\13"+
+ "\1\0\1\13\5\0\1\13\1\0\1\13\3\0\15\13"+
+ "\1\131\1\0\1\13\5\0\1\13\1\0\1\13\3\0"+
+ "\1\132\15\13\1\0\1\13\5\0\1\13\1\0\1\13"+
+ "\3\0\16\13\1\0\1\133\5\0\1\13\1\0\1\13"+
+ "\3\0\1\134\15\13\1\0\1\13\5\0\1\13\1\0"+
+ "\1\13\3\0\6\13\1\135\7\13\1\0\1\13\5\0"+
+ "\1\13\1\0\1\13\3\0\13\13\1\62\2\13\1\0"+
+ "\1\13\1\72\1\0\1\136\1\0\27\72\13\0\1\10"+
+ "\34\0\1\137\41\0\1\140\27\0\1\141\35\0\1\142"+
+ "\24\0\1\143\31\0\1\144\45\0\1\145\7\0\1\10"+
+ "\1\0\1\10\3\0\7\10\1\146\6\10\1\0\1\10"+
+ "\14\0\1\147\43\0\1\150\20\0\1\151\41\0\1\152"+
+ "\25\0\1\137\7\0\1\147\20\0\1\153\34\0\1\144"+
+ "\4\0\1\25\15\0\1\154\1\0\1\154\3\0\16\154"+
+ "\1\0\1\154\16\0\1\114\44\0\1\155\15\0\1\156"+
+ "\42\0\1\157\22\0\1\160\40\0\1\161\37\0\1\114"+
+ "\21\0\1\162\45\0\1\163\15\0\1\164\34\0\1\162"+
+ "\4\0\1\25\42\0\1\165\5\0\1\13\1\0\1\13"+
+ "\3\0\11\13\1\166\4\13\1\0\1\13\5\0\1\13"+
+ "\1\0\1\13\3\0\6\13\1\167\7\13\1\0\1\13"+
+ "\5\0\1\13\1\0\1\13\3\0\1\13\1\170\14\13"+
+ "\1\0\1\13\5\0\1\13\1\0\1\13\3\0\12\13"+
+ "\1\171\3\13\1\0\1\13\5\0\1\13\1\0\1\13"+
+ "\3\0\7\13\1\172\6\13\1\0\1\13\14\0\1\10"+
+ "\43\0\1\173\20\0\1\174\41\0\1\175\35\0\1\10"+
+ "\20\0\1\176\41\0\1\10\33\0\1\177\14\0\1\10"+
+ "\1\0\1\10\3\0\16\10\1\0\1\10\13\0\1\200"+
+ "\37\0\1\201\33\0\1\202\36\0\1\203\31\0\1\204"+
+ "\27\0\1\205\33\0\1\206\35\0\1\207\27\0\1\210"+
+ "\23\0\1\211\41\0\1\40\35\0\1\212\21\0\1\213"+
+ "\23\0\1\13\1\0\1\13\3\0\12\13\1\214\3\13"+
+ "\1\0\1\13\5\0\1\13\1\0\1\13\3\0\7\13"+
+ "\1\62\6\13\1\0\1\13\5\0\1\13\1\0\1\13"+
+ "\3\0\14\13\1\215\1\13\1\0\1\13\5\0\1\13"+
+ "\1\0\1\13\3\0\11\13\1\216\4\13\1\0\1\13"+
+ "\5\0\1\13\1\0\1\13\3\0\11\13\1\217\4\13"+
+ "\1\0\1\13\13\0\1\220\37\0\1\221\33\0\1\222"+
+ "\36\0\1\223\26\0\1\145\30\0\1\224\32\0\1\147"+
+ "\35\0\1\224\34\0\1\225\33\0\1\226\27\0\1\114"+
+ "\23\0\1\227\43\0\1\230\32\0\1\231\33\0\1\232"+
+ "\31\0\1\233\35\0\1\234\10\0\1\13\1\0\1\13"+
+ "\3\0\1\235\15\13\1\0\1\13\5\0\1\13\1\0"+
+ "\1\13\3\0\15\13\1\236\1\0\1\13\5\0\1\13"+
+ "\1\0\1\13\3\0\5\13\1\62\10\13\1\0\1\13"+
+ "\5\0\1\13\1\0\1\13\3\0\12\13\1\62\3\13"+
+ "\1\0\1\13\17\0\1\237\32\0\1\10\35\0\1\237"+
+ "\34\0\1\240\31\0\1\147\37\0\1\241\15\0\1\242"+
+ "\33\0\1\25\36\0\1\114\37\0\1\114\31\0\1\243"+
+ "\36\0\1\244\32\0\1\245\7\0\1\13\1\0\1\13"+
+ "\3\0\2\13\1\246\13\13\1\0\1\13\5\0\1\13"+
+ "\1\0\1\13\3\0\11\13\1\247\4\13\1\0\1\13"+
+ "\23\0\1\10\37\0\1\250\31\0\1\251\20\0\1\252"+
+ "\45\0\1\253\31\0\1\254\27\0\1\255\13\0\1\13"+
+ "\1\0\1\13\3\0\15\13\1\62\1\0\1\13\5\0"+
+ "\1\13\1\0\1\13\3\0\12\13\1\256\3\13\1\0"+
+ "\1\13\27\0\1\257\17\0\1\260\46\0\1\114\31\0"+
+ "\1\261\17\0\1\262\43\0\1\263\12\0\1\13\1\0"+
+ "\1\13\3\0\1\264\15\13\1\0\1\13\14\0\1\265"+
+ "\23\0\1\10\1\0\1\10\3\0\16\10\1\0\1\266"+
+ "\14\0\1\267\50\0\1\270\13\0\1\271\24\0\1\13"+
+ "\1\0\1\13\3\0\2\13\1\272\13\13\1\0\1\13"+
+ "\32\0\1\103\30\0\1\273\34\0\1\125\15\0\1\274"+
+ "\22\0\1\13\1\0\1\13\3\0\15\13\1\275\1\0"+
+ "\1\13\22\0\1\25\40\0\1\10\2\0";
+
+ private static int [] zzUnpackTrans() {
+ int [] result = new int[4725];
+ int offset = 0;
+ offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackTrans(String packed, int offset, int [] result) {
+ int i = 0; /* index in packed string */
+ int j = offset; /* index in unpacked array */
+ int l = packed.length();
+ while (i < l) {
+ int count = packed.charAt(i++);
+ int value = packed.charAt(i++);
+ value--;
+ do result[j++] = value; while (--count > 0);
+ }
+ return j;
+ }
+
+
/* error codes */
private static final int ZZ_UNKNOWN_ERROR = 0;
private static final int ZZ_NO_MATCH = 1;
/* error messages for the codes above */
private static final String ZZ_ERROR_MSG[] = {
- "Unkown internal scanner error",
+ "Unknown internal scanner error",
"Error: could not match input",
"Error: pushback value was too large"
};
+ /**
+ * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
+ */
+ private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
+
+ private static final String ZZ_ATTRIBUTE_PACKED_0 =
+ "\1\10\6\0\1\11\14\1\1\11\2\1\1\11\7\1"+
+ "\1\11\12\1\2\11\1\0\1\11\2\0\11\1\12\0"+
+ "\1\1\7\0\1\1\14\0\6\1\7\0\2\1\4\0"+
+ "\1\1\10\0\6\1\13\0\1\1\5\0\4\1\15\0"+
+ "\2\1\7\0\2\1\6\0\1\1\1\0\1\1\3\0"+
+ "\3\1\3\0\1\1\2\0\1\1";
+
+ private static int [] zzUnpackAttribute() {
+ int [] result = new int[189];
+ int offset = 0;
+ offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
+ return result;
+ }
+
+ private static int zzUnpackAttribute(String packed, int offset, int [] result) {
+ int i = 0; /* index in packed string */
+ int j = offset; /* index in unpacked array */
+ int l = packed.length();
+ while (i < l) {
+ int count = packed.charAt(i++);
+ int value = packed.charAt(i++);
+ do result[j++] = value; while (--count > 0);
+ }
+ return j;
+ }
+
/** the input device */
private java.io.Reader zzReader;
/** denotes if the user-EOF-code has already been executed */
private boolean zzEOFDone;
+
+ /**
+ * The number of occupied positions in zzBuffer beyond zzEndRead.
+ * When a lead/high surrogate has been read from the input stream
+ * into the final zzBuffer position, this will have a value of 1;
+ * otherwise, it will have a value of 0.
+ */
+ private int zzFinalHighSurrogate = 0;
/* user code: */
private ScilabDocument doc;
public MatchingBlockScanner(ScilabDocument doc) {
this.doc = doc;
this.elem = doc.getDefaultRootElement();
- this.scilabLexer = doc.createLexer();
+ this.scilabLexer = new ScilabLexer(doc, null, false);
}
public MatchingPositions getNextBlock(int pos, boolean lr) {
/**
* Creates a new scanner
- * There is also a java.io.InputStream version of this constructor.
*
* @param in the java.io.Reader to read input from.
*/
this.zzReader = in;
}
- /**
- * Creates a new scanner.
- * There is also java.io.Reader version of this constructor.
- *
- * @param in the java.io.Inputstream to read input from.
- */
- public MatchingBlockScanner(java.io.InputStream in) {
- this(new java.io.InputStreamReader(in));
- }
/**
* Unpacks the compressed character translation table.
* @return the unpacked character translation table
*/
private static char [] zzUnpackCMap(String packed) {
- char [] map = new char[0x10000];
+ char [] map = new char[0x110000];
int i = 0; /* index in packed string */
int j = 0; /* index in unpacked array */
- while (i < 108) {
+ while (i < 152) {
int count = packed.charAt(i++);
char value = packed.charAt(i++);
do map[j++] = value; while (--count > 0);
/* first: make room (if you can) */
if (zzStartRead > 0) {
+ zzEndRead += zzFinalHighSurrogate;
+ zzFinalHighSurrogate = 0;
System.arraycopy(zzBuffer, zzStartRead,
zzBuffer, 0,
zzEndRead-zzStartRead);
}
/* is the buffer big enough? */
- if (zzCurrentPos >= zzBuffer.length) {
+ if (zzCurrentPos >= zzBuffer.length - zzFinalHighSurrogate) {
/* if not: blow it up */
- char newBuffer[] = new char[zzCurrentPos*2];
+ char newBuffer[] = new char[zzBuffer.length*2];
System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
zzBuffer = newBuffer;
+ zzEndRead += zzFinalHighSurrogate;
+ zzFinalHighSurrogate = 0;
}
- /* finally: fill the buffer with new input */
- int numRead = zzReader.read(zzBuffer, zzEndRead,
- zzBuffer.length-zzEndRead);
+ /* fill the buffer with new input */
+ int requested = zzBuffer.length - zzEndRead;
+ int numRead = zzReader.read(zzBuffer, zzEndRead, requested);
+ /* not supposed to occur according to specification of java.io.Reader */
+ if (numRead == 0) {
+ throw new java.io.IOException("Reader returned 0 characters. See JFlex examples for workaround.");
+ }
if (numRead > 0) {
- zzEndRead+= numRead;
+ zzEndRead += numRead;
+ /* If numRead == requested, we might have requested to few chars to
+ encode a full Unicode character. We assume that a Reader would
+ otherwise never return half characters. */
+ if (numRead == requested) {
+ if (Character.isHighSurrogate(zzBuffer[zzEndRead - 1])) {
+ --zzEndRead;
+ zzFinalHighSurrogate = 1;
+ }
+ }
+ /* potentially more input available */
return false;
}
- // unlikely but not impossible: read 0 characters, but not at end of stream
- if (numRead == 0) {
- int c = zzReader.read();
- if (c == -1) {
- return true;
- } else {
- zzBuffer[zzEndRead++] = (char) c;
- return false;
- }
- }
- // numRead < 0
+ /* numRead < 0 ==> end of stream */
return true;
}
* <b>cannot</b> be reused (internal buffer is discarded and lost).
* Lexical state is set to <tt>ZZ_INITIAL</tt>.
*
+ * Internal scan buffer is resized down to its initial length, if it has grown.
+ *
* @param reader the new input stream
*/
public final void yyreset(java.io.Reader reader) {
zzEOFDone = false;
zzEndRead = zzStartRead = 0;
zzCurrentPos = zzMarkedPos = 0;
+ zzFinalHighSurrogate = 0;
yyline = yychar = yycolumn = 0;
zzLexicalState = YYINITIAL;
+ if (zzBuffer.length > ZZ_BUFFERSIZE)
+ zzBuffer = new char[ZZ_BUFFERSIZE];
}
char [] zzBufferL = zzBuffer;
char [] zzCMapL = ZZ_CMAP;
+ int [] zzTransL = ZZ_TRANS;
+ int [] zzRowMapL = ZZ_ROWMAP;
+ int [] zzAttrL = ZZ_ATTRIBUTE;
while (true) {
zzMarkedPosL = zzMarkedPos;
zzState = ZZ_LEXSTATE[zzLexicalState];
+ // set up zzAction for empty match case:
+ int zzAttributes = zzAttrL[zzState];
+ if ( (zzAttributes & 1) == 1 ) {
+ zzAction = zzState;
+ }
+
zzForAction: {
while (true) {
- if (zzCurrentPosL < zzEndReadL)
- zzInput = zzBufferL[zzCurrentPosL++];
+ if (zzCurrentPosL < zzEndReadL) {
+ zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
+ zzCurrentPosL += Character.charCount(zzInput);
+ }
else if (zzAtEOF) {
zzInput = YYEOF;
break zzForAction;
break zzForAction;
}
else {
- zzInput = zzBufferL[zzCurrentPosL++];
+ zzInput = Character.codePointAt(zzBufferL, zzCurrentPosL, zzEndReadL);
+ zzCurrentPosL += Character.charCount(zzInput);
}
}
- zzInput = zzCMapL[zzInput];
-
- boolean zzIsFinal = false;
- boolean zzNoLookAhead = false;
-
- zzForNext: { switch (zzState) {
- case 1:
- switch (zzInput) {
- case 0:
- case 1:
- case 3: zzIsFinal = true; zzNoLookAhead = true; zzState = 7; break zzForNext;
- case 2: zzIsFinal = true; zzState = 8; break zzForNext;
- case 4: zzIsFinal = true; zzState = 9; break zzForNext;
- case 5: zzIsFinal = true; zzState = 10; break zzForNext;
- case 7:
- case 8: zzIsFinal = true; zzState = 12; break zzForNext;
- case 9: zzIsFinal = true; zzState = 13; break zzForNext;
- case 10: zzIsFinal = true; zzState = 14; break zzForNext;
- case 11: zzIsFinal = true; zzState = 15; break zzForNext;
- case 14: zzIsFinal = true; zzState = 16; break zzForNext;
- case 17: zzIsFinal = true; zzState = 17; break zzForNext;
- case 18: zzIsFinal = true; zzState = 18; break zzForNext;
- case 20: zzIsFinal = true; zzState = 19; break zzForNext;
- case 24: zzIsFinal = true; zzNoLookAhead = true; zzState = 20; break zzForNext;
- default: zzIsFinal = true; zzState = 11; break zzForNext;
- }
-
- case 2:
- switch (zzInput) {
- case 0:
- case 2:
- case 3:
- case 5: zzIsFinal = true; zzNoLookAhead = true; zzState = 7; break zzForNext;
- case 8: zzIsFinal = true; zzState = 12; break zzForNext;
- case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 20; break zzForNext;
- case 1: zzIsFinal = true; zzState = 21; break zzForNext;
- case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 23; break zzForNext;
- case 11: zzIsFinal = true; zzState = 24; break zzForNext;
- case 13: zzIsFinal = true; zzState = 25; break zzForNext;
- case 17: zzIsFinal = true; zzState = 26; break zzForNext;
- case 20: zzIsFinal = true; zzState = 27; break zzForNext;
- case 21: zzIsFinal = true; zzState = 28; break zzForNext;
- case 23: zzIsFinal = true; zzState = 29; break zzForNext;
- case 24: zzIsFinal = true; zzNoLookAhead = true; zzState = 30; break zzForNext;
- case 25: zzIsFinal = true; zzState = 31; break zzForNext;
- default: zzIsFinal = true; zzState = 22; break zzForNext;
- }
-
- case 3:
- switch (zzInput) {
- case 24: zzIsFinal = true; zzNoLookAhead = true; zzState = 20; break zzForNext;
- case 10: zzIsFinal = true; zzState = 32; break zzForNext;
- case 11: zzIsFinal = true; zzState = 33; break zzForNext;
- case 14: zzIsFinal = true; zzState = 34; break zzForNext;
- case 17: zzIsFinal = true; zzState = 35; break zzForNext;
- case 18: zzIsFinal = true; zzState = 36; break zzForNext;
- case 20: zzIsFinal = true; zzState = 37; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 30; break zzForNext;
- }
-
- case 4:
- switch (zzInput) {
- case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 20; break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 5:
- case 7:
- case 8:
- case 24: zzIsFinal = true; zzNoLookAhead = true; zzState = 30; break zzForNext;
- case 23: zzIsFinal = true; zzState = 39; break zzForNext;
- case 25: zzIsFinal = true; zzState = 40; break zzForNext;
- default: zzIsFinal = true; zzState = 38; break zzForNext;
- }
-
- case 5:
- switch (zzInput) {
- case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 41; break zzForNext;
- default: break zzForAction;
- }
-
- case 6:
- switch (zzInput) {
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 42; break zzForNext;
- }
-
- case 8:
- switch (zzInput) {
- case 2: zzState = 43; break zzForNext;
- default: break zzForAction;
- }
-
- case 9:
- switch (zzInput) {
- case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
- case 17: zzState = 45; break zzForNext;
- default: break zzForAction;
- }
-
- case 10:
- switch (zzInput) {
- case 0:
- case 1:
- case 2:
- case 3:
- case 5:
- case 7:
- case 8:
- case 9:
- case 24: break zzForAction;
- default: zzIsFinal = true; break zzForNext;
- }
-
- case 11:
- switch (zzInput) {
- case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 5:
- case 8:
- case 9:
- case 24: break zzForAction;
- default: zzIsFinal = true; zzState = 10; break zzForNext;
- }
-
- case 12:
- switch (zzInput) {
- case 7:
- case 8: zzIsFinal = true; zzState = 47; break zzForNext;
- case 1:
- case 3: break zzForAction;
- default: zzState = 46; break zzForNext;
- }
-
- case 13:
- switch (zzInput) {
- case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
- default: break zzForAction;
- }
-
- case 14:
- switch (zzInput) {
- case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
- case 11: zzIsFinal = true; zzState = 48; break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 5:
- case 8:
- case 9:
- case 24: break zzForAction;
- default: zzIsFinal = true; zzState = 10; break zzForNext;
- }
-
- case 15:
- switch (zzInput) {
- case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
- case 12: zzIsFinal = true; zzState = 49; break zzForNext;
- case 22: zzIsFinal = true; zzState = 50; break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 5:
- case 8:
- case 9:
- case 24: break zzForAction;
- default: zzIsFinal = true; zzState = 10; break zzForNext;
- }
-
- case 16:
- switch (zzInput) {
- case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
- case 15: zzIsFinal = true; zzState = 51; break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 5:
- case 8:
- case 9:
- case 24: break zzForAction;
- default: zzIsFinal = true; zzState = 10; break zzForNext;
- }
-
- case 17:
- switch (zzInput) {
- case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
- case 23: zzIsFinal = true; zzState = 52; break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 5:
- case 8:
- case 9:
- case 24: break zzForAction;
- default: zzIsFinal = true; zzState = 10; break zzForNext;
- }
-
- case 18:
- switch (zzInput) {
- case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
- case 17: zzIsFinal = true; zzState = 53; break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 5:
- case 8:
- case 9:
- case 24: break zzForAction;
- default: zzIsFinal = true; zzState = 10; break zzForNext;
- }
-
- case 19:
- switch (zzInput) {
- case 7: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
- case 13: zzIsFinal = true; zzState = 54; break zzForNext;
- case 0:
- case 1:
- case 2:
- case 3:
- case 5:
- case 8:
- case 9:
- case 24: break zzForAction;
- default: zzIsFinal = true; zzState = 10; break zzForNext;
- }
-
- case 21:
- switch (zzInput) {
- case 2: zzState = 56; break zzForNext;
- case 1:
- case 3: break zzForAction;
- default: zzState = 55; break zzForNext;
- }
-
- case 22:
- switch (zzInput) {
- &