diff -U 3 -dHrN -- vdt-veditor/about_veditor.html vdt/about_veditor.html --- vdt-veditor/about_veditor.html 2017-11-28 14:28:04.266792461 -0700 +++ vdt/about_veditor.html 2017-11-28 14:28:04.198794468 -0700 @@ -1,32 +1,32 @@ - - - -About - - - -

About This Content

- -

August 12, 2006

- -

License

- -

The Eclipse Foundation makes available all content in this plug-in ("Content"). -Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor’s license -that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at http://www.eclipse.org.

- -

Project web page

- -http://veditor.sourceforge.net/. - - + + + +About + + + +

About This Content

+ +

August 12, 2006

+ +

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). +Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor’s license +that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ +

Project web page

+ +http://veditor.sourceforge.net/. + + \ No newline at end of file diff -U 3 -dHrN -- vdt-veditor/ChangeLogVeditor.txt vdt/ChangeLogVeditor.txt --- vdt-veditor/ChangeLogVeditor.txt 2017-11-28 14:28:04.274792225 -0700 +++ vdt/ChangeLogVeditor.txt 2017-11-28 14:28:04.198794468 -0700 @@ -1,74 +1,74 @@ -2008-05-11 tadashi-k - * Fixed bug that external files cannot be edited - * Fixed bug that files cannot be opened from Repository Exploring Perspective -2008-05-05 tadashi-k - * Added Sort and Filter options in Outline and Hierarchy views - * Modify behavior of Go To Definition - * Added context dependent content assist - * Added Verilog directive scanner - * Fixed bugs about Verilog Content Assist - * Added option of scanning all files in the project - * Modify parsing Verilog comment - * Fixed bugs about parsing Verilog code -2007-06-10 tadashi-k - * Fixed bugs about parsing compiler directives and case statement in Verilog - * Fixed bugs about parsing if statement in generate block - * Added Code Style preference page for Verilog code formatter - * Build for JRE 1.5 (no longer support 1.4) -2007-05-22 Ali Ghorashi - * Fixed bugs 1723058 (generate declarations) and 1703662 (custom attributes) -2007-04-14 tadashi-k - * Fixed indent bug in module instantiation - * Fixed openPage bug in Verilog and VHDL mixed design -2007-02-11 tadashi-k - * Fixed parsing parameter statement in Verilog - * Preserve indent in template pattern -2007-01-06 tadashi-k - * Added Verilog context types and templates - * Fixed a problem of VHDL "inModule" template - * Fixed 1573514 -2006-12-28 Ali Ghorashi - * Added Templates Support - * Added Toolbar menus for compiling - * Fixed 1613455 -2006-12-19 Øyvind Harboe - * The project now does not need to be named "veditor" to compile. -2006-12-12 Ghorashi-A - * Fixed a problem with "end architecture" in vhdl parser - * Fixed a builder bug that looked at "/" as the current directry - * Fixed compile action so that all the files are saved before compiling if - the "Save Automatically Before Build" option is checked. - * Moved Compile Action to build menu - * Added Block Command and Block Uncomment -2006-12-10 tadashi-k - * fixed bugs about error parser and simulation -2006-09-10 tadashi-k - * add Export-Package in MANIFEST.MF for test -2006-08-27 tadashi-k - * add a new contributor to CONTRIBUTORS.txt -2006-08-26 tadashi-k - * refactored ParserCore.jj and other files. - * implemented TextHover with declaration lines -2006-08-17 tadashi-k - * fixed bugs: 1488462, 1519826, 1519835, 1537960 -2006-08-16 tadashi-k - * fixed bugs: 1529153, 1538377 - * fixed bugs: ExtenalLauncher show error if launch in non-exist directory -2006-08-14 Øyvind Harboe - * renamed ChangeLog to ChangeLog.txt & CONTRIBUTORS to CONTRIBUTORS.txt that allows - BOM & UTF-8 encoding to be used. - 、私は3つのビールを食べるように! -2006-08-12 tadashi-k - * Changed license from GPL to EPL -2006-08-11 Øyvind Harboe - * Added CONTRIBUTORS file -2006-05-30 Øyvind Harboe - * added ChangeLog - * bumped version number for plugin to 0.4.2 - * Fixed NPE in ctrl-space for VHDL files. - * renamed build.xml to buildjavacc.xml. The original build.xml file - is used to generate .java from .jj files. The "build.xml" name - is used by standard Eclipse naming w.r.t. build files for exporting - the plugin - * added standard Eclipse plugin.xlm, which produces an emphemeral build.xml - which allows exporting veditor as a plugin +2008-05-11 tadashi-k + * Fixed bug that external files cannot be edited + * Fixed bug that files cannot be opened from Repository Exploring Perspective +2008-05-05 tadashi-k + * Added Sort and Filter options in Outline and Hierarchy views + * Modify behavior of Go To Definition + * Added context dependent content assist + * Added Verilog directive scanner + * Fixed bugs about Verilog Content Assist + * Added option of scanning all files in the project + * Modify parsing Verilog comment + * Fixed bugs about parsing Verilog code +2007-06-10 tadashi-k + * Fixed bugs about parsing compiler directives and case statement in Verilog + * Fixed bugs about parsing if statement in generate block + * Added Code Style preference page for Verilog code formatter + * Build for JRE 1.5 (no longer support 1.4) +2007-05-22 Ali Ghorashi + * Fixed bugs 1723058 (generate declarations) and 1703662 (custom attributes) +2007-04-14 tadashi-k + * Fixed indent bug in module instantiation + * Fixed openPage bug in Verilog and VHDL mixed design +2007-02-11 tadashi-k + * Fixed parsing parameter statement in Verilog + * Preserve indent in template pattern +2007-01-06 tadashi-k + * Added Verilog context types and templates + * Fixed a problem of VHDL "inModule" template + * Fixed 1573514 +2006-12-28 Ali Ghorashi + * Added Templates Support + * Added Toolbar menus for compiling + * Fixed 1613455 +2006-12-19 Øyvind Harboe + * The project now does not need to be named "veditor" to compile. +2006-12-12 Ghorashi-A + * Fixed a problem with "end architecture" in vhdl parser + * Fixed a builder bug that looked at "/" as the current directry + * Fixed compile action so that all the files are saved before compiling if + the "Save Automatically Before Build" option is checked. + * Moved Compile Action to build menu + * Added Block Command and Block Uncomment +2006-12-10 tadashi-k + * fixed bugs about error parser and simulation +2006-09-10 tadashi-k + * add Export-Package in MANIFEST.MF for test +2006-08-27 tadashi-k + * add a new contributor to CONTRIBUTORS.txt +2006-08-26 tadashi-k + * refactored ParserCore.jj and other files. + * implemented TextHover with declaration lines +2006-08-17 tadashi-k + * fixed bugs: 1488462, 1519826, 1519835, 1537960 +2006-08-16 tadashi-k + * fixed bugs: 1529153, 1538377 + * fixed bugs: ExtenalLauncher show error if launch in non-exist directory +2006-08-14 Øyvind Harboe + * renamed ChangeLog to ChangeLog.txt & CONTRIBUTORS to CONTRIBUTORS.txt that allows + BOM & UTF-8 encoding to be used. + 、私は3つのビールを食べるように! +2006-08-12 tadashi-k + * Changed license from GPL to EPL +2006-08-11 Øyvind Harboe + * Added CONTRIBUTORS file +2006-05-30 Øyvind Harboe + * added ChangeLog + * bumped version number for plugin to 0.4.2 + * Fixed NPE in ctrl-space for VHDL files. + * renamed build.xml to buildjavacc.xml. The original build.xml file + is used to generate .java from .jj files. The "build.xml" name + is used by standard Eclipse naming w.r.t. build files for exporting + the plugin + * added standard Eclipse plugin.xlm, which produces an emphemeral build.xml + which allows exporting veditor as a plugin diff -U 3 -dHrN -- vdt-veditor/CONTRIBUTORS_VEDITOR.txt vdt/CONTRIBUTORS_VEDITOR.txt --- vdt-veditor/CONTRIBUTORS_VEDITOR.txt 2017-11-28 14:28:04.278792107 -0700 +++ vdt/CONTRIBUTORS_VEDITOR.txt 2017-11-28 14:28:04.198794468 -0700 @@ -1,5 +1,5 @@ -KOBAYASHI Tadashi - initial API and implementation -Øyvind Harboe - various odd bugfixes to VHDL and update site. -Ken Horn - bugfixes -Ali Ghorashi - Bug Fixes, Block Comment/Uncomment, templates, and other features -Stijn Last - VHDL Feature improvements +KOBAYASHI Tadashi - initial API and implementation +Øyvind Harboe - various odd bugfixes to VHDL and update site. +Ken Horn - bugfixes +Ali Ghorashi - Bug Fixes, Block Comment/Uncomment, templates, and other features +Stijn Last - VHDL Feature improvements diff -U 3 -dHrN -- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/verilog/JavaCharStream.java vdt/_generated/com/elphel/vdt/veditor/parser/verilog/JavaCharStream.java --- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/verilog/JavaCharStream.java 2017-11-28 14:28:04.214793995 -0700 +++ vdt/_generated/com/elphel/vdt/veditor/parser/verilog/JavaCharStream.java 2017-11-28 14:28:04.194794586 -0700 @@ -1,584 +1,620 @@ -/* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 4.0 */ -package net.sourceforge.veditor.parser; - -/** - * An implementation of interface CharStream, where the stream is assumed to - * contain only ASCII characters (with java-like unicode escape processing). - */ - -public class JavaCharStream -{ - public static final boolean staticFlag = false; - static final int hexval(char c) throws java.io.IOException { - switch(c) - { - case '0' : - return 0; - case '1' : - return 1; - case '2' : - return 2; - case '3' : - return 3; - case '4' : - return 4; - case '5' : - return 5; - case '6' : - return 6; - case '7' : - return 7; - case '8' : - return 8; - case '9' : - return 9; - - case 'a' : - case 'A' : - return 10; - case 'b' : - case 'B' : - return 11; - case 'c' : - case 'C' : - return 12; - case 'd' : - case 'D' : - return 13; - case 'e' : - case 'E' : - return 14; - case 'f' : - case 'F' : - return 15; - } - - throw new java.io.IOException(); // Should never come here - } - - public int bufpos = -1; - int bufsize; - int available; - int tokenBegin; - protected int bufline[]; - protected int bufcolumn[]; - - protected int column = 0; - protected int line = 1; - - protected boolean prevCharIsCR = false; - protected boolean prevCharIsLF = false; - - protected java.io.Reader inputStream; - - protected char[] nextCharBuf; - protected char[] buffer; - protected int maxNextCharInd = 0; - protected int nextCharInd = -1; - protected int inBuf = 0; - protected int tabSize = 8; - - protected void setTabSize(int i) { tabSize = i; } - protected int getTabSize(int i) { return tabSize; } - - protected void ExpandBuff(boolean wrapAround) - { - char[] newbuffer = new char[bufsize + 2048]; - int newbufline[] = new int[bufsize + 2048]; - int newbufcolumn[] = new int[bufsize + 2048]; - - try - { - if (wrapAround) - { - System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); - System.arraycopy(buffer, 0, newbuffer, - bufsize - tokenBegin, bufpos); - buffer = newbuffer; - - System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); - System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); - bufline = newbufline; - - System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); - System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); - bufcolumn = newbufcolumn; - - bufpos += (bufsize - tokenBegin); - } - else - { - System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); - buffer = newbuffer; - - System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); - bufline = newbufline; - - System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); - bufcolumn = newbufcolumn; - - bufpos -= tokenBegin; - } - } - catch (Throwable t) - { - throw new Error(t.getMessage()); - } - - available = (bufsize += 2048); - tokenBegin = 0; - } - - protected void FillBuff() throws java.io.IOException - { - int i; - if (maxNextCharInd == 4096) - maxNextCharInd = nextCharInd = 0; - - try { - if ((i = inputStream.read(nextCharBuf, maxNextCharInd, - 4096 - maxNextCharInd)) == -1) - { - inputStream.close(); - throw new java.io.IOException(); - } - else - maxNextCharInd += i; - return; - } - catch(java.io.IOException e) { - if (bufpos != 0) - { - --bufpos; - backup(0); - } - else - { - bufline[bufpos] = line; - bufcolumn[bufpos] = column; - } - throw e; - } - } - - protected char ReadByte() throws java.io.IOException - { - if (++nextCharInd >= maxNextCharInd) - FillBuff(); - - return nextCharBuf[nextCharInd]; - } - - public char BeginToken() throws java.io.IOException - { - if (inBuf > 0) - { - --inBuf; - - if (++bufpos == bufsize) - bufpos = 0; - - tokenBegin = bufpos; - return buffer[bufpos]; - } - - tokenBegin = 0; - bufpos = -1; - - return readChar(); - } - - protected void AdjustBuffSize() - { - if (available == bufsize) - { - if (tokenBegin > 2048) - { - bufpos = 0; - available = tokenBegin; - } - else - ExpandBuff(false); - } - else if (available > tokenBegin) - available = bufsize; - else if ((tokenBegin - available) < 2048) - ExpandBuff(true); - else - available = tokenBegin; - } - - protected void UpdateLineColumn(char c) - { - column++; - - if (prevCharIsLF) - { - prevCharIsLF = false; - line += (column = 1); - } - else if (prevCharIsCR) - { - prevCharIsCR = false; - if (c == '\n') - { - prevCharIsLF = true; - } - else - line += (column = 1); - } - - switch (c) - { - case '\r' : - prevCharIsCR = true; - break; - case '\n' : - prevCharIsLF = true; - break; - case '\t' : - column--; - column += (tabSize - (column % tabSize)); - break; - default : - break; - } - - bufline[bufpos] = line; - bufcolumn[bufpos] = column; - } - - public char readChar() throws java.io.IOException - { - if (inBuf > 0) - { - --inBuf; - - if (++bufpos == bufsize) - bufpos = 0; - - return buffer[bufpos]; - } - - char c; - - if (++bufpos == available) - AdjustBuffSize(); - - if ((buffer[bufpos] = c = ReadByte()) == '\\') - { - UpdateLineColumn(c); - - int backSlashCnt = 1; - - for (;;) // Read all the backslashes - { - if (++bufpos == available) - AdjustBuffSize(); - - try - { - if ((buffer[bufpos] = c = ReadByte()) != '\\') - { - UpdateLineColumn(c); - // found a non-backslash char. - if ((c == 'u') && ((backSlashCnt & 1) == 1)) - { - if (--bufpos < 0) - bufpos = bufsize - 1; - - break; - } - - backup(backSlashCnt); - return '\\'; - } - } - catch(java.io.IOException e) - { - if (backSlashCnt > 1) - backup(backSlashCnt); - - return '\\'; - } - - UpdateLineColumn(c); - backSlashCnt++; - } - - // Here, we have seen an odd number of backslash's followed by a 'u' - try - { - while ((c = ReadByte()) == 'u') - ++column; - - buffer[bufpos] = c = (char)(hexval(c) << 12 | - hexval(ReadByte()) << 8 | - hexval(ReadByte()) << 4 | - hexval(ReadByte())); - - column += 4; - } - catch(java.io.IOException e) - { - throw new Error("Invalid escape character at line " + line + - " column " + column + "."); - } - - if (backSlashCnt == 1) - return c; - else - { - backup(backSlashCnt - 1); - return '\\'; - } - } - else - { - UpdateLineColumn(c); - return (c); - } - } - - /** - * @deprecated - * @see #getEndColumn - */ - - public int getColumn() { - return bufcolumn[bufpos]; - } - - /** - * @deprecated - * @see #getEndLine - */ - - public int getLine() { - return bufline[bufpos]; - } - - public int getEndColumn() { - return bufcolumn[bufpos]; - } - - public int getEndLine() { - return bufline[bufpos]; - } - - public int getBeginColumn() { - return bufcolumn[tokenBegin]; - } - - public int getBeginLine() { - return bufline[tokenBegin]; - } - - public void backup(int amount) { - - inBuf += amount; - if ((bufpos -= amount) < 0) - bufpos += bufsize; - } - - public JavaCharStream(java.io.Reader dstream, - int startline, int startcolumn, int buffersize) - { - inputStream = dstream; - line = startline; - column = startcolumn - 1; - - available = bufsize = buffersize; - buffer = new char[buffersize]; - bufline = new int[buffersize]; - bufcolumn = new int[buffersize]; - nextCharBuf = new char[4096]; - } - - public JavaCharStream(java.io.Reader dstream, - int startline, int startcolumn) - { - this(dstream, startline, startcolumn, 4096); - } - - public JavaCharStream(java.io.Reader dstream) - { - this(dstream, 1, 1, 4096); - } - public void ReInit(java.io.Reader dstream, - int startline, int startcolumn, int buffersize) - { - inputStream = dstream; - line = startline; - column = startcolumn - 1; - - if (buffer == null || buffersize != buffer.length) - { - available = bufsize = buffersize; - buffer = new char[buffersize]; - bufline = new int[buffersize]; - bufcolumn = new int[buffersize]; - nextCharBuf = new char[4096]; - } - prevCharIsLF = prevCharIsCR = false; - tokenBegin = inBuf = maxNextCharInd = 0; - nextCharInd = bufpos = -1; - } - - public void ReInit(java.io.Reader dstream, - int startline, int startcolumn) - { - ReInit(dstream, startline, startcolumn, 4096); - } - - public void ReInit(java.io.Reader dstream) - { - ReInit(dstream, 1, 1, 4096); - } - public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, - int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException - { - this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); - } - - public JavaCharStream(java.io.InputStream dstream, int startline, - int startcolumn, int buffersize) - { - this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); - } - - public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, - int startcolumn) throws java.io.UnsupportedEncodingException - { - this(dstream, encoding, startline, startcolumn, 4096); - } - - public JavaCharStream(java.io.InputStream dstream, int startline, - int startcolumn) - { - this(dstream, startline, startcolumn, 4096); - } - - public JavaCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException - { - this(dstream, encoding, 1, 1, 4096); - } - - public JavaCharStream(java.io.InputStream dstream) - { - this(dstream, 1, 1, 4096); - } - - public void ReInit(java.io.InputStream dstream, String encoding, int startline, - int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException - { - ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); - } - - public void ReInit(java.io.InputStream dstream, int startline, - int startcolumn, int buffersize) - { - ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); - } - public void ReInit(java.io.InputStream dstream, String encoding, int startline, - int startcolumn) throws java.io.UnsupportedEncodingException - { - ReInit(dstream, encoding, startline, startcolumn, 4096); - } - public void ReInit(java.io.InputStream dstream, int startline, - int startcolumn) - { - ReInit(dstream, startline, startcolumn, 4096); - } - public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException - { - ReInit(dstream, encoding, 1, 1, 4096); - } - - public void ReInit(java.io.InputStream dstream) - { - ReInit(dstream, 1, 1, 4096); - } - - public String GetImage() - { - if (bufpos >= tokenBegin) - return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); - else - return new String(buffer, tokenBegin, bufsize - tokenBegin) + - new String(buffer, 0, bufpos + 1); - } - - public char[] GetSuffix(int len) - { - char[] ret = new char[len]; - - if ((bufpos + 1) >= len) - System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); - else - { - System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, - len - bufpos - 1); - System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); - } - - return ret; - } - - public void Done() - { - nextCharBuf = null; - buffer = null; - bufline = null; - bufcolumn = null; - } - - /** - * Method to adjust line and column numbers for the start of a token. - */ - public void adjustBeginLineColumn(int newLine, int newCol) - { - int start = tokenBegin; - int len; - - if (bufpos >= tokenBegin) - { - len = bufpos - tokenBegin + inBuf + 1; - } - else - { - len = bufsize - tokenBegin + bufpos + 1 + inBuf; - } - - int i = 0, j = 0, k = 0; - int nextColDiff = 0, columnDiff = 0; - - while (i < len && - bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) - { - bufline[j] = newLine; - nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; - bufcolumn[j] = newCol + columnDiff; - columnDiff = nextColDiff; - i++; - } - - if (i < len) - { - bufline[j] = newLine++; - bufcolumn[j] = newCol + columnDiff; - - while (i++ < len) - { - if (bufline[j = start % bufsize] != bufline[++start % bufsize]) - bufline[j] = newLine++; - else - bufline[j] = newLine; - } - } - - line = bufline[j]; - column = bufcolumn[j]; - } - -} +/* Generated By:JavaCC: Do not edit this line. JavaCharStream.java Version 6.0 */ +/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ +package com.elphel.vdt.veditor.parser.verilog; + +/** + * An implementation of interface CharStream, where the stream is assumed to + * contain only ASCII characters (with java-like unicode escape processing). + */ + +public +class JavaCharStream +{ + /** Whether parser is static. */ + public static final boolean staticFlag = false; + + static final int hexval(char c) throws java.io.IOException { + switch(c) + { + case '0' : + return 0; + case '1' : + return 1; + case '2' : + return 2; + case '3' : + return 3; + case '4' : + return 4; + case '5' : + return 5; + case '6' : + return 6; + case '7' : + return 7; + case '8' : + return 8; + case '9' : + return 9; + + case 'a' : + case 'A' : + return 10; + case 'b' : + case 'B' : + return 11; + case 'c' : + case 'C' : + return 12; + case 'd' : + case 'D' : + return 13; + case 'e' : + case 'E' : + return 14; + case 'f' : + case 'F' : + return 15; + } + + throw new java.io.IOException(); // Should never come here + } + +/** Position in buffer. */ + public int bufpos = -1; + int bufsize; + int available; + int tokenBegin; + protected int bufline[]; + protected int bufcolumn[]; + + protected int column = 0; + protected int line = 1; + + protected boolean prevCharIsCR = false; + protected boolean prevCharIsLF = false; + + protected java.io.Reader inputStream; + + protected char[] nextCharBuf; + protected char[] buffer; + protected int maxNextCharInd = 0; + protected int nextCharInd = -1; + protected int inBuf = 0; + protected int tabSize = 8; + protected boolean trackLineColumn = true; + + public void setTabSize(int i) { tabSize = i; } + public int getTabSize() { return tabSize; } + + protected void ExpandBuff(boolean wrapAround) + { + char[] newbuffer = new char[bufsize + 2048]; + int newbufline[] = new int[bufsize + 2048]; + int newbufcolumn[] = new int[bufsize + 2048]; + + try + { + if (wrapAround) + { + System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); + System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos); + buffer = newbuffer; + + System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); + System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); + bufline = newbufline; + + System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); + System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); + bufcolumn = newbufcolumn; + + bufpos += (bufsize - tokenBegin); + } + else + { + System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); + buffer = newbuffer; + + System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); + bufline = newbufline; + + System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); + bufcolumn = newbufcolumn; + + bufpos -= tokenBegin; + } + } + catch (Throwable t) + { + throw new Error(t.getMessage()); + } + + available = (bufsize += 2048); + tokenBegin = 0; + } + + protected void FillBuff() throws java.io.IOException + { + int i; + if (maxNextCharInd == 4096) + maxNextCharInd = nextCharInd = 0; + + try { + if ((i = inputStream.read(nextCharBuf, maxNextCharInd, + 4096 - maxNextCharInd)) == -1) + { + inputStream.close(); + throw new java.io.IOException(); + } + else + maxNextCharInd += i; + return; + } + catch(java.io.IOException e) { + if (bufpos != 0) + { + --bufpos; + backup(0); + } + else + { + bufline[bufpos] = line; + bufcolumn[bufpos] = column; + } + throw e; + } + } + + protected char ReadByte() throws java.io.IOException + { + if (++nextCharInd >= maxNextCharInd) + FillBuff(); + + return nextCharBuf[nextCharInd]; + } + +/** @return starting character for token. */ + public char BeginToken() throws java.io.IOException + { + if (inBuf > 0) + { + --inBuf; + + if (++bufpos == bufsize) + bufpos = 0; + + tokenBegin = bufpos; + return buffer[bufpos]; + } + + tokenBegin = 0; + bufpos = -1; + + return readChar(); + } + + protected void AdjustBuffSize() + { + if (available == bufsize) + { + if (tokenBegin > 2048) + { + bufpos = 0; + available = tokenBegin; + } + else + ExpandBuff(false); + } + else if (available > tokenBegin) + available = bufsize; + else if ((tokenBegin - available) < 2048) + ExpandBuff(true); + else + available = tokenBegin; + } + + protected void UpdateLineColumn(char c) + { + column++; + + if (prevCharIsLF) + { + prevCharIsLF = false; + line += (column = 1); + } + else if (prevCharIsCR) + { + prevCharIsCR = false; + if (c == '\n') + { + prevCharIsLF = true; + } + else + line += (column = 1); + } + + switch (c) + { + case '\r' : + prevCharIsCR = true; + break; + case '\n' : + prevCharIsLF = true; + break; + case '\t' : + column--; + column += (tabSize - (column % tabSize)); + break; + default : + break; + } + + bufline[bufpos] = line; + bufcolumn[bufpos] = column; + } + +/** Read a character. */ + public char readChar() throws java.io.IOException + { + if (inBuf > 0) + { + --inBuf; + + if (++bufpos == bufsize) + bufpos = 0; + + return buffer[bufpos]; + } + + char c; + + if (++bufpos == available) + AdjustBuffSize(); + + if ((buffer[bufpos] = c = ReadByte()) == '\\') + { + if (trackLineColumn) { UpdateLineColumn(c); } + + int backSlashCnt = 1; + + for (;;) // Read all the backslashes + { + if (++bufpos == available) + AdjustBuffSize(); + + try + { + if ((buffer[bufpos] = c = ReadByte()) != '\\') + { + if (trackLineColumn) { UpdateLineColumn(c); } + // found a non-backslash char. + if ((c == 'u') && ((backSlashCnt & 1) == 1)) + { + if (--bufpos < 0) + bufpos = bufsize - 1; + + break; + } + + backup(backSlashCnt); + return '\\'; + } + } + catch(java.io.IOException e) + { + // We are returning one backslash so we should only backup (count-1) + if (backSlashCnt > 1) + backup(backSlashCnt-1); + + return '\\'; + } + + if (trackLineColumn) { UpdateLineColumn(c); } + backSlashCnt++; + } + + // Here, we have seen an odd number of backslash's followed by a 'u' + try + { + while ((c = ReadByte()) == 'u') + ++column; + + buffer[bufpos] = c = (char)(hexval(c) << 12 | + hexval(ReadByte()) << 8 | + hexval(ReadByte()) << 4 | + hexval(ReadByte())); + + column += 4; + } + catch(java.io.IOException e) + { + throw new Error("Invalid escape character at line " + line + + " column " + column + "."); + } + + if (backSlashCnt == 1) + return c; + else + { + backup(backSlashCnt - 1); + return '\\'; + } + } + else + { + UpdateLineColumn(c); + return c; + } + } + + @Deprecated + /** + * @deprecated + * @see #getEndColumn + */ + public int getColumn() { + return bufcolumn[bufpos]; + } + + @Deprecated + /** + * @deprecated + * @see #getEndLine + */ + public int getLine() { + return bufline[bufpos]; + } + +/** Get end column. */ + public int getEndColumn() { + return bufcolumn[bufpos]; + } + +/** Get end line. */ + public int getEndLine() { + return bufline[bufpos]; + } + +/** @return column of token start */ + public int getBeginColumn() { + return bufcolumn[tokenBegin]; + } + +/** @return line number of token start */ + public int getBeginLine() { + return bufline[tokenBegin]; + } + +/** Retreat. */ + public void backup(int amount) { + + inBuf += amount; + if ((bufpos -= amount) < 0) + bufpos += bufsize; + } + +/** Constructor. */ + public JavaCharStream(java.io.Reader dstream, + int startline, int startcolumn, int buffersize) + { + inputStream = dstream; + line = startline; + column = startcolumn - 1; + + available = bufsize = buffersize; + buffer = new char[buffersize]; + bufline = new int[buffersize]; + bufcolumn = new int[buffersize]; + nextCharBuf = new char[4096]; + } + +/** Constructor. */ + public JavaCharStream(java.io.Reader dstream, + int startline, int startcolumn) + { + this(dstream, startline, startcolumn, 4096); + } + +/** Constructor. */ + public JavaCharStream(java.io.Reader dstream) + { + this(dstream, 1, 1, 4096); + } +/** Reinitialise. */ + public void ReInit(java.io.Reader dstream, + int startline, int startcolumn, int buffersize) + { + inputStream = dstream; + line = startline; + column = startcolumn - 1; + + if (buffer == null || buffersize != buffer.length) + { + available = bufsize = buffersize; + buffer = new char[buffersize]; + bufline = new int[buffersize]; + bufcolumn = new int[buffersize]; + nextCharBuf = new char[4096]; + } + prevCharIsLF = prevCharIsCR = false; + tokenBegin = inBuf = maxNextCharInd = 0; + nextCharInd = bufpos = -1; + } + +/** Reinitialise. */ + public void ReInit(java.io.Reader dstream, + int startline, int startcolumn) + { + ReInit(dstream, startline, startcolumn, 4096); + } + +/** Reinitialise. */ + public void ReInit(java.io.Reader dstream) + { + ReInit(dstream, 1, 1, 4096); + } +/** Constructor. */ + public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, + int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException + { + this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); + } + +/** Constructor. */ + public JavaCharStream(java.io.InputStream dstream, int startline, + int startcolumn, int buffersize) + { + this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096); + } + +/** Constructor. */ + public JavaCharStream(java.io.InputStream dstream, String encoding, int startline, + int startcolumn) throws java.io.UnsupportedEncodingException + { + this(dstream, encoding, startline, startcolumn, 4096); + } + +/** Constructor. */ + public JavaCharStream(java.io.InputStream dstream, int startline, + int startcolumn) + { + this(dstream, startline, startcolumn, 4096); + } + +/** Constructor. */ + public JavaCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException + { + this(dstream, encoding, 1, 1, 4096); + } + +/** Constructor. */ + public JavaCharStream(java.io.InputStream dstream) + { + this(dstream, 1, 1, 4096); + } + +/** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding, int startline, + int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException + { + ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); + } + +/** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, int startline, + int startcolumn, int buffersize) + { + ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); + } +/** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding, int startline, + int startcolumn) throws java.io.UnsupportedEncodingException + { + ReInit(dstream, encoding, startline, startcolumn, 4096); + } +/** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, int startline, + int startcolumn) + { + ReInit(dstream, startline, startcolumn, 4096); + } +/** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException + { + ReInit(dstream, encoding, 1, 1, 4096); + } + +/** Reinitialise. */ + public void ReInit(java.io.InputStream dstream) + { + ReInit(dstream, 1, 1, 4096); + } + + /** @return token image as String */ + public String GetImage() + { + if (bufpos >= tokenBegin) + return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); + else + return new String(buffer, tokenBegin, bufsize - tokenBegin) + + new String(buffer, 0, bufpos + 1); + } + + /** @return suffix */ + public char[] GetSuffix(int len) + { + char[] ret = new char[len]; + + if ((bufpos + 1) >= len) + System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); + else + { + System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, + len - bufpos - 1); + System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); + } + + return ret; + } + + /** Set buffers back to null when finished. */ + public void Done() + { + nextCharBuf = null; + buffer = null; + bufline = null; + bufcolumn = null; + } + + /** + * Method to adjust line and column numbers for the start of a token. + */ + public void adjustBeginLineColumn(int newLine, int newCol) + { + int start = tokenBegin; + int len; + + if (bufpos >= tokenBegin) + { + len = bufpos - tokenBegin + inBuf + 1; + } + else + { + len = bufsize - tokenBegin + bufpos + 1 + inBuf; + } + + int i = 0, j = 0, k = 0; + int nextColDiff = 0, columnDiff = 0; + + while (i < len && bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) + { + bufline[j] = newLine; + nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; + bufcolumn[j] = newCol + columnDiff; + columnDiff = nextColDiff; + i++; + } + + if (i < len) + { + bufline[j] = newLine++; + bufcolumn[j] = newCol + columnDiff; + + while (i++ < len) + { + if (bufline[j = start % bufsize] != bufline[++start % bufsize]) + bufline[j] = newLine++; + else + bufline[j] = newLine; + } + } + + line = bufline[j]; + column = bufcolumn[j]; + } + boolean getTrackLineColumn() { return trackLineColumn; } + void setTrackLineColumn(boolean tlc) { trackLineColumn = tlc; } + +} +/* JavaCC - OriginalChecksum=751c648385bd32bb5b99a57613d58ec6 (do not edit this line) */ diff -U 3 -dHrN -- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/verilog/ParseException.java vdt/_generated/com/elphel/vdt/veditor/parser/verilog/ParseException.java --- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/verilog/ParseException.java 2017-11-28 14:28:04.222793758 -0700 +++ vdt/_generated/com/elphel/vdt/veditor/parser/verilog/ParseException.java 2017-11-28 14:28:04.194794586 -0700 @@ -1,197 +1,187 @@ -/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */ -package net.sourceforge.veditor.parser; - -/** - * This exception is thrown when parse errors are encountered. - * You can explicitly create objects of this exception type by - * calling the method generateParseException in the generated - * parser. - * - * You can modify this class to customize your error reporting - * mechanisms so long as you retain the public fields. - */ -public class ParseException extends Exception { - - /** - * - */ - private static final long serialVersionUID = 7811742812760162144L; - -/** - * This constructor is used by the method "generateParseException" - * in the generated parser. Calling this constructor generates - * a new object of this type with the fields "currentToken", - * "expectedTokenSequences", and "tokenImage" set. The boolean - * flag "specialConstructor" is also set to true to indicate that - * this constructor was used to create this object. - * This constructor calls its super class with the empty string - * to force the "toString" method of parent class "Throwable" to - * print the error message in the form: - * ParseException: - */ - public ParseException(Token currentTokenVal, - int[][] expectedTokenSequencesVal, - String[] tokenImageVal - ) - { - super(""); - specialConstructor = true; - currentToken = currentTokenVal; - expectedTokenSequences = expectedTokenSequencesVal; - tokenImage = tokenImageVal; - } - - /** - * The following constructors are for use by you for whatever - * purpose you can think of. Constructing the exception in this - * manner makes the exception behave in the normal way - i.e., as - * documented in the class "Throwable". The fields "errorToken", - * "expectedTokenSequences", and "tokenImage" do not contain - * relevant information. The JavaCC generated code does not use - * these constructors. - */ - - public ParseException() { - super(); - specialConstructor = false; - } - - public ParseException(String message) { - super(message); - specialConstructor = false; - } - - /** - * This variable determines which constructor was used to create - * this object and thereby affects the semantics of the - * "getMessage" method (see below). - */ - protected boolean specialConstructor; - - /** - * This is the last token that has been consumed successfully. If - * this object has been created due to a parse error, the token - * followng this token will (therefore) be the first error token. - */ - public Token currentToken; - - /** - * Each entry in this array is an array of integers. Each array - * of integers represents a sequence of tokens (by their ordinal - * values) that is expected at this point of the parse. - */ - public int[][] expectedTokenSequences; - - /** - * This is a reference to the "tokenImage" array of the generated - * parser within which the parse error occurred. This array is - * defined in the generated ...Constants interface. - */ - public String[] tokenImage; - - /** - * This method has the standard behavior when this object has been - * created using the standard constructors. Otherwise, it uses - * "currentToken" and "expectedTokenSequences" to generate a parse - * error message and returns it. If this object has been created - * due to a parse error, and you do not catch it (it gets thrown - * from the parser), then this method is called during the printing - * of the final stack trace, and hence the correct error message - * gets displayed. - */ - public String getMessage() { - if (!specialConstructor) { - return super.getMessage(); - } - StringBuffer expected = new StringBuffer(); - int maxSize = 0; - for (int i = 0; i < expectedTokenSequences.length; i++) { - if (maxSize < expectedTokenSequences[i].length) { - maxSize = expectedTokenSequences[i].length; - } - for (int j = 0; j < expectedTokenSequences[i].length; j++) { - expected.append(tokenImage[expectedTokenSequences[i][j]]).append(" "); - } - if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { - expected.append("..."); - } - expected.append(eol).append(" "); - } - String retval = "Encountered \""; - Token tok = currentToken.next; - for (int i = 0; i < maxSize; i++) { - if (i != 0) retval += " "; - if (tok.kind == 0) { - retval += tokenImage[0]; - break; - } - retval += add_escapes(tok.image); - tok = tok.next; - } - retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; - retval += "." + eol; - if (expectedTokenSequences.length == 1) { - retval += "Was expecting:" + eol + " "; - } else { - retval += "Was expecting one of:" + eol + " "; - } - retval += expected.toString(); - return retval; - } - - /** - * The end of line string for this machine. - */ - protected String eol = System.getProperty("line.separator", "\n"); - - /** - * Used to convert raw characters to their escaped version - * when these raw version cannot be used as part of an ASCII - * string literal. - */ - protected String add_escapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; - } - } - return retval.toString(); - } - -} +/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 6.0 */ +/* JavaCCOptions:KEEP_LINE_COL=null */ +package com.elphel.vdt.veditor.parser.verilog; + +/** + * This exception is thrown when parse errors are encountered. + * You can explicitly create objects of this exception type by + * calling the method generateParseException in the generated + * parser. + * + * You can modify this class to customize your error reporting + * mechanisms so long as you retain the public fields. + */ +public class ParseException extends Exception { + + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; + + /** + * This constructor is used by the method "generateParseException" + * in the generated parser. Calling this constructor generates + * a new object of this type with the fields "currentToken", + * "expectedTokenSequences", and "tokenImage" set. + */ + public ParseException(Token currentTokenVal, + int[][] expectedTokenSequencesVal, + String[] tokenImageVal + ) + { + super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal)); + currentToken = currentTokenVal; + expectedTokenSequences = expectedTokenSequencesVal; + tokenImage = tokenImageVal; + } + + /** + * The following constructors are for use by you for whatever + * purpose you can think of. Constructing the exception in this + * manner makes the exception behave in the normal way - i.e., as + * documented in the class "Throwable". The fields "errorToken", + * "expectedTokenSequences", and "tokenImage" do not contain + * relevant information. The JavaCC generated code does not use + * these constructors. + */ + + public ParseException() { + super(); + } + + /** Constructor with message. */ + public ParseException(String message) { + super(message); + } + + + /** + * This is the last token that has been consumed successfully. If + * this object has been created due to a parse error, the token + * followng this token will (therefore) be the first error token. + */ + public Token currentToken; + + /** + * Each entry in this array is an array of integers. Each array + * of integers represents a sequence of tokens (by their ordinal + * values) that is expected at this point of the parse. + */ + public int[][] expectedTokenSequences; + + /** + * This is a reference to the "tokenImage" array of the generated + * parser within which the parse error occurred. This array is + * defined in the generated ...Constants interface. + */ + public String[] tokenImage; + + /** + * It uses "currentToken" and "expectedTokenSequences" to generate a parse + * error message and returns it. If this object has been created + * due to a parse error, and you do not catch it (it gets thrown + * from the parser) the correct error message + * gets displayed. + */ + private static String initialise(Token currentToken, + int[][] expectedTokenSequences, + String[] tokenImage) { + String eol = System.getProperty("line.separator", "\n"); + StringBuffer expected = new StringBuffer(); + int maxSize = 0; + for (int i = 0; i < expectedTokenSequences.length; i++) { + if (maxSize < expectedTokenSequences[i].length) { + maxSize = expectedTokenSequences[i].length; + } + for (int j = 0; j < expectedTokenSequences[i].length; j++) { + expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' '); + } + if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { + expected.append("..."); + } + expected.append(eol).append(" "); + } + String retval = "Encountered \""; + Token tok = currentToken.next; + for (int i = 0; i < maxSize; i++) { + if (i != 0) retval += " "; + if (tok.kind == 0) { + retval += tokenImage[0]; + break; + } + retval += " " + tokenImage[tok.kind]; + retval += " \""; + retval += add_escapes(tok.image); + retval += " \""; + tok = tok.next; + } + retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; + retval += "." + eol; + if (expectedTokenSequences.length == 1) { + retval += "Was expecting:" + eol + " "; + } else { + retval += "Was expecting one of:" + eol + " "; + } + retval += expected.toString(); + return retval; + } + + /** + * The end of line string for this machine. + */ + protected String eol = System.getProperty("line.separator", "\n"); + + /** + * Used to convert raw characters to their escaped version + * when these raw version cannot be used as part of an ASCII + * string literal. + */ + static String add_escapes(String str) { + StringBuffer retval = new StringBuffer(); + char ch; + for (int i = 0; i < str.length(); i++) { + switch (str.charAt(i)) + { + case 0 : + continue; + case '\b': + retval.append("\\b"); + continue; + case '\t': + retval.append("\\t"); + continue; + case '\n': + retval.append("\\n"); + continue; + case '\f': + retval.append("\\f"); + continue; + case '\r': + retval.append("\\r"); + continue; + case '\"': + retval.append("\\\""); + continue; + case '\'': + retval.append("\\\'"); + continue; + case '\\': + retval.append("\\\\"); + continue; + default: + if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { + String s = "0000" + Integer.toString(ch, 16); + retval.append("\\u" + s.substring(s.length() - 4, s.length())); + } else { + retval.append(ch); + } + continue; + } + } + return retval.toString(); + } + +} +/* JavaCC - OriginalChecksum=c75fae9c19fa9314957b1ec647c3bfc6 (do not edit this line) */ diff -U 3 -dHrN -- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/verilog/Token.java vdt/_generated/com/elphel/vdt/veditor/parser/verilog/Token.java --- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/verilog/Token.java 2017-11-28 14:28:04.234793405 -0700 +++ vdt/_generated/com/elphel/vdt/veditor/parser/verilog/Token.java 2017-11-28 14:28:04.194794586 -0700 @@ -1,81 +1,131 @@ -/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */ -package net.sourceforge.veditor.parser; - -/** - * Describes the input token stream. - */ - -public class Token { - - /** - * An integer that describes the kind of this token. This numbering - * system is determined by JavaCCParser, and a table of these numbers is - * stored in the file ...Constants.java. - */ - public int kind; - - /** - * beginLine and beginColumn describe the position of the first character - * of this token; endLine and endColumn describe the position of the - * last character of this token. - */ - public int beginLine, beginColumn, endLine, endColumn; - - /** - * The string image of the token. - */ - public String image; - - /** - * A reference to the next regular (non-special) token from the input - * stream. If this is the last token from the input stream, or if the - * token manager has not read tokens beyond this one, this field is - * set to null. This is true only if this token is also a regular - * token. Otherwise, see below for a description of the contents of - * this field. - */ - public Token next; - - /** - * This field is used to access special tokens that occur prior to this - * token, but after the immediately preceding regular (non-special) token. - * If there are no such special tokens, this field is set to null. - * When there are more than one such special token, this field refers - * to the last of these special tokens, which in turn refers to the next - * previous special token through its specialToken field, and so on - * until the first special token (whose specialToken field is null). - * The next fields of special tokens refer to other special tokens that - * immediately follow it (without an intervening regular token). If there - * is no such token, this field is null. - */ - public Token specialToken; - - /** - * Returns the image. - */ - public String toString() - { - return image; - } - - /** - * Returns a new Token object, by default. However, if you want, you - * can create and return subclass objects based on the value of ofKind. - * Simply add the cases to the switch for all those special cases. - * For example, if you have a subclass of Token called IDToken that - * you want to create if ofKind is ID, simlpy add something like : - * - * case MyParserConstants.ID : return new IDToken(); - * - * to the following switch statement. Then you can cast matchedToken - * variable to the appropriate type and use it in your lexical actions. - */ - public static final Token newToken(int ofKind) - { - switch(ofKind) - { - default : return new Token(); - } - } - -} +/* Generated By:JavaCC: Do not edit this line. Token.java Version 6.0 */ +/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ +package com.elphel.vdt.veditor.parser.verilog; + +/** + * Describes the input token stream. + */ + +public class Token implements java.io.Serializable { + + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; + + /** + * An integer that describes the kind of this token. This numbering + * system is determined by JavaCCParser, and a table of these numbers is + * stored in the file ...Constants.java. + */ + public int kind; + + /** The line number of the first character of this Token. */ + public int beginLine; + /** The column number of the first character of this Token. */ + public int beginColumn; + /** The line number of the last character of this Token. */ + public int endLine; + /** The column number of the last character of this Token. */ + public int endColumn; + + /** + * The string image of the token. + */ + public String image; + + /** + * A reference to the next regular (non-special) token from the input + * stream. If this is the last token from the input stream, or if the + * token manager has not read tokens beyond this one, this field is + * set to null. This is true only if this token is also a regular + * token. Otherwise, see below for a description of the contents of + * this field. + */ + public Token next; + + /** + * This field is used to access special tokens that occur prior to this + * token, but after the immediately preceding regular (non-special) token. + * If there are no such special tokens, this field is set to null. + * When there are more than one such special token, this field refers + * to the last of these special tokens, which in turn refers to the next + * previous special token through its specialToken field, and so on + * until the first special token (whose specialToken field is null). + * The next fields of special tokens refer to other special tokens that + * immediately follow it (without an intervening regular token). If there + * is no such token, this field is null. + */ + public Token specialToken; + + /** + * An optional attribute value of the Token. + * Tokens which are not used as syntactic sugar will often contain + * meaningful values that will be used later on by the compiler or + * interpreter. This attribute value is often different from the image. + * Any subclass of Token that actually wants to return a non-null value can + * override this method as appropriate. + */ + public Object getValue() { + return null; + } + + /** + * No-argument constructor + */ + public Token() {} + + /** + * Constructs a new token for the specified Image. + */ + public Token(int kind) + { + this(kind, null); + } + + /** + * Constructs a new token for the specified Image and Kind. + */ + public Token(int kind, String image) + { + this.kind = kind; + this.image = image; + } + + /** + * Returns the image. + */ + public String toString() + { + return image; + } + + /** + * Returns a new Token object, by default. However, if you want, you + * can create and return subclass objects based on the value of ofKind. + * Simply add the cases to the switch for all those special cases. + * For example, if you have a subclass of Token called IDToken that + * you want to create if ofKind is ID, simply add something like : + * + * case MyParserConstants.ID : return new IDToken(ofKind, image); + * + * to the following switch statement. Then you can cast matchedToken + * variable to the appropriate type and use sit in your lexical actions. + */ + public static Token newToken(int ofKind, String image) + { + switch(ofKind) + { + default : return new Token(ofKind, image); + } + } + + public static Token newToken(int ofKind) + { + return newToken(ofKind, null); + } + +} +/* JavaCC - OriginalChecksum=e80a8b92a6bec0520c9325dc7435f8bb (do not edit this line) */ diff -U 3 -dHrN -- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/verilog/TokenMgrError.java vdt/_generated/com/elphel/vdt/veditor/parser/verilog/TokenMgrError.java --- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/verilog/TokenMgrError.java 2017-11-28 14:28:04.234793405 -0700 +++ vdt/_generated/com/elphel/vdt/veditor/parser/verilog/TokenMgrError.java 2017-11-28 14:28:04.194794586 -0700 @@ -1,138 +1,147 @@ -/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */ -package net.sourceforge.veditor.parser; - -public class TokenMgrError extends Error -{ - /* - * Ordinals for various reasons why an Error of this type can be thrown. - */ - - /** - * - */ - private static final long serialVersionUID = 8717981741131339532L; - -/** - * Lexical error occured. - */ - static final int LEXICAL_ERROR = 0; - - /** - * An attempt wass made to create a second instance of a static token manager. - */ - static final int STATIC_LEXER_ERROR = 1; - - /** - * Tried to change to an invalid lexical state. - */ - static final int INVALID_LEXICAL_STATE = 2; - - /** - * Detected (and bailed out of) an infinite loop in the token manager. - */ - static final int LOOP_DETECTED = 3; - - /** - * Indicates the reason why the exception is thrown. It will have - * one of the above 4 values. - */ - int errorCode; - - /** - * Replaces unprintable characters by their espaced (or unicode escaped) - * equivalents in the given string - */ - protected static final String addEscapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; - } - } - return retval.toString(); - } - - /** - * Returns a detailed message for the Error when it is thrown by the - * token manager to indicate a lexical error. - * Parameters : - * EOFSeen : indicates if EOF caused the lexicl error - * curLexState : lexical state in which this error occured - * errorLine : line number when the error occured - * errorColumn : column number when the error occured - * errorAfter : prefix that was seen before this error occured - * curchar : the offending character - * Note: You can customize the lexical error message by modifying this method. - */ - protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { - return("Lexical error at line " + - errorLine + ", column " + - errorColumn + ". Encountered: " + - (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + - "after : \"" + addEscapes(errorAfter) + "\""); - } - - /** - * You can also modify the body of this method to customize your error messages. - * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not - * of end-users concern, so you can return something like : - * - * "Internal Error : Please file a bug report .... " - * - * from this method for such cases in the release version of your parser. - */ - public String getMessage() { - return super.getMessage(); - } - - /* - * Constructors of various flavors follow. - */ - - public TokenMgrError() { - } - - public TokenMgrError(String message, int reason) { - super(message); - errorCode = reason; - } - - public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { - this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); - } -} +/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 6.0 */ +/* JavaCCOptions: */ +package com.elphel.vdt.veditor.parser.verilog; + +/** Token Manager Error. */ +public class TokenMgrError extends Error +{ + + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; + + /* + * Ordinals for various reasons why an Error of this type can be thrown. + */ + + /** + * Lexical error occurred. + */ + static final int LEXICAL_ERROR = 0; + + /** + * An attempt was made to create a second instance of a static token manager. + */ + static final int STATIC_LEXER_ERROR = 1; + + /** + * Tried to change to an invalid lexical state. + */ + static final int INVALID_LEXICAL_STATE = 2; + + /** + * Detected (and bailed out of) an infinite loop in the token manager. + */ + static final int LOOP_DETECTED = 3; + + /** + * Indicates the reason why the exception is thrown. It will have + * one of the above 4 values. + */ + int errorCode; + + /** + * Replaces unprintable characters by their escaped (or unicode escaped) + * equivalents in the given string + */ + protected static final String addEscapes(String str) { + StringBuffer retval = new StringBuffer(); + char ch; + for (int i = 0; i < str.length(); i++) { + switch (str.charAt(i)) + { + case 0 : + continue; + case '\b': + retval.append("\\b"); + continue; + case '\t': + retval.append("\\t"); + continue; + case '\n': + retval.append("\\n"); + continue; + case '\f': + retval.append("\\f"); + continue; + case '\r': + retval.append("\\r"); + continue; + case '\"': + retval.append("\\\""); + continue; + case '\'': + retval.append("\\\'"); + continue; + case '\\': + retval.append("\\\\"); + continue; + default: + if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { + String s = "0000" + Integer.toString(ch, 16); + retval.append("\\u" + s.substring(s.length() - 4, s.length())); + } else { + retval.append(ch); + } + continue; + } + } + return retval.toString(); + } + + /** + * Returns a detailed message for the Error when it is thrown by the + * token manager to indicate a lexical error. + * Parameters : + * EOFSeen : indicates if EOF caused the lexical error + * curLexState : lexical state in which this error occurred + * errorLine : line number when the error occurred + * errorColumn : column number when the error occurred + * errorAfter : prefix that was seen before this error occurred + * curchar : the offending character + * Note: You can customize the lexical error message by modifying this method. + */ + protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { + return("Lexical error at line " + + errorLine + ", column " + + errorColumn + ". Encountered: " + + (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + + "after : \"" + addEscapes(errorAfter) + "\""); + } + + /** + * You can also modify the body of this method to customize your error messages. + * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not + * of end-users concern, so you can return something like : + * + * "Internal Error : Please file a bug report .... " + * + * from this method for such cases in the release version of your parser. + */ + public String getMessage() { + return super.getMessage(); + } + + /* + * Constructors of various flavors follow. + */ + + /** No arg constructor. */ + public TokenMgrError() { + } + + /** Constructor with message and reason. */ + public TokenMgrError(String message, int reason) { + super(message); + errorCode = reason; + } + + /** Full Constructor. */ + public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { + this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); + } +} +/* JavaCC - OriginalChecksum=4e9300b90fece49edb6b2b7a3e63ba36 (do not edit this line) */ diff -U 3 -dHrN -- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/verilog/VerilogParserCoreConstants.java vdt/_generated/com/elphel/vdt/veditor/parser/verilog/VerilogParserCoreConstants.java --- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/verilog/VerilogParserCoreConstants.java 2017-11-28 14:28:04.238793287 -0700 +++ vdt/_generated/com/elphel/vdt/veditor/parser/verilog/VerilogParserCoreConstants.java 2017-11-28 14:28:04.194794586 -0700 @@ -1,140 +1,411 @@ -/* Generated By:JavaCC: Do not edit this line. VerilogParserCoreConstants.java */ -package net.sourceforge.veditor.parser; - -public interface VerilogParserCoreConstants { - - int EOF = 0; - int MULTI_LINE_COMMENT = 2; - int ENDIF = 4; - int SINGLE_LINE_COMMENT = 11; - int DELSE = 12; - int DIRECTIVE = 13; - int MODULE = 14; - int ENDMODULE = 15; - int BEGIN = 16; - int END = 17; - int FORK = 18; - int JOIN = 19; - int SPECIFY = 20; - int ENDSPECIFY = 21; - int IF = 22; - int ELSE = 23; - int WHILE = 24; - int FOR = 25; - int FOREVER = 26; - int REPEAT = 27; - int CASE = 28; - int CASEX = 29; - int ENDCASE = 30; - int FUNCTION = 31; - int ENDFUNCTION = 32; - int TASK = 33; - int ENDTASK = 34; - int GENERATE = 35; - int ENDGENERATE = 36; - int INPUT = 37; - int OUTPUT = 38; - int INOUT = 39; - int INTEGER = 40; - int WIRE = 41; - int REG = 42; - int EVENT = 43; - int GENVAR = 44; - int REAL = 45; - int PARAMETER = 46; - int SIGNED = 47; - int STMT_HEAD = 48; - int BLOCK_HEAD = 49; - int LPAREN = 50; - int RPAREN = 51; - int LBRACE = 52; - int RBRACE = 53; - int LBRACKET = 54; - int RBRACKET = 55; - int EOS = 56; - int PARA = 57; - int AT = 58; - int BQ = 59; - int DOLLAR = 60; - int COMMA = 61; - int COLON = 62; - int EQUAL = 63; - int IDENT = 64; - int SPC_CHAR = 65; - int OTHER = 66; - - int DEFAULT = 0; - int IN_MULTI_LINE_COMMENT = 1; - int IN_ELSE_BLOCK = 2; - - String[] tokenImage = { - "", - "\"/*\"", - "\"*/\"", - "", - "\"`endif\"", - "", - "\" \"", - "\"\\t\"", - "\"\\r\"", - "\"\\n\"", - "\"\\f\"", - "", - "\"\\n`else\"", - "", - "\"module\"", - "\"endmodule\"", - "\"begin\"", - "\"end\"", - "\"fork\"", - "\"join\"", - "\"specify\"", - "\"endspecify\"", - "\"if\"", - "\"else\"", - "\"while\"", - "\"for\"", - "\"forever\"", - "\"repeat\"", - "\"case\"", - "\"casex\"", - "\"endcase\"", - "\"function\"", - "\"endfunction\"", - "\"task\"", - "\"endtask\"", - "\"generate\"", - "\"endgenerate\"", - "\"input\"", - "\"output\"", - "\"inout\"", - "\"integer\"", - "\"wire\"", - "\"reg\"", - "\"event\"", - "\"genvar\"", - "\"real\"", - "\"parameter\"", - "\"signed\"", - "", - "", - "\"(\"", - "\")\"", - "\"{\"", - "\"}\"", - "\"[\"", - "\"]\"", - "\";\"", - "\"#\"", - "\"@\"", - "\"`\"", - "\"$\"", - "\",\"", - "\":\"", - "\"=\"", - "", - "", - "\"[.]\"", - }; - -} +/* Generated By:JavaCC: Do not edit this line. VerilogParserCoreConstants.java */ +package com.elphel.vdt.veditor.parser.verilog; + + +/** + * Token literal values and constants. + * Generated by org.javacc.parser.OtherFilesGen#start() + */ +public interface VerilogParserCoreConstants { + + /** End of File. */ + int EOF = 0; + /** RegularExpression Id. */ + int MULTI_LINE_COMMENT = 2; + /** RegularExpression Id. */ + int PROPERTY_COMMENT = 5; + /** RegularExpression Id. */ + int SINGLE_LINE_COMMENT = 12; + /** RegularExpression Id. */ + int MODULE = 13; + /** RegularExpression Id. */ + int ENDMODULE = 14; + /** RegularExpression Id. */ + int PRIMITIVE = 15; + /** RegularExpression Id. */ + int ENDPRIMITIVE = 16; + /** RegularExpression Id. */ + int TABLE = 17; + /** RegularExpression Id. */ + int ENDTABLE = 18; + /** RegularExpression Id. */ + int BEGIN = 19; + /** RegularExpression Id. */ + int END = 20; + /** RegularExpression Id. */ + int FORK = 21; + /** RegularExpression Id. */ + int JOIN = 22; + /** RegularExpression Id. */ + int SPECIFY = 23; + /** RegularExpression Id. */ + int ENDSPECIFY = 24; + /** RegularExpression Id. */ + int IF = 25; + /** RegularExpression Id. */ + int ELSE = 26; + /** RegularExpression Id. */ + int WHILE = 27; + /** RegularExpression Id. */ + int FOR = 28; + /** RegularExpression Id. */ + int FOREVER = 29; + /** RegularExpression Id. */ + int REPEAT = 30; + /** RegularExpression Id. */ + int WAIT = 31; + /** RegularExpression Id. */ + int CASE = 32; + /** RegularExpression Id. */ + int DEFAULT_LABEL = 33; + /** RegularExpression Id. */ + int ENDCASE = 34; + /** RegularExpression Id. */ + int FUNCTION = 35; + /** RegularExpression Id. */ + int ENDFUNCTION = 36; + /** RegularExpression Id. */ + int TASK = 37; + /** RegularExpression Id. */ + int ENDTASK = 38; + /** RegularExpression Id. */ + int GENERATE = 39; + /** RegularExpression Id. */ + int ENDGENERATE = 40; + /** RegularExpression Id. */ + int INPUT = 41; + /** RegularExpression Id. */ + int OUTPUT = 42; + /** RegularExpression Id. */ + int INOUT = 43; + /** RegularExpression Id. */ + int INTEGER = 44; + /** RegularExpression Id. */ + int REG = 45; + /** RegularExpression Id. */ + int WIRE = 46; + /** RegularExpression Id. */ + int EVENT = 47; + /** RegularExpression Id. */ + int GENVAR = 48; + /** RegularExpression Id. */ + int REAL = 49; + /** RegularExpression Id. */ + int PARAMETER = 50; + /** RegularExpression Id. */ + int LOCALPARAM = 51; + /** RegularExpression Id. */ + int SIGNED = 52; + /** RegularExpression Id. */ + int PROPERTY = 53; + /** RegularExpression Id. */ + int ENDPROPERTY = 54; + /** RegularExpression Id. */ + int ASSERT = 55; + /** RegularExpression Id. */ + int ASSIGN = 56; + /** RegularExpression Id. */ + int DEASSIGN = 57; + /** RegularExpression Id. */ + int FORCE = 58; + /** RegularExpression Id. */ + int RELEASE = 59; + /** RegularExpression Id. */ + int TIME = 60; + /** RegularExpression Id. */ + int REALTIME = 61; + /** RegularExpression Id. */ + int DEFPARAM = 62; + /** RegularExpression Id. */ + int OR = 63; + /** RegularExpression Id. */ + int DISABLE = 64; + /** RegularExpression Id. */ + int ALWAYS = 65; + /** RegularExpression Id. */ + int INITIAL = 66; + /** RegularExpression Id. */ + int EDGE = 67; + /** RegularExpression Id. */ + int SUPPLY = 68; + /** RegularExpression Id. */ + int NET_TYPE = 69; + /** RegularExpression Id. */ + int STRENGTH = 70; + /** RegularExpression Id. */ + int PRIM_1IN_XOUT = 71; + /** RegularExpression Id. */ + int PRIM_1OUT_XIN = 72; + /** RegularExpression Id. */ + int PRIM_1OUT_1IN_1CNTL = 73; + /** RegularExpression Id. */ + int PRIM_1OUT = 74; + /** RegularExpression Id. */ + int PRIM_1OUT_1IN_NC_PC = 75; + /** RegularExpression Id. */ + int PRIM_BI = 76; + /** RegularExpression Id. */ + int LPAREN = 77; + /** RegularExpression Id. */ + int RPAREN = 78; + /** RegularExpression Id. */ + int LBRACE = 79; + /** RegularExpression Id. */ + int RBRACE = 80; + /** RegularExpression Id. */ + int LBRACKET = 81; + /** RegularExpression Id. */ + int RBRACKET = 82; + /** RegularExpression Id. */ + int EOS = 83; + /** RegularExpression Id. */ + int PARA = 84; + /** RegularExpression Id. */ + int AT = 85; + /** RegularExpression Id. */ + int DOLLAR = 86; + /** RegularExpression Id. */ + int COMMA = 87; + /** RegularExpression Id. */ + int DOT = 88; + /** RegularExpression Id. */ + int AGN = 89; + /** RegularExpression Id. */ + int GT = 90; + /** RegularExpression Id. */ + int LT = 91; + /** RegularExpression Id. */ + int BANG = 92; + /** RegularExpression Id. */ + int TILDE = 93; + /** RegularExpression Id. */ + int HOOK = 94; + /** RegularExpression Id. */ + int COLON = 95; + /** RegularExpression Id. */ + int PCOLON = 96; + /** RegularExpression Id. */ + int MCOLON = 97; + /** RegularExpression Id. */ + int EQ = 98; + /** RegularExpression Id. */ + int LE = 99; + /** RegularExpression Id. */ + int GE = 100; + /** RegularExpression Id. */ + int NE = 101; + /** RegularExpression Id. */ + int SC_OR = 102; + /** RegularExpression Id. */ + int SC_AND = 103; + /** RegularExpression Id. */ + int PLUS = 104; + /** RegularExpression Id. */ + int MINUS = 105; + /** RegularExpression Id. */ + int STAR = 106; + /** RegularExpression Id. */ + int SLASH = 107; + /** RegularExpression Id. */ + int BIT_AND = 108; + /** RegularExpression Id. */ + int BIT_OR = 109; + /** RegularExpression Id. */ + int XOR = 110; + /** RegularExpression Id. */ + int REM = 111; + /** RegularExpression Id. */ + int LSHIFT = 112; + /** RegularExpression Id. */ + int RSHIFT = 113; + /** RegularExpression Id. */ + int NEG_AND = 114; + /** RegularExpression Id. */ + int NEG_OR = 115; + /** RegularExpression Id. */ + int NEG_XOR = 116; + /** RegularExpression Id. */ + int XOR_NEG = 117; + /** RegularExpression Id. */ + int EQ_C = 118; + /** RegularExpression Id. */ + int NE_C = 119; + /** RegularExpression Id. */ + int POWER = 120; + /** RegularExpression Id. */ + int ALSHIFT = 121; + /** RegularExpression Id. */ + int ARSHIFT = 122; + /** RegularExpression Id. */ + int IDENT = 123; + /** RegularExpression Id. */ + int SYSTEM_IDENT = 124; + /** RegularExpression Id. */ + int LETTER = 125; + /** RegularExpression Id. */ + int BACKSLASH = 126; + /** RegularExpression Id. */ + int INTEGER_LITERAL = 127; + /** RegularExpression Id. */ + int NUMBER_LITERAL = 128; + /** RegularExpression Id. */ + int DECIMAL_LITERAL = 129; + /** RegularExpression Id. */ + int HEX_LITERAL = 130; + /** RegularExpression Id. */ + int OCTAL_LITERAL = 131; + /** RegularExpression Id. */ + int BINARY_LITERAL = 132; + /** RegularExpression Id. */ + int REAL_LITERAL = 133; + /** RegularExpression Id. */ + int STRING_LITERAL = 134; + + /** Lexical state. */ + int DEFAULT = 0; + /** Lexical state. */ + int IN_MULTI_LINE_COMMENT = 1; + /** Lexical state. */ + int IN_PROPERTY = 2; + + /** Literal token values. */ + String[] tokenImage = { + "", + "\"/*\"", + "\"*/\"", + "", + "", + "\"*)\"", + "", + "\" \"", + "\"\\t\"", + "\"\\r\"", + "\"\\n\"", + "\"\\f\"", + "", + "\"module\"", + "\"endmodule\"", + "\"primitive\"", + "\"endprimitive\"", + "\"table\"", + "\"endtable\"", + "\"begin\"", + "\"end\"", + "\"fork\"", + "\"join\"", + "\"specify\"", + "\"endspecify\"", + "\"if\"", + "\"else\"", + "\"while\"", + "\"for\"", + "\"forever\"", + "\"repeat\"", + "\"wait\"", + "", + "\"default\"", + "\"endcase\"", + "\"function\"", + "\"endfunction\"", + "\"task\"", + "\"endtask\"", + "\"generate\"", + "\"endgenerate\"", + "\"input\"", + "\"output\"", + "\"inout\"", + "\"integer\"", + "\"reg\"", + "\"wire\"", + "\"event\"", + "\"genvar\"", + "\"real\"", + "\"parameter\"", + "\"localparam\"", + "\"signed\"", + "\"property\"", + "\"endproperty\"", + "", + "\"assign\"", + "\"deassign\"", + "\"force\"", + "\"release\"", + "\"time\"", + "\"realtime\"", + "\"defparam\"", + "\"or\"", + "\"disable\"", + "\"always\"", + "\"initial\"", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\"(\"", + "\")\"", + "\"{\"", + "\"}\"", + "\"[\"", + "\"]\"", + "\";\"", + "\"#\"", + "\"@\"", + "\"$\"", + "\",\"", + "\".\"", + "\"=\"", + "\">\"", + "\"<\"", + "\"!\"", + "\"~\"", + "\"?\"", + "\":\"", + "\"+:\"", + "\"-:\"", + "\"==\"", + "\"<=\"", + "\">=\"", + "\"!=\"", + "\"||\"", + "\"&&\"", + "\"+\"", + "\"-\"", + "\"*\"", + "\"/\"", + "\"&\"", + "\"|\"", + "\"^\"", + "\"%\"", + "\"<<\"", + "\">>\"", + "\"~&\"", + "\"~|\"", + "\"~^\"", + "\"^~\"", + "\"===\"", + "\"!==\"", + "\"**\"", + "\"<<<\"", + "\">>>\"", + "", + "", + "", + "\"\\\\\"", + "", + "", + "", + "", + "", + "", + "", + "", + "\"->\"", + }; + +} diff -U 3 -dHrN -- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/verilog/VerilogParserCore.java vdt/_generated/com/elphel/vdt/veditor/parser/verilog/VerilogParserCore.java --- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/verilog/VerilogParserCore.java 2017-11-28 14:28:04.242793169 -0700 +++ vdt/_generated/com/elphel/vdt/veditor/parser/verilog/VerilogParserCore.java 2017-11-28 14:28:04.194794586 -0700 @@ -1,1237 +1,5359 @@ -/* Generated By:JavaCC: Do not edit this line. VerilogParserCore.java */ -package net.sourceforge.veditor.parser; - -public abstract class VerilogParserCore implements VerilogParserCoreConstants { - protected abstract void addModule(int begin, String name); - protected abstract void endModule(int line); - protected abstract void addPort(int line, String portName); - protected abstract void addVariable(int line, String varName); - protected abstract void addParameter(int line, String name, String value); - protected abstract void addElement(int begin, int end, String type, String name); - protected abstract void addInstance(int begin, int end, String module, String inst); - protected abstract void beginStatement(); - protected abstract void endStatement(); - protected abstract void setPrefix(String fix); - protected abstract void addPrefix(String fix); - - public void parse() throws ParseException - { - modules(); - } - - final public void modules() throws ParseException { - Token name ; - Token end ; - label_1: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case MODULE: - ; - break; - default: - jj_la1[0] = jj_gen; - break label_1; - } - jj_consume_token(MODULE); - name = identifier(); - addModule( name.beginLine, name.image ); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case LPAREN: - jj_consume_token(LPAREN); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case INPUT: - case OUTPUT: - case INOUT: - case BQ: - case IDENT: - argument(); - label_2: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[1] = jj_gen; - break label_2; - } - jj_consume_token(COMMA); - argument(); - } - break; - default: - jj_la1[2] = jj_gen; - ; - } - jj_consume_token(RPAREN); - break; - default: - jj_la1[3] = jj_gen; - ; - } - jj_consume_token(EOS); - label_3: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case SPECIFY: - case FUNCTION: - case TASK: - case GENERATE: - case INPUT: - case OUTPUT: - case INOUT: - case INTEGER: - case WIRE: - case REG: - case EVENT: - case GENVAR: - case REAL: - case PARAMETER: - case SIGNED: - case STMT_HEAD: - case BLOCK_HEAD: - case BQ: - case IDENT: - ; - break; - default: - jj_la1[4] = jj_gen; - break label_3; - } - moduleBody(); - } - end = jj_consume_token(ENDMODULE); - endModule( end.beginLine ); - } - } - - final public void argument() throws ParseException { - Token ident; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case INPUT: - case OUTPUT: - case INOUT: - portHead(); - ident = identifier(); - addPort( ident.beginLine, ident.image ); - break; - case BQ: - case IDENT: - identifier(); - break; - default: - jj_la1[5] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void portHead() throws ParseException { - String mod, var; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case INPUT: - jj_consume_token(INPUT); - break; - case OUTPUT: - jj_consume_token(OUTPUT); - break; - case INOUT: - jj_consume_token(INOUT); - break; - default: - jj_la1[6] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - setPrefix(token.image); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case INTEGER: - case WIRE: - case REG: - case EVENT: - case GENVAR: - case REAL: - case SIGNED: - var = variableModifier(); - addPrefix(" " + var); - break; - default: - jj_la1[7] = jj_gen; - ; - } - bitRange(); - } - - final public void moduleBody() throws ParseException { - Token module, inst, iend ; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case INPUT: - case OUTPUT: - case INOUT: - portHead(); - beginStatement(); - port(); - endStatement(); - break; - case PARAMETER: - jj_consume_token(PARAMETER); - beginStatement(); - parameter(); - endStatement(); - break; - case INTEGER: - case WIRE: - case REG: - case EVENT: - case GENVAR: - case REAL: - case SIGNED: - variableHead(); - beginStatement(); - variable(); - endStatement(); - break; - case STMT_HEAD: - jj_consume_token(STMT_HEAD); - beginStatement(); - skipTo(EOS); - endStatement(); - break; - case BLOCK_HEAD: - jj_consume_token(BLOCK_HEAD); - beginStatement(); - statement(); - endStatement(); - break; - case SPECIFY: - jj_consume_token(SPECIFY); - beginStatement(); - skipTo(ENDSPECIFY); - endStatement(); - break; - case FUNCTION: - jj_consume_token(FUNCTION); - beginStatement(); - function(); - endStatement(); - break; - case TASK: - jj_consume_token(TASK); - beginStatement(); - task(); - endStatement(); - break; - case GENERATE: - generate(); - break; - case BQ: - case IDENT: - module = identifier(); - beginStatement(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case PARA: - jj_consume_token(PARA); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case BQ: - case IDENT: - identifier(); - break; - case LPAREN: - jj_consume_token(LPAREN); - skipParen(); - jj_consume_token(RPAREN); - break; - default: - jj_la1[8] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[9] = jj_gen; - ; - } - inst = identifier(); - jj_consume_token(LPAREN); - skipParen(); - jj_consume_token(RPAREN); - iend = jj_consume_token(EOS); - addInstance( module.beginLine, iend.endLine, module.image, inst.image ); - endStatement(); - break; - default: - jj_la1[10] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void variableHead() throws ParseException { - String mod; - mod = variableModifier(); - setPrefix(mod); - bitRange(); - } - - final public String variableModifier() throws ParseException { - String value = null; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case REAL: - jj_consume_token(REAL); - break; - case INTEGER: - jj_consume_token(INTEGER); - break; - case EVENT: - jj_consume_token(EVENT); - break; - case GENVAR: - jj_consume_token(GENVAR); - break; - case SIGNED: - jj_consume_token(SIGNED); - break; - case WIRE: - jj_consume_token(WIRE); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case SIGNED: - jj_consume_token(SIGNED); - value = "wire signed"; - break; - default: - jj_la1[11] = jj_gen; - ; - } - break; - case REG: - jj_consume_token(REG); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case SIGNED: - jj_consume_token(SIGNED); - value = "reg signed"; - break; - default: - jj_la1[12] = jj_gen; - ; - } - break; - default: - jj_la1[13] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - if (value == null) - {if (true) return token.image;} - else - {if (true) return value;} - throw new Error("Missing return statement in function"); - } - - final public void bitRange() throws ParseException { - Token msb, lsb; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case LBRACKET: - jj_consume_token(LBRACKET); - msb = skipTo(COLON); - lsb = skipTo(RBRACKET); - addPrefix("[" + msb.image + ":" + lsb.image + "]"); - break; - default: - jj_la1[14] = jj_gen; - ; - } - addPrefix(" "); - } - - final public Token identifier() throws ParseException { - Token token ; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case BQ: - jj_consume_token(BQ); - break; - default: - jj_la1[15] = jj_gen; - ; - } - token = jj_consume_token(IDENT); - {if (true) return token ;} - throw new Error("Missing return statement in function"); - } - - final public void port() throws ParseException { - Token port ; - port = identifier(); - addPort( port.beginLine, port.image ); - label_4: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[16] = jj_gen; - break label_4; - } - jj_consume_token(COMMA); - port = identifier(); - addPort( port.beginLine, port.image ); - } - jj_consume_token(EOS); - } - - final public void variable() throws ParseException { - Token variable ; - variable = identifier(); - label_5: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case LBRACKET: - ; - break; - default: - jj_la1[17] = jj_gen; - break label_5; - } - jj_consume_token(LBRACKET); - skipTo(RBRACKET); - } - addVariable( variable.beginLine, variable.image ); - label_6: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[18] = jj_gen; - break label_6; - } - jj_consume_token(COMMA); - variable = identifier(); - label_7: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case LBRACKET: - ; - break; - default: - jj_la1[19] = jj_gen; - break label_7; - } - jj_consume_token(LBRACKET); - skipTo(RBRACKET); - } - addVariable( variable.beginLine, variable.image ); - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case EOS: - jj_consume_token(EOS); - break; - case EQUAL: - jj_consume_token(EQUAL); - skipTo(EOS); - break; - default: - jj_la1[20] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void parameter() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case INTEGER: - case REAL: - case LBRACKET: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case REAL: - jj_consume_token(REAL); - break; - case INTEGER: - jj_consume_token(INTEGER); - break; - case LBRACKET: - jj_consume_token(LBRACKET); - skipTo(RBRACKET); - break; - default: - jj_la1[21] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[22] = jj_gen; - ; - } - parameterAssign(); - label_8: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[23] = jj_gen; - break label_8; - } - jj_consume_token(COMMA); - parameterAssign(); - } - jj_consume_token(EOS); - } - - final public void parameterAssign() throws ParseException { - Token parameter; - Token value; - parameter = identifier(); - jj_consume_token(EQUAL); - value = skipToOr(COMMA, EOS); - addParameter(parameter.beginLine, parameter.image, value.image); - } - - final public void delay() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case AT: - jj_consume_token(AT); - break; - case PARA: - jj_consume_token(PARA); - break; - default: - jj_la1[24] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case LPAREN: - jj_consume_token(LPAREN); - skipParen(); - jj_consume_token(RPAREN); - break; - case BQ: - case IDENT: - identifier(); - break; - default: - jj_la1[25] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void statement() throws ParseException { - label_9: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case PARA: - case AT: - ; - break; - default: - jj_la1[26] = jj_gen; - break label_9; - } - delay(); - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case EOS: - jj_consume_token(EOS); - break; - case COLON: - jj_consume_token(COLON); - identifier(); - break; - case STMT_HEAD: - jj_consume_token(STMT_HEAD); - skipTo(EOS); - break; - case IF: - ifStatement(); - break; - case BEGIN: - case FORK: - block(); - break; - case DOLLAR: - jj_consume_token(DOLLAR); - skipTo(EOS); - break; - case LBRACE: - jj_consume_token(LBRACE); - skipTo(EOS); - break; - case BQ: - case IDENT: - identifier(); - skipTo(EOS); - break; - case CASE: - case CASEX: - caseStatement(); - break; - case WHILE: - whileStatement(); - break; - case FOR: - forStatement(); - break; - case FOREVER: - foreverStatement(); - break; - case REPEAT: - repeatStatement(); - break; - default: - jj_la1[27] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void block() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case BEGIN: - jj_consume_token(BEGIN); - break; - case FORK: - jj_consume_token(FORK); - break; - default: - jj_la1[28] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - label_10: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case BEGIN: - case FORK: - case IF: - case WHILE: - case FOR: - case FOREVER: - case REPEAT: - case CASE: - case CASEX: - case STMT_HEAD: - case LBRACE: - case EOS: - case PARA: - case AT: - case BQ: - case DOLLAR: - case COLON: - case IDENT: - ; - break; - default: - jj_la1[29] = jj_gen; - break label_10; - } - statement(); - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case END: - jj_consume_token(END); - break; - case JOIN: - jj_consume_token(JOIN); - break; - default: - jj_la1[30] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void function() throws ParseException { - Token name, end ; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case LBRACKET: - jj_consume_token(LBRACKET); - skipParen(); - jj_consume_token(RBRACKET); - break; - default: - jj_la1[31] = jj_gen; - ; - } - name = identifier(); - end = skipTo(ENDFUNCTION); - addElement( name.beginLine, end.endLine, "function", name.image ); - } - - final public void task() throws ParseException { - Token name, end ; - name = identifier(); - end = skipTo(ENDTASK); - addElement( name.beginLine, end.endLine, "task", name.image ); - } - - final public void generate() throws ParseException { - jj_consume_token(GENERATE); - label_11: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case SPECIFY: - case IF: - case FOR: - case FUNCTION: - case TASK: - case GENERATE: - case INPUT: - case OUTPUT: - case INOUT: - case INTEGER: - case WIRE: - case REG: - case EVENT: - case GENVAR: - case REAL: - case PARAMETER: - case SIGNED: - case STMT_HEAD: - case BLOCK_HEAD: - case BQ: - case IDENT: - ; - break; - default: - jj_la1[32] = jj_gen; - break label_11; - } - generateStatement(); - } - jj_consume_token(ENDGENERATE); - } - - final public void generateStatement() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case FOR: - generateForStatement(); - break; - case IF: - generateIfStatement(); - break; - case SPECIFY: - case FUNCTION: - case TASK: - case GENERATE: - case INPUT: - case OUTPUT: - case INOUT: - case INTEGER: - case WIRE: - case REG: - case EVENT: - case GENVAR: - case REAL: - case PARAMETER: - case SIGNED: - case STMT_HEAD: - case BLOCK_HEAD: - case BQ: - case IDENT: - moduleBody(); - break; - default: - jj_la1[33] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void ifStatement() throws ParseException { - jj_consume_token(IF); - jj_consume_token(LPAREN); - skipParen(); - jj_consume_token(RPAREN); - statement(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ELSE: - jj_consume_token(ELSE); - statement(); - break; - default: - jj_la1[34] = jj_gen; - ; - } - } - - final public void caseStatement() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case CASE: - jj_consume_token(CASE); - break; - case CASEX: - jj_consume_token(CASEX); - break; - default: - jj_la1[35] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jj_consume_token(LPAREN); - skipParen(); - jj_consume_token(RPAREN); - label_12: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case BQ: - case IDENT: - ; - break; - default: - jj_la1[36] = jj_gen; - break label_12; - } - identifier(); - label_13: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[37] = jj_gen; - break label_13; - } - jj_consume_token(COMMA); - identifier(); - } - jj_consume_token(COLON); - statement(); - } - jj_consume_token(ENDCASE); - } - - final public void whileStatement() throws ParseException { - jj_consume_token(WHILE); - jj_consume_token(LPAREN); - skipParen(); - jj_consume_token(RPAREN); - statement(); - } - - final public void forStatement() throws ParseException { - jj_consume_token(FOR); - jj_consume_token(LPAREN); - skipParen(); - jj_consume_token(RPAREN); - statement(); - } - - final public void foreverStatement() throws ParseException { - jj_consume_token(FOREVER); - statement(); - } - - final public void repeatStatement() throws ParseException { - jj_consume_token(REPEAT); - jj_consume_token(LPAREN); - skipParen(); - jj_consume_token(RPAREN); - statement(); - } - - final public void generateForStatement() throws ParseException { - jj_consume_token(FOR); - jj_consume_token(LPAREN); - skipParen(); - jj_consume_token(RPAREN); - jj_consume_token(BEGIN); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COLON: - jj_consume_token(COLON); - identifier(); - break; - default: - jj_la1[38] = jj_gen; - ; - } - label_14: - while (true) { - generateStatement(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case SPECIFY: - case IF: - case FOR: - case FUNCTION: - case TASK: - case GENERATE: - case INPUT: - case OUTPUT: - case INOUT: - case INTEGER: - case WIRE: - case REG: - case EVENT: - case GENVAR: - case REAL: - case PARAMETER: - case SIGNED: - case STMT_HEAD: - case BLOCK_HEAD: - case BQ: - case IDENT: - ; - break; - default: - jj_la1[39] = jj_gen; - break label_14; - } - } - jj_consume_token(END); - } - - final public void generateIfStatement() throws ParseException { - jj_consume_token(IF); - jj_consume_token(LPAREN); - skipParen(); - jj_consume_token(RPAREN); - jj_consume_token(BEGIN); - label_15: - while (true) { - generateStatement(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case SPECIFY: - case IF: - case FOR: - case FUNCTION: - case TASK: - case GENERATE: - case INPUT: - case OUTPUT: - case INOUT: - case INTEGER: - case WIRE: - case REG: - case EVENT: - case GENVAR: - case REAL: - case PARAMETER: - case SIGNED: - case STMT_HEAD: - case BLOCK_HEAD: - case BQ: - case IDENT: - ; - break; - default: - jj_la1[40] = jj_gen; - break label_15; - } - } - jj_consume_token(END); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ELSE: - jj_consume_token(ELSE); - jj_consume_token(BEGIN); - label_16: - while (true) { - generateStatement(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case SPECIFY: - case IF: - case FOR: - case FUNCTION: - case TASK: - case GENERATE: - case INPUT: - case OUTPUT: - case INOUT: - case INTEGER: - case WIRE: - case REG: - case EVENT: - case GENVAR: - case REAL: - case PARAMETER: - case SIGNED: - case STMT_HEAD: - case BLOCK_HEAD: - case BQ: - case IDENT: - ; - break; - default: - jj_la1[41] = jj_gen; - break label_16; - } - } - jj_consume_token(END); - break; - default: - jj_la1[42] = jj_gen; - ; - } - } - - void unexpectedEof(Token token) throws ParseException { - ParseException ex = new ParseException("unexpected EOF"); - ex.currentToken = token; - throw ex; - } - - Token skipTo(int skip) throws ParseException { - Token current = token; - Token token ; - StringBuffer image = new StringBuffer(); - - for(;;) - { - token = getToken(1); - if (token.kind == EOF) - unexpectedEof(current); - if (token.kind == skip) - { - getNextToken(); - break ; - } - - image.append(token.image); - getNextToken(); - } - token.image = image.toString(); - return token ; - } - - Token skipToOr(int skip1, int skip2) throws ParseException { - Token current = token; - Token token ; - StringBuffer image = new StringBuffer(); - - for(;;) - { - token = getToken(1); - if (token.kind == EOF) - unexpectedEof(current); - if (token.kind == skip1 || token.kind == skip2) - { - // preserve skip token - break ; - } - - image.append(token.image); - getNextToken(); - } - token.image = image.toString(); - return token ; - } - - void skipParen() throws ParseException { - Token current = token; - Token token; - int nesting = 1 ; - for(;;) - { - token = getToken(1); - if (token.kind == EOF) - unexpectedEof(current); - if (token.kind == LPAREN || token.kind == LBRACKET) - nesting++; - if (token.kind == RPAREN || token.kind == RBRACKET) - { - nesting--; - if ( nesting == 0 ) - break; - } - getNextToken(); - } - } - - void skipToEndcase() throws ParseException { - Token current = token; - Token token ; - int nesting = 1 ; - for(;;) - { - token = getToken( 1 ); - if ( token.kind == EOF ) - unexpectedEof(current); - if ( token.kind == CASE ) - nesting++; - if ( token.kind == ENDCASE ) - { - nesting--; - if ( nesting == 0 ) - { - getNextToken(); - break; - } - } - getNextToken(); - } - } - - public VerilogParserCoreTokenManager token_source; - JavaCharStream jj_input_stream; - public Token token, jj_nt; - private int jj_ntk; - private int jj_gen; - final private int[] jj_la1 = new int[43]; - static private int[] jj_la1_0; - static private int[] jj_la1_1; - static private int[] jj_la1_2; - static { - jj_la1_0(); - jj_la1_1(); - jj_la1_2(); - } - private static void jj_la1_0() { - jj_la1_0 = new int[] {0x4000,0x0,0x0,0x0,0x80100000,0x0,0x0,0x0,0x0,0x0,0x80100000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f450000,0x50000,0x3f450000,0xa0000,0x0,0x82500000,0x82500000,0x800000,0x30000000,0x0,0x0,0x0,0x82500000,0x82500000,0x82500000,0x800000,}; - } - private static void jj_la1_1() { - jj_la1_1 = new int[] {0x0,0x20000000,0x80000e0,0x40000,0x803ffea,0x80000e0,0xe0,0xbf00,0x8040000,0x2000000,0x803ffea,0x8000,0x8000,0xbf00,0x400000,0x8000000,0x20000000,0x400000,0x20000000,0x400000,0x81000000,0x402100,0x402100,0x20000000,0x6000000,0x8040000,0x6000000,0x59110000,0x0,0x5f110000,0x0,0x400000,0x803ffea,0x803ffea,0x0,0x0,0x8000000,0x20000000,0x40000000,0x803ffea,0x803ffea,0x803ffea,0x0,}; - } - private static void jj_la1_2() { - jj_la1_2 = new int[] {0x0,0x0,0x1,0x0,0x1,0x1,0x0,0x0,0x1,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0x0,0x1,0x0,0x0,0x1,0x1,0x0,0x0,0x1,0x0,0x0,0x1,0x1,0x1,0x0,}; - } - - public VerilogParserCore(java.io.InputStream stream) { - this(stream, null); - } - public VerilogParserCore(java.io.InputStream stream, String encoding) { - try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } - token_source = new VerilogParserCoreTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 43; i++) jj_la1[i] = -1; - } - - public void ReInit(java.io.InputStream stream) { - ReInit(stream, null); - } - public void ReInit(java.io.InputStream stream, String encoding) { - try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 43; i++) jj_la1[i] = -1; - } - - public VerilogParserCore(java.io.Reader stream) { - jj_input_stream = new JavaCharStream(stream, 1, 1); - token_source = new VerilogParserCoreTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 43; i++) jj_la1[i] = -1; - } - - public void ReInit(java.io.Reader stream) { - jj_input_stream.ReInit(stream, 1, 1); - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 43; i++) jj_la1[i] = -1; - } - - public VerilogParserCore(VerilogParserCoreTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 43; i++) jj_la1[i] = -1; - } - - public void ReInit(VerilogParserCoreTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 43; i++) jj_la1[i] = -1; - } - - final private Token jj_consume_token(int kind) throws ParseException { - Token oldToken; - if ((oldToken = token).next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - if (token.kind == kind) { - jj_gen++; - return token; - } - token = oldToken; - jj_kind = kind; - throw generateParseException(); - } - - final public Token getNextToken() { - if (token.next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - jj_gen++; - return token; - } - - final public Token getToken(int index) { - Token t = token; - for (int i = 0; i < index; i++) { - if (t.next != null) t = t.next; - else t = t.next = token_source.getNextToken(); - } - return t; - } - - final private int jj_ntk() { - if ((jj_nt=token.next) == null) - return (jj_ntk = (token.next=token_source.getNextToken()).kind); - else - return (jj_ntk = jj_nt.kind); - } - - private java.util.Vector jj_expentries = new java.util.Vector(); - private int[] jj_expentry; - private int jj_kind = -1; - - public ParseException generateParseException() { - jj_expentries.removeAllElements(); - boolean[] la1tokens = new boolean[67]; - for (int i = 0; i < 67; i++) { - la1tokens[i] = false; - } - if (jj_kind >= 0) { - la1tokens[jj_kind] = true; - jj_kind = -1; - } - for (int i = 0; i < 43; i++) { - if (jj_la1[i] == jj_gen) { - for (int j = 0; j < 32; j++) { - if ((jj_la1_0[i] & (1<0 ) && ( pos < ( range.length() - 1 ))) { // contains dependencies + deps=range.split( "]" ); + range=deps[0] + "]"; + name.setEncodedDepends(deps[1]); + } + String types = type + "#" + mod + "#" + range + "#" + value.toString(); + beginOutlineElement(name, types); + parameterAssignment(name.image, value, value.beginLine); + endOutlineElement(name, types); + } + + final public void argument() throws ParseException {Token direction; + Identifier name; + String modifier=""; + String range; + Token asn; + Expression exp; + int pos; + String [] deps; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case INPUT: + case OUTPUT: + case INOUT:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case INPUT:{ + direction = jj_consume_token(INPUT); + break; + } + case OUTPUT:{ + direction = jj_consume_token(OUTPUT); + break; + } + case INOUT:{ + direction = jj_consume_token(INOUT); + break; + } + default: + jj_la1[17] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + modifier = variableModifier(); + // range = bitRange() + range = bitRangeWithDepend(); + name = identifier(); +pos=range.indexOf("]"); + if (( pos >0 ) && ( pos < ( range.length() - 1 ))) { // contains dependencies + deps=range.split( "]" ); + range=deps[0] + "]"; +// name.addEncodedDeps(deps[1]); + name.setEncodedDepends(deps[1]); + } + String types = "port#" + direction.image + "#" + modifier + "#" + range; + beginOutlineElement(name, types); + endOutlineElement(name, types); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case AGN:{ + asn = jj_consume_token(AGN); + exp = expression(); +variableAssignment(name); + evaluateAssignment(asn, name.getWidth(), exp); + break; + } + default: + jj_la1[18] = jj_gen; + ; + } + break; + } + case IDENT:{ + identifier(); + break; + } + default: + jj_la1[19] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + + final public void functionArgument() throws ParseException {Token direction; + Identifier name; + String modifier=""; + String range; + Token asn; + Expression exp; + int pos; + String [] deps; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case INPUT:{ + // C++ style argument + direction = jj_consume_token(INPUT); + modifier = variableModifier(); + // range = bitRange() + range = bitRangeWithDepend(); + name = identifier(); +pos=range.indexOf("]"); + if (( pos >0 ) && ( pos < ( range.length() - 1 ))) { // contains dependencies + deps=range.split( "]" ); + range=deps[0] + "]"; +// name.addEncodedDeps(deps[1]); + name.setEncodedDepends(deps[1]); + } + String types = "port#" + direction.image + "#" + modifier + "#" + range; + beginOutlineElement(name, types); + endOutlineElement(name, types); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case AGN:{ + asn = jj_consume_token(AGN); + exp = expression(); +variableAssignment(name); + evaluateAssignment(asn, name.getWidth(), exp); + break; + } + default: + jj_la1[20] = jj_gen; + ; + } + break; + } + case IDENT:{ + identifier(); + break; + } + default: + jj_la1[21] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + + final public void moduleItem() throws ParseException { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case FUNCTION: + case TASK: + case INTEGER: + case REG: + case WIRE: + case EVENT: + case GENVAR: + case REAL: + case PARAMETER: + case LOCALPARAM: + case ASSERT: + case ASSIGN: + case TIME: + case REALTIME: + case DEFPARAM: + case OR: + case ALWAYS: + case INITIAL: + case SUPPLY: + case NET_TYPE: + case PRIM_1IN_XOUT: + case PRIM_1OUT_XIN: + case PRIM_1OUT_1IN_1CNTL: + case PRIM_1OUT: + case PRIM_1OUT_1IN_NC_PC: + case PRIM_BI: + case EOS: + case IDENT:{ + moduleOrGenerateItem(); + break; + } + case INPUT: + case OUTPUT: + case INOUT:{ + portDecl(); + break; + } + case SPECIFY:{ + jj_consume_token(SPECIFY); +begin(STATEMENT); + skipTo(ENDSPECIFY); +end(STATEMENT); + break; + } + case GENERATE:{ + generate(); + break; + } + case PROPERTY:{ + jj_consume_token(PROPERTY); + skipTo(ENDPROPERTY); + break; + } + default: + jj_la1[22] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + + final public void moduleOrGenerateItem() throws ParseException { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case INTEGER: + case REG: + case WIRE: + case EVENT: + case GENVAR: + case REAL: + case TIME: + case REALTIME: + case SUPPLY: + case NET_TYPE:{ + variableDecl(); + break; + } + case PARAMETER: + case LOCALPARAM:{ + parameterDecl(); + break; + } + case DEFPARAM:{ + defparamDecl(); + break; + } + case TASK:{ + taskDecl(); + break; + } + case FUNCTION:{ + functionDecl(); + break; + } + case ASSIGN:{ + assign(); + break; + } + case OR: + case PRIM_1IN_XOUT: + case PRIM_1OUT_XIN: + case PRIM_1OUT_1IN_1CNTL: + case PRIM_1OUT: + case PRIM_1OUT_1IN_NC_PC: + case PRIM_BI:{ + primitiveInstance(); + break; + } + default: + jj_la1[23] = jj_gen; + if (jj_2_1(3)) { + moduleInstance(); + } else { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case ALWAYS: + case INITIAL:{ + initialAlways(); + break; + } + case ASSERT:{ + jj_consume_token(ASSERT); + skipTo(EOS); + break; + } + case IDENT:{ + identifier(); + jj_consume_token(COLON); + jj_consume_token(ASSERT); + skipTo(EOS); + break; + } + case EOS:{ + jj_consume_token(EOS); + break; + } + default: + jj_la1[24] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + } + } + +//| {begin(STATEMENT);} skipTo( EOS ) {end(STATEMENT);} + final public +void portDecl() throws ParseException {Token direction; + String modifier; + String range; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case INPUT:{ + direction = jj_consume_token(INPUT); + break; + } + case OUTPUT:{ + direction = jj_consume_token(OUTPUT); + break; + } + case INOUT:{ + direction = jj_consume_token(INOUT); + break; + } + default: + jj_la1[25] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + modifier = variableModifier(); +begin(STATEMENT); + range = bitRangeWithDepend(); + portDeclSingle(direction, modifier, range); + label_9: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[26] = jj_gen; + break label_9; + } + jj_consume_token(COMMA); + portDeclSingle(direction, modifier, range); + } + jj_consume_token(EOS); +end(STATEMENT); + } + + final public void functionPortDecl() throws ParseException {Token direction; + String modifier; + String range; + direction = jj_consume_token(INPUT); + modifier = variableModifier(); +begin(STATEMENT); + range = bitRangeWithDepend(); + portDeclSingle(direction, modifier, range); + label_10: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[27] = jj_gen; + break label_10; + } + jj_consume_token(COMMA); + portDeclSingle(direction, modifier, range); + } + jj_consume_token(EOS); +end(STATEMENT); + } + + final public String variableModifier() throws ParseException {String ret = ""; + label_11: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case INTEGER: + case REG: + case WIRE: + case REAL: + case SIGNED: + case TIME: + case REALTIME:{ + ; + break; + } + default: + jj_la1[28] = jj_gen; + break label_11; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case REAL:{ + jj_consume_token(REAL); + break; + } + case REALTIME:{ + jj_consume_token(REALTIME); + break; + } + case INTEGER:{ + jj_consume_token(INTEGER); + break; + } + case WIRE:{ + jj_consume_token(WIRE); + break; + } + case REG:{ + jj_consume_token(REG); + break; + } + case SIGNED:{ + jj_consume_token(SIGNED); + break; + } + case TIME:{ + jj_consume_token(TIME); + break; + } + default: + jj_la1[29] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +ret += token.image + " "; + } +{if ("" != null) return ret;} + throw new Error("Missing return statement in function"); + } + + final public void portDeclSingle(Token direction, String modifier, String range) throws ParseException {Identifier name; + Token asn; + Expression exp; + int pos; + String [] deps; + name = identifier(); +pos=range.indexOf("]"); + if (( pos >0 ) && ( pos < ( range.length() - 1 ))) { // contains dependencies + deps=range.split( "]" ); + range=deps[0] + "]"; +// name.addEncodedDeps(deps[1]); + name.setEncodedDepends(deps[1]); + } + String type = "port#" + direction.image + "#" + modifier + "#" + range + "#cstyle"; + beginOutlineElement(name, type); + endOutlineElement(name, type); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case AGN:{ + asn = jj_consume_token(AGN); + exp = expression(); +variableAssignment(name); + evaluateAssignment(asn, name.getWidth(), exp); + break; + } + default: + jj_la1[30] = jj_gen; + ; + } + } + +/* +void primitiveInstance(): +{ + String prim; +} +{ + ( | "or" + | + | + | + | + | + ) { prim = token.image;} + [ LOOKAHEAD(2) strength() ] [ delay3() ] + [ identifier() bitRange() ] "(" portConnect(prim) ")" + ( "," identifier() bitRange() "(" portConnect(prim) ")" )* + ";" +} + +void moduleInstanceOld(): +{ + Identifier module, inst; + Token iend ; +} +{ + module = identifier() + { begin(STATEMENT); } + + ( //module instantiation + ( [ "#" ( identifier() | number() | "(" parameterConnectOld() ")" ) ] + inst = identifier() + { + beginOutlineElement(module, inst.image, "instance#"+module.image); + } + [ "(" [ portConnect(module.image) ] ")" ] + iend = ";" + { + endOutlineElement(iend, inst.image, "instance#"+module.image); + addCollapsible(module.beginLine, iend.endLine); + } + ) + | //user defined primitive + ( "(" portConnect(module.image) ")" + iend = ";" + ) + ) + { end(STATEMENT); } +} +*/ + final public +void moduleInstance() throws ParseException {Identifier module, inst; + Token iend ; + module = identifier(); +begin(STATEMENT); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case PARA: + case IDENT:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case PARA:{ + jj_consume_token(PARA); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case IDENT: + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + singleParameterConnect(module.image); + break; + } + case LPAREN:{ + jj_consume_token(LPAREN); + parameterConnect(module.image); + jj_consume_token(RPAREN); + break; + } + default: + jj_la1[31] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[32] = jj_gen; + ; + } + inst = identifier(); +beginOutlineElement(module, inst.image, "instance#"+module.image); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN:{ + jj_consume_token(LPAREN); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN: + case LBRACE: + case DOT: + case BANG: + case TILDE: + case PLUS: + case MINUS: + case BIT_AND: + case BIT_OR: + case XOR: + case NEG_AND: + case NEG_OR: + case NEG_XOR: + case XOR_NEG: + case IDENT: + case SYSTEM_IDENT: + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + portConnect(module.image, PORT_TYPE.INSTANCE); + break; + } + default: + jj_la1[33] = jj_gen; + ; + } + jj_consume_token(RPAREN); + break; + } + default: + jj_la1[34] = jj_gen; + ; + } + iend = jj_consume_token(EOS); +endOutlineElement(iend, inst.image, "instance#"+module.image); + addCollapsible(module.beginLine, iend.endLine); + break; + } + case LPAREN:{ + jj_consume_token(LPAREN); +beginOutlineElement(module, module.image+":"+module.beginLine+":"+module.beginColumn, "instance#"+module.image); + portConnect(module.image, PORT_TYPE.PRIMITIVE); + jj_consume_token(RPAREN); + iend = jj_consume_token(EOS); +endOutlineElement(iend, module.image+":"+module.beginLine+":"+module.beginColumn, "instance#"+module.image); + addCollapsible(module.beginLine, iend.endLine); + break; + } + default: + jj_la1[35] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +end(STATEMENT); + } + +// just identifier or number ( module_name # ident module_instance_name (...); + final public void singleParameterConnect(String module) throws ParseException {Expression arg = null; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + arg = number(); + break; + } + case IDENT:{ + arg = identifierExpression(); + break; + } + default: + jj_la1[36] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +positionalParameterConnection(arg, module, 0); // single parameter + + } + + final public Expression identifierExpression() throws ParseException {Expression ret; + Identifier ident; + ident = identifier(); +{if ("" != null) return variableReference(ident);} + throw new Error("Missing return statement in function"); + } + + final public void parameterConnectOld() throws ParseException {Expression arg = null; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case DOT:{ + jj_consume_token(DOT); + identifier(); + jj_consume_token(LPAREN); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN: + case LBRACE: + case BANG: + case TILDE: + case PLUS: + case MINUS: + case BIT_AND: + case BIT_OR: + case XOR: + case NEG_AND: + case NEG_OR: + case NEG_XOR: + case XOR_NEG: + case IDENT: + case SYSTEM_IDENT: + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + constantExpression(); + break; + } + default: + jj_la1[37] = jj_gen; + ; + } + jj_consume_token(RPAREN); + label_12: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[38] = jj_gen; + break label_12; + } + jj_consume_token(COMMA); + jj_consume_token(DOT); + identifier(); + jj_consume_token(LPAREN); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN: + case LBRACE: + case BANG: + case TILDE: + case PLUS: + case MINUS: + case BIT_AND: + case BIT_OR: + case XOR: + case NEG_AND: + case NEG_OR: + case NEG_XOR: + case XOR_NEG: + case IDENT: + case SYSTEM_IDENT: + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + constantExpression(); + break; + } + default: + jj_la1[39] = jj_gen; + ; + } + jj_consume_token(RPAREN); + } + break; + } + case LPAREN: + case LBRACE: + case BANG: + case TILDE: + case PLUS: + case MINUS: + case BIT_AND: + case BIT_OR: + case XOR: + case NEG_AND: + case NEG_OR: + case NEG_XOR: + case XOR_NEG: + case IDENT: + case SYSTEM_IDENT: + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + constantExpression(); + label_13: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[40] = jj_gen; + break label_13; + } + jj_consume_token(COMMA); + constantExpression(); + } + break; + } + default: + jj_la1[41] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + + final public void parameterConnect(String module) throws ParseException {int count = 0; + count = parameterConnectSingle(module, count); + label_14: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[42] = jj_gen; + break label_14; + } + jj_consume_token(COMMA); + count = parameterConnectSingle(module, count); + } + } + + final public int parameterConnectSingle(String module, int count) throws ParseException {Identifier parameter; + Expression arg = null; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case DOT:{ + jj_consume_token(DOT); + parameter = identifier(); + jj_consume_token(LPAREN); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN: + case LBRACE: + case BANG: + case TILDE: + case PLUS: + case MINUS: + case BIT_AND: + case BIT_OR: + case XOR: + case NEG_AND: + case NEG_OR: + case NEG_XOR: + case XOR_NEG: + case IDENT: + case SYSTEM_IDENT: + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + arg = constantExpression(); + break; + } + default: + jj_la1[43] = jj_gen; + ; + } + jj_consume_token(RPAREN); +namedParameterConnection(arg, module, parameter); + {if ("" != null) return count + 1;} + break; + } + case LPAREN: + case LBRACE: + case BANG: + case TILDE: + case PLUS: + case MINUS: + case BIT_AND: + case BIT_OR: + case XOR: + case NEG_AND: + case NEG_OR: + case NEG_XOR: + case XOR_NEG: + case IDENT: + case SYSTEM_IDENT: + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + arg = constantExpression(); +positionalParameterConnection(arg, module, count); + {if ("" != null) return count + 1;} + break; + } + default: + jj_la1[44] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + throw new Error("Missing return statement in function"); + } + + final public void portConnect(String module, PORT_TYPE port_type) throws ParseException {int count = 0; + count = portConnectSingle(module, count, port_type); + label_15: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[45] = jj_gen; + break label_15; + } + jj_consume_token(COMMA); + count = portConnectSingle(module, count, port_type); + } + } + + final public int portConnectSingle(String module, int count, PORT_TYPE port_type) throws ParseException {Identifier port; + Expression arg = null; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case DOT:{ + jj_consume_token(DOT); + port = identifier(); + jj_consume_token(LPAREN); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN: + case LBRACE: + case BANG: + case TILDE: + case PLUS: + case MINUS: + case BIT_AND: + case BIT_OR: + case XOR: + case NEG_AND: + case NEG_OR: + case NEG_XOR: + case XOR_NEG: + case IDENT: + case SYSTEM_IDENT: + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + arg = expression(); + break; + } + default: + jj_la1[46] = jj_gen; + ; + } + jj_consume_token(RPAREN); +namedPortConnection(arg, module, port, port_type); //PORT_TYPE.INSTANCE); //TODO: make variable + {if ("" != null) return count + 1;} + break; + } + case LPAREN: + case LBRACE: + case BANG: + case TILDE: + case PLUS: + case MINUS: + case BIT_AND: + case BIT_OR: + case XOR: + case NEG_AND: + case NEG_OR: + case NEG_XOR: + case XOR_NEG: + case IDENT: + case SYSTEM_IDENT: + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + arg = expression(); +positionalPortConnection(arg, module, count, port_type); //count, PORT_TYPE.INSTANCE); //TODO: make variable + {if ("" != null) return count + 1;} + break; + } + default: + jj_la1[47] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + throw new Error("Missing return statement in function"); + } + +// Handling primitive in/outs + final public void primitiveInstance() throws ParseException { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case PRIM_1OUT_XIN: + case PRIM_1OUT_1IN_1CNTL: + case PRIM_1OUT: + case PRIM_1OUT_1IN_NC_PC:{ + primitiveInstance_1out_xin(); + break; + } + case OR: + case PRIM_1IN_XOUT:{ + primitiveInstance_xout_1in(); + break; + } + case PRIM_BI:{ + primitiveInstance_2inout_1in(); + break; + } + default: + jj_la1[48] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + + final public void primitiveInstance_1out_xin() throws ParseException { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case PRIM_1OUT_XIN:{ + jj_consume_token(PRIM_1OUT_XIN); + break; + } + case PRIM_1OUT_1IN_1CNTL:{ + jj_consume_token(PRIM_1OUT_1IN_1CNTL); + break; + } + case PRIM_1OUT:{ + jj_consume_token(PRIM_1OUT); + break; + } + case PRIM_1OUT_1IN_NC_PC:{ + jj_consume_token(PRIM_1OUT_1IN_NC_PC); + break; + } + default: + jj_la1[49] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + if (jj_2_2(2)) { + strength(); + } else { + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case PARA:{ + delay3(); + break; + } + default: + jj_la1[50] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case IDENT:{ + identifier(); + bitRange(); + break; + } + default: + jj_la1[51] = jj_gen; + ; + } + jj_consume_token(LPAREN); + portConnectOut(); + label_16: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[52] = jj_gen; + break label_16; + } + jj_consume_token(COMMA); + portConnectIn(); + } + jj_consume_token(RPAREN); + label_17: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[53] = jj_gen; + break label_17; + } + jj_consume_token(COMMA); + identifier(); + bitRange(); + jj_consume_token(LPAREN); + portConnectOut(); + label_18: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[54] = jj_gen; + break label_18; + } + jj_consume_token(COMMA); + portConnectIn(); + } + jj_consume_token(RPAREN); + } + jj_consume_token(EOS); + } + + final public void primitiveInstance_xout_1in() throws ParseException { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case PRIM_1IN_XOUT:{ + jj_consume_token(PRIM_1IN_XOUT); + break; + } + case OR:{ + jj_consume_token(OR); + break; + } + default: + jj_la1[55] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + if (jj_2_3(2)) { + strength(); + } else { + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case PARA:{ + delay3(); + break; + } + default: + jj_la1[56] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case IDENT:{ + identifier(); + bitRange(); + break; + } + default: + jj_la1[57] = jj_gen; + ; + } + jj_consume_token(LPAREN); + portConnectOut(); + jj_consume_token(COMMA); + label_19: + while (true) { + if (jj_2_4(2)) { + ; + } else { + break label_19; + } + portConnectOut(); + jj_consume_token(COMMA); + } + portConnectIn(); + jj_consume_token(RPAREN); + label_20: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[58] = jj_gen; + break label_20; + } + jj_consume_token(COMMA); + identifier(); + bitRange(); + jj_consume_token(LPAREN); + portConnectOut(); + jj_consume_token(COMMA); + label_21: + while (true) { + if (jj_2_5(2)) { + ; + } else { + break label_21; + } + portConnectOut(); + jj_consume_token(COMMA); + } + portConnectIn(); + jj_consume_token(RPAREN); + } + jj_consume_token(EOS); + } + + final public void primitiveInstance_2inout_1in() throws ParseException { + jj_consume_token(PRIM_BI); + if (jj_2_6(2)) { + strength(); + } else { + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case PARA:{ + delay3(); + break; + } + default: + jj_la1[59] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case IDENT:{ + identifier(); + bitRange(); + break; + } + default: + jj_la1[60] = jj_gen; + ; + } + jj_consume_token(LPAREN); + portConnectInOut(); + jj_consume_token(COMMA); + portConnectInOut(); + jj_consume_token(COMMA); + portConnectIn(); + jj_consume_token(RPAREN); + label_22: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[61] = jj_gen; + break label_22; + } + jj_consume_token(COMMA); + identifier(); + bitRange(); + jj_consume_token(LPAREN); + portConnectInOut(); + jj_consume_token(COMMA); + portConnectInOut(); + jj_consume_token(COMMA); + portConnectIn(); + jj_consume_token(RPAREN); + } + jj_consume_token(EOS); + } + + final public void portConnectIn() throws ParseException {Expression arg = null; + arg = expression(); +primitivePortConnection(arg, true, false, PORT_TYPE.PRIMITIVE, arg.beginLine); //TODO: make variable to use for system tasks/func? + + } + + final public void portConnectOut() throws ParseException {Expression arg = null; + arg = expression(); +primitivePortConnection(arg, false, true, PORT_TYPE.PRIMITIVE, arg.beginLine); //TODO: make variable to use for system tasks/func? + + } + + final public void portConnectInOut() throws ParseException {Expression arg = null; + arg = expression(); +primitivePortConnection(arg, false, true, PORT_TYPE.PRIMITIVE, arg.beginLine); //TODO: make variable to use for system tasks/func? + + } + + final public void assign() throws ParseException {int width; + Token asn; + Expression exp; + jj_consume_token(ASSIGN); +begin(ASSIGN_STMT); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN:{ + strength(); + break; + } + default: + jj_la1[62] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case PARA:{ + delay3(); + break; + } + default: + jj_la1[63] = jj_gen; + ; + } + width = lvalue(); + asn = jj_consume_token(AGN); + exp = expression(); +evaluateAssignment(asn, width, exp); + label_23: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[64] = jj_gen; + break label_23; + } + jj_consume_token(COMMA); + width = lvalue(); + asn = jj_consume_token(AGN); + exp = expression(); +evaluateAssignment(asn, width, exp); + } + jj_consume_token(EOS); +end(ASSIGN_STMT); + } + + final public void variableDecl() throws ParseException {Token variable; + String type; + String range; + type = variableType(); +begin(STATEMENT); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN:{ + strength(); + break; + } + default: + jj_la1[65] = jj_gen; + ; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case SIGNED:{ + jj_consume_token(SIGNED); +type += " signed"; + break; + } + default: + jj_la1[66] = jj_gen; + ; + } + range = bitRange(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case PARA:{ + delay3(); + break; + } + default: + jj_la1[67] = jj_gen; + ; + } + variableDeclSingle(type, range); + label_24: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[68] = jj_gen; + break label_24; + } + jj_consume_token(COMMA); + variableDeclSingle(type, range); + } + jj_consume_token(EOS); +end(STATEMENT); + } + + final public String variableType() throws ParseException {String type; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case WIRE: + case SUPPLY: + case NET_TYPE:{ + type = netType(); +{if ("" != null) return type;} + break; + } + case INTEGER: + case REG: + case EVENT: + case GENVAR: + case REAL: + case TIME: + case REALTIME:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case REG:{ + jj_consume_token(REG); + break; + } + case REAL:{ + jj_consume_token(REAL); + break; + } + case INTEGER:{ + jj_consume_token(INTEGER); + break; + } + case EVENT:{ + jj_consume_token(EVENT); + break; + } + case GENVAR:{ + jj_consume_token(GENVAR); + break; + } + case TIME:{ + jj_consume_token(TIME); + break; + } + case REALTIME:{ + jj_consume_token(REALTIME); + break; + } + default: + jj_la1[69] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +{if ("" != null) return token.image;} + break; + } + default: + jj_la1[70] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + throw new Error("Missing return statement in function"); + } + + final public void variableDeclSingle(String mod, String range) throws ParseException {Identifier variable; + Token asn; + Expression exp; + int dimension = 0; + variable = identifier(); + label_25: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LBRACKET:{ + ; + break; + } + default: + jj_la1[71] = jj_gen; + break label_25; + } + jj_consume_token(LBRACKET); + constantExpression(); + jj_consume_token(COLON); + constantExpression(); + jj_consume_token(RBRACKET); +dimension++; + } +String type = "variable#" + mod + "#" + range + "#" + dimension; + beginOutlineElement(variable, type); + endOutlineElement(variable, type); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case AGN:{ + asn = jj_consume_token(AGN); + exp = expression(); +variableAssignment(variable); + evaluateAssignment(asn, variable.getWidth(), exp); + break; + } + default: + jj_la1[72] = jj_gen; + ; + } + } + + final public void delay3() throws ParseException { + jj_consume_token(PARA); + if (jj_2_7(3)) { + delayValue(); + } else { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN:{ + jj_consume_token(LPAREN); + minTypMaxExpresstion(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + jj_consume_token(COMMA); + minTypMaxExpresstion(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + jj_consume_token(COMMA); + minTypMaxExpresstion(); + break; + } + default: + jj_la1[73] = jj_gen; + ; + } + break; + } + default: + jj_la1[74] = jj_gen; + ; + } + jj_consume_token(RPAREN); + break; + } + default: + jj_la1[75] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + } + + final public void parameterDecl() throws ParseException {String type; + String mod, range; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case PARAMETER:{ + jj_consume_token(PARAMETER); +type = "parameter"; + break; + } + case LOCALPARAM:{ + jj_consume_token(LOCALPARAM); +type = "localparam"; + break; + } + default: + jj_la1[76] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + mod = parameterModifier(); + // range = bitRange() + range = bitRangeWithDepend(); + parameterAssign(type, mod, range); + label_26: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[77] = jj_gen; + break label_26; + } + jj_consume_token(COMMA); + parameterAssign(type, mod, range); + } + jj_consume_token(EOS); + } + + final public void defparamDecl() throws ParseException {String type; + String mod, range; + jj_consume_token(DEFPARAM); +type = "defparam"; + mod = parameterModifier(); + // range = bitRange() + range = bitRangeWithDepend(); + defparamAssign(type, mod, range); + label_27: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[78] = jj_gen; + break label_27; + } + jj_consume_token(COMMA); + parameterAssign(type, mod, range); + } + jj_consume_token(EOS); + } + + final public void initialAlways() throws ParseException {Token start; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case INITIAL:{ + start = jj_consume_token(INITIAL); + break; + } + case ALWAYS:{ + start = jj_consume_token(ALWAYS); + break; + } + default: + jj_la1[79] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +if (start.image.equals("initial")) + begin(INITIAL_BLOCK); + else + begin(ALWAYS_BLOCK); + statement(); +if (start.image.equals("initial")) + end(INITIAL_BLOCK); + else + end(ALWAYS_BLOCK); + addCollapsible(start.beginLine,token.endLine); + } + + final public void statement() throws ParseException {Token end; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LBRACE: + case IDENT: + case SYSTEM_IDENT:{ + assignOrTaskEnable(); + break; + } + case ASSIGN: + case DEASSIGN: + case FORCE: + case RELEASE:{ + proceduralContinuousAssignment(); + break; + } + case PARA: + case AT:{ + proceduralTimingControlStatement(); + break; + } + case IF:{ + ifStatement(); + break; + } + case CASE:{ + caseStatement(); + break; + } + case WHILE:{ + whileStatement(); + break; + } + case FOR:{ + forStatement(); + break; + } + case FOREVER:{ + foreverStatement(); + break; + } + case REPEAT:{ + repeatStatement(); + break; + } + case WAIT:{ + waitStatement(); + break; + } + case DISABLE:{ + jj_consume_token(DISABLE); + identifier(); + jj_consume_token(EOS); + break; + } + case 135:{ + jj_consume_token(135); + identifier(); + jj_consume_token(EOS); + break; + } + case BEGIN: + case FORK:{ + block(); + break; + } + case EOS:{ + jj_consume_token(EOS); + break; + } + default: + jj_la1[80] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + + final public void assignOrTaskEnable() throws ParseException {Identifier ident; + Token asn; + Expression exp; + int width; + Token iend; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case IDENT:{ + ident = complexIdentifier(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case AGN: + case LE:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case AGN:{ + asn = jj_consume_token(AGN); + break; + } + case LE:{ + asn = jj_consume_token(LE); + break; + } + default: + jj_la1[81] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case PARA: + case AT:{ + delayOrEventControl(); + break; + } + default: + jj_la1[82] = jj_gen; + ; + } + exp = expression(); + jj_consume_token(EOS); +variableAssignment(ident); + evaluateAssignment(asn, ident.getWidth(), exp); + break; + } + case LPAREN: + case EOS:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN:{ + jj_consume_token(LPAREN); +beginOutlineElement(ident, ident.image+":"+ident.beginLine+":"+ident.beginColumn, "taskenable#"+ident.image); + portConnect(ident.image, PORT_TYPE.TASK); + jj_consume_token(RPAREN); + iend = jj_consume_token(EOS); + break; + } + case EOS:{ + iend = jj_consume_token(EOS); +beginOutlineElement(ident, ident.image+":"+ident.beginLine+":"+ident.beginColumn, "taskenable#"+ident.image); + break; + } + default: + jj_la1[83] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +endOutlineElement(iend, ident.image+":"+ident.beginLine+":"+ident.beginColumn, "taskenable#"+ident.image); + addCollapsible(ident.beginLine, iend.endLine); + taskReference(ident); + break; + } + default: + jj_la1[84] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + case LBRACE:{ + width = lvalueConcatenation(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case AGN:{ + asn = jj_consume_token(AGN); + break; + } + case LE:{ + asn = jj_consume_token(LE); + break; + } + default: + jj_la1[85] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case PARA: + case AT:{ + delayOrEventControl(); + break; + } + default: + jj_la1[86] = jj_gen; + ; + } + exp = expression(); + jj_consume_token(EOS); +evaluateAssignment(asn, width, exp); + break; + } + case SYSTEM_IDENT:{ + jj_consume_token(SYSTEM_IDENT); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN:{ + jj_consume_token(LPAREN); + expression(); + label_28: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[87] = jj_gen; + break label_28; + } + jj_consume_token(COMMA); + expression(); + } + jj_consume_token(RPAREN); + break; + } + default: + jj_la1[88] = jj_gen; + ; + } + jj_consume_token(EOS); + break; + } + default: + jj_la1[89] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + + final public void delayOrEventControl() throws ParseException { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case PARA:{ + delayContol(); + break; + } + case AT:{ + eventContol(); + break; + } + default: + jj_la1[90] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + + final public void delayContol() throws ParseException { + jj_consume_token(PARA); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case IDENT: + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + delayValue(); + break; + } + case LPAREN:{ + jj_consume_token(LPAREN); + minTypMaxExpresstion(); + jj_consume_token(RPAREN); + break; + } + default: + jj_la1[91] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + + final public void delayValue() throws ParseException { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + number(); + break; + } + case IDENT:{ + identifierUsed(); + break; + } + default: + jj_la1[92] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + + final public void identifierUsed() throws ParseException {Identifier ident; + ident = identifier(); +setIdentifierUsed(ident); + } + + final public void eventContol() throws ParseException { + jj_consume_token(AT); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case IDENT:{ + identifier(); + break; + } + case STAR:{ + jj_consume_token(STAR); + break; + } + case LPAREN:{ + jj_consume_token(LPAREN); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case EDGE: + case LPAREN: + case LBRACE: + case BANG: + case TILDE: + case PLUS: + case MINUS: + case BIT_AND: + case BIT_OR: + case XOR: + case NEG_AND: + case NEG_OR: + case NEG_XOR: + case XOR_NEG: + case IDENT: + case SYSTEM_IDENT: + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + eventExpression(); + break; + } + case STAR:{ + jj_consume_token(STAR); + break; + } + default: + jj_la1[93] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + jj_consume_token(RPAREN); + break; + } + default: + jj_la1[94] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + + final public void eventExpression() throws ParseException { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN: + case LBRACE: + case BANG: + case TILDE: + case PLUS: + case MINUS: + case BIT_AND: + case BIT_OR: + case XOR: + case NEG_AND: + case NEG_OR: + case NEG_XOR: + case XOR_NEG: + case IDENT: + case SYSTEM_IDENT: + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + expression(); + break; + } + case EDGE:{ + jj_consume_token(EDGE); + expression(); + break; + } + default: + jj_la1[95] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + label_29: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case OR: + case COMMA:{ + ; + break; + } + default: + jj_la1[96] = jj_gen; + break label_29; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + jj_consume_token(COMMA); + break; + } + case OR:{ + jj_consume_token(OR); + break; + } + default: + jj_la1[97] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN: + case LBRACE: + case BANG: + case TILDE: + case PLUS: + case MINUS: + case BIT_AND: + case BIT_OR: + case XOR: + case NEG_AND: + case NEG_OR: + case NEG_XOR: + case XOR_NEG: + case IDENT: + case SYSTEM_IDENT: + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + expression(); + break; + } + case EDGE:{ + jj_consume_token(EDGE); + expression(); + break; + } + default: + jj_la1[98] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + } + + final public void proceduralContinuousAssignment() throws ParseException {int width; + Token asn; + Expression exp; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case ASSIGN:{ + jj_consume_token(ASSIGN); + width = lvalue(); + asn = jj_consume_token(AGN); + exp = expression(); + jj_consume_token(EOS); +evaluateAssignment(asn, width, exp); + break; + } + case DEASSIGN:{ + jj_consume_token(DEASSIGN); + lvalue(); + jj_consume_token(EOS); + break; + } + case FORCE:{ + jj_consume_token(FORCE); + width = lvalue(); + asn = jj_consume_token(AGN); + exp = expression(); + jj_consume_token(EOS); +evaluateAssignment(asn, width, exp); + break; + } + case RELEASE:{ + jj_consume_token(RELEASE); + lvalue(); + jj_consume_token(EOS); + break; + } + default: + jj_la1[99] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + + final public void proceduralTimingControlStatement() throws ParseException { + delayOrEventControl(); + statement(); + } + + final public void ifStatement() throws ParseException { + jj_consume_token(IF); + jj_consume_token(LPAREN); + expression(); + jj_consume_token(RPAREN); + statement(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case ELSE:{ + jj_consume_token(ELSE); + statement(); + break; + } + default: + jj_la1[100] = jj_gen; + ; + } + } + + final public void caseStatement() throws ParseException { + jj_consume_token(CASE); + jj_consume_token(LPAREN); + expression(); + jj_consume_token(RPAREN); + label_30: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN: + case LBRACE: + case BANG: + case TILDE: + case PLUS: + case MINUS: + case BIT_AND: + case BIT_OR: + case XOR: + case NEG_AND: + case NEG_OR: + case NEG_XOR: + case XOR_NEG: + case IDENT: + case SYSTEM_IDENT: + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + expression(); + label_31: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[101] = jj_gen; + break label_31; + } + jj_consume_token(COMMA); + expression(); + } + jj_consume_token(COLON); + statement(); + break; + } + case DEFAULT_LABEL:{ + jj_consume_token(DEFAULT_LABEL); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COLON:{ + jj_consume_token(COLON); + break; + } + default: + jj_la1[102] = jj_gen; + ; + } + statement(); + break; + } + default: + jj_la1[103] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case DEFAULT_LABEL: + case LPAREN: + case LBRACE: + case BANG: + case TILDE: + case PLUS: + case MINUS: + case BIT_AND: + case BIT_OR: + case XOR: + case NEG_AND: + case NEG_OR: + case NEG_XOR: + case XOR_NEG: + case IDENT: + case SYSTEM_IDENT: + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + ; + break; + } + default: + jj_la1[104] = jj_gen; + break label_30; + } + } + jj_consume_token(ENDCASE); + } + + final public void whileStatement() throws ParseException { + jj_consume_token(WHILE); + jj_consume_token(LPAREN); + expression(); + jj_consume_token(RPAREN); + statement(); + } + + final public void forStatement() throws ParseException { + jj_consume_token(FOR); + jj_consume_token(LPAREN); + lvalue(); + jj_consume_token(AGN); + expression(); + jj_consume_token(EOS); + expression(); + jj_consume_token(EOS); + lvalue(); + jj_consume_token(AGN); + expression(); + jj_consume_token(RPAREN); + statement(); + } + + final public void foreverStatement() throws ParseException { + jj_consume_token(FOREVER); + statement(); + } + + final public void repeatStatement() throws ParseException { + jj_consume_token(REPEAT); + jj_consume_token(LPAREN); + expression(); + jj_consume_token(RPAREN); + statement(); + } + + final public void waitStatement() throws ParseException { + jj_consume_token(WAIT); + jj_consume_token(LPAREN); + expression(); + jj_consume_token(RPAREN); + statement(); + } + + final public void block() throws ParseException { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case BEGIN:{ + jj_consume_token(BEGIN); + break; + } + case FORK:{ + jj_consume_token(FORK); + break; + } + default: + jj_la1[105] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COLON:{ + jj_consume_token(COLON); + identifier(); + label_32: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case INTEGER: + case REG: + case WIRE: + case EVENT: + case GENVAR: + case REAL: + case PARAMETER: + case LOCALPARAM: + case TIME: + case REALTIME: + case DEFPARAM: + case SUPPLY: + case NET_TYPE:{ + ; + break; + } + default: + jj_la1[106] = jj_gen; + break label_32; + } + blockItem(); + } + break; + } + default: + jj_la1[107] = jj_gen; + ; + } + label_33: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case BEGIN: + case FORK: + case IF: + case WHILE: + case FOR: + case FOREVER: + case REPEAT: + case WAIT: + case CASE: + case ASSIGN: + case DEASSIGN: + case FORCE: + case RELEASE: + case DISABLE: + case LBRACE: + case EOS: + case PARA: + case AT: + case IDENT: + case SYSTEM_IDENT: + case 135:{ + ; + break; + } + default: + jj_la1[108] = jj_gen; + break label_33; + } + statement(); + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case END:{ + jj_consume_token(END); + break; + } + case JOIN:{ + jj_consume_token(JOIN); + break; + } + default: + jj_la1[109] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + + final public void blockItem() throws ParseException { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case PARAMETER: + case LOCALPARAM:{ + parameterDecl(); + break; + } + case INTEGER: + case REG: + case WIRE: + case EVENT: + case GENVAR: + case REAL: + case TIME: + case REALTIME: + case SUPPLY: + case NET_TYPE:{ + variableDecl(); + break; + } + case DEFPARAM:{ + defparamDecl(); + break; + } + default: + jj_la1[110] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + + final public void functionDecl() throws ParseException { + jj_consume_token(FUNCTION); +begin(STATEMENT); + function(); +end(STATEMENT); + } + + final public void taskDecl() throws ParseException { + jj_consume_token(TASK); +begin(STATEMENT); + task(); +end(STATEMENT); + } + + final public void functionOld() throws ParseException {String range; + Identifier name; + Token end ; + variableModifier(); + range = bitRange(); + name = identifier(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN:{ + jj_consume_token(LPAREN); + skipTo(RPAREN); + break; + } + default: + jj_la1[111] = jj_gen; + ; + } + jj_consume_token(EOS); +beginOutlineElement(name, "function#" + range); + end = skipTo(ENDFUNCTION); +endOutlineElement(end, name.image, "function#" + range); + addCollapsible(name.beginLine, end.endLine); + } + + final public void function() throws ParseException {String range; + Identifier name; + Token end ; + int pos; + String [] deps; + variableModifier(); + // range = bitRange() + range = bitRangeWithDepend(); + name = identifier(); +pos=range.indexOf("]"); + if (( pos >0 ) && ( pos < ( range.length() - 1 ))) { // contains dependencies + deps=range.split( "]" ); + range=deps[0] + "]"; + name.setEncodedDepends(deps[1]); + } + beginOutlineElement(name, "function#" + range); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN:{ + jj_consume_token(LPAREN); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case INPUT: + case IDENT:{ + functionArgument(); + label_34: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[112] = jj_gen; + break label_34; + } + jj_consume_token(COMMA); + functionArgument(); + } + break; + } + default: + jj_la1[113] = jj_gen; + ; + } + jj_consume_token(RPAREN); + break; + } + default: + jj_la1[114] = jj_gen; + ; + } + jj_consume_token(EOS); + label_35: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case INPUT: + case INTEGER: + case REG: + case WIRE: + case EVENT: + case GENVAR: + case REAL: + case PARAMETER: + case LOCALPARAM: + case TIME: + case REALTIME: + case DEFPARAM: + case SUPPLY: + case NET_TYPE:{ + ; + break; + } + default: + jj_la1[115] = jj_gen; + break label_35; + } + functionItem(); + } + statement(); + // TODO: limit what is allowed in a function + + end = jj_consume_token(ENDFUNCTION); +endOutlineElement(end, name.image, "function#" + range); + addCollapsible(name.beginLine, end.endLine); + } + + final public void functionItem() throws ParseException { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case INPUT:{ + functionPortDecl(); + break; + } + case INTEGER: + case REG: + case WIRE: + case EVENT: + case GENVAR: + case REAL: + case TIME: + case REALTIME: + case SUPPLY: + case NET_TYPE:{ + variableDecl(); + break; + } + case PARAMETER: + case LOCALPARAM:{ + parameterDecl(); + break; + } + case DEFPARAM:{ + defparamDecl(); + break; + } + default: + jj_la1[116] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + + final public void taskOld() throws ParseException {Identifier name; + Token end ; + name = identifier(); + jj_consume_token(EOS); +beginOutlineElement(name, "task#"); + label_36: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case INPUT: + case OUTPUT: + case INOUT: + case INTEGER: + case REG: + case WIRE: + case EVENT: + case GENVAR: + case REAL: + case PARAMETER: + case LOCALPARAM: + case TIME: + case REALTIME: + case DEFPARAM: + case SUPPLY: + case NET_TYPE:{ + ; + break; + } + default: + jj_la1[117] = jj_gen; + break label_36; + } + taskItem(); + } + statement(); + end = jj_consume_token(ENDTASK); +endOutlineElement(end, name.image, "task#"); + addCollapsible(name.beginLine, end.endLine); + } + + final public void task() throws ParseException {Identifier name; + Token end ; + name = identifier(); +beginOutlineElement(name, "task#"); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN:{ + jj_consume_token(LPAREN); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case INPUT: + case OUTPUT: + case INOUT: + case IDENT:{ + argument(); + label_37: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[118] = jj_gen; + break label_37; + } + jj_consume_token(COMMA); + argument(); + } + break; + } + default: + jj_la1[119] = jj_gen; + ; + } + jj_consume_token(RPAREN); + break; + } + default: + jj_la1[120] = jj_gen; + ; + } + jj_consume_token(EOS); + label_38: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case INPUT: + case OUTPUT: + case INOUT: + case INTEGER: + case REG: + case WIRE: + case EVENT: + case GENVAR: + case REAL: + case PARAMETER: + case LOCALPARAM: + case TIME: + case REALTIME: + case DEFPARAM: + case SUPPLY: + case NET_TYPE:{ + ; + break; + } + default: + jj_la1[121] = jj_gen; + break label_38; + } + taskItem(); + } + statement(); + end = jj_consume_token(ENDTASK); +endOutlineElement(end, name.image, "task#"); + addCollapsible(name.beginLine, end.endLine); + } + + final public void taskItem() throws ParseException { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case INPUT: + case OUTPUT: + case INOUT:{ + portDecl(); + break; + } + case INTEGER: + case REG: + case WIRE: + case EVENT: + case GENVAR: + case REAL: + case TIME: + case REALTIME: + case SUPPLY: + case NET_TYPE:{ + variableDecl(); + break; + } + case PARAMETER: + case LOCALPARAM:{ + parameterDecl(); + break; + } + case DEFPARAM:{ + defparamDecl(); + break; + } + default: + jj_la1[122] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + + final public void generate() throws ParseException { + jj_consume_token(GENERATE); + label_39: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case BEGIN: + case IF: + case FOR: + case CASE: + case FUNCTION: + case TASK: + case INTEGER: + case REG: + case WIRE: + case EVENT: + case GENVAR: + case REAL: + case PARAMETER: + case LOCALPARAM: + case ASSERT: + case ASSIGN: + case TIME: + case REALTIME: + case DEFPARAM: + case OR: + case ALWAYS: + case INITIAL: + case SUPPLY: + case NET_TYPE: + case PRIM_1IN_XOUT: + case PRIM_1OUT_XIN: + case PRIM_1OUT_1IN_1CNTL: + case PRIM_1OUT: + case PRIM_1OUT_1IN_NC_PC: + case PRIM_BI: + case EOS: + case IDENT:{ + ; + break; + } + default: + jj_la1[123] = jj_gen; + break label_39; + } + generateItem(); + } + jj_consume_token(ENDGENERATE); + } + + final public void generateItem() throws ParseException {Identifier block = null; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case FUNCTION: + case TASK: + case INTEGER: + case REG: + case WIRE: + case EVENT: + case GENVAR: + case REAL: + case PARAMETER: + case LOCALPARAM: + case ASSERT: + case ASSIGN: + case TIME: + case REALTIME: + case DEFPARAM: + case OR: + case ALWAYS: + case INITIAL: + case SUPPLY: + case NET_TYPE: + case PRIM_1IN_XOUT: + case PRIM_1OUT_XIN: + case PRIM_1OUT_1IN_1CNTL: + case PRIM_1OUT: + case PRIM_1OUT_1IN_NC_PC: + case PRIM_BI: + case EOS: + case IDENT:{ + moduleOrGenerateItem(); + break; + } + case IF:{ + generateIfStatement(); + break; + } + case CASE:{ + generateCaseStatement(); + break; + } + case FOR:{ + generateForStatement(); + break; + } + case BEGIN:{ + jj_consume_token(BEGIN); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COLON:{ + jj_consume_token(COLON); + block = identifier(); + break; + } + default: + jj_la1[124] = jj_gen; + ; + } +if (block != null) + beginGenerateBlock(block); + label_40: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case BEGIN: + case IF: + case FOR: + case CASE: + case FUNCTION: + case TASK: + case INTEGER: + case REG: + case WIRE: + case EVENT: + case GENVAR: + case REAL: + case PARAMETER: + case LOCALPARAM: + case ASSERT: + case ASSIGN: + case TIME: + case REALTIME: + case DEFPARAM: + case OR: + case ALWAYS: + case INITIAL: + case SUPPLY: + case NET_TYPE: + case PRIM_1IN_XOUT: + case PRIM_1OUT_XIN: + case PRIM_1OUT_1IN_1CNTL: + case PRIM_1OUT: + case PRIM_1OUT_1IN_NC_PC: + case PRIM_BI: + case EOS: + case IDENT:{ + ; + break; + } + default: + jj_la1[125] = jj_gen; + break label_40; + } + generateItem(); + } + jj_consume_token(END); +if (block != null) { + endGenerateBlock(block); + } + break; + } + default: + jj_la1[126] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + } + + final public void generateIfStatement() throws ParseException { + jj_consume_token(IF); + jj_consume_token(LPAREN); + constantExpression(); + jj_consume_token(RPAREN); + generateItem(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case ELSE:{ + jj_consume_token(ELSE); + generateItem(); + break; + } + default: + jj_la1[127] = jj_gen; + ; + } + } + + final public void generateCaseStatement() throws ParseException { + jj_consume_token(CASE); + jj_consume_token(LPAREN); + constantExpression(); + jj_consume_token(RPAREN); + label_41: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN: + case LBRACE: + case BANG: + case TILDE: + case PLUS: + case MINUS: + case BIT_AND: + case BIT_OR: + case XOR: + case NEG_AND: + case NEG_OR: + case NEG_XOR: + case XOR_NEG: + case IDENT: + case SYSTEM_IDENT: + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + constantExpression(); + label_42: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[128] = jj_gen; + break label_42; + } + jj_consume_token(COMMA); + constantExpression(); + } + jj_consume_token(COLON); + generateItem(); + break; + } + case DEFAULT_LABEL:{ + jj_consume_token(DEFAULT_LABEL); + jj_consume_token(COLON); + generateItem(); + break; + } + default: + jj_la1[129] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case DEFAULT_LABEL: + case LPAREN: + case LBRACE: + case BANG: + case TILDE: + case PLUS: + case MINUS: + case BIT_AND: + case BIT_OR: + case XOR: + case NEG_AND: + case NEG_OR: + case NEG_XOR: + case XOR_NEG: + case IDENT: + case SYSTEM_IDENT: + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + ; + break; + } + default: + jj_la1[130] = jj_gen; + break label_41; + } + } + jj_consume_token(ENDCASE); + } + + final public void generateForStatement() throws ParseException { + jj_consume_token(FOR); + jj_consume_token(LPAREN); + lvalue(); + jj_consume_token(AGN); + expression(); + jj_consume_token(EOS); + expression(); + jj_consume_token(EOS); + lvalue(); + jj_consume_token(AGN); + expression(); + jj_consume_token(RPAREN); + generateItem(); + } + + final public String netType() throws ParseException { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case WIRE:{ + jj_consume_token(WIRE); + break; + } + case NET_TYPE:{ + jj_consume_token(NET_TYPE); + break; + } + case SUPPLY:{ + jj_consume_token(SUPPLY); + break; + } + default: + jj_la1[131] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +{if ("" != null) return token.image;} + throw new Error("Missing return statement in function"); + } + + final public void strength() throws ParseException { + jj_consume_token(LPAREN); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case STRENGTH:{ + jj_consume_token(STRENGTH); + break; + } + case SUPPLY:{ + jj_consume_token(SUPPLY); + break; + } + default: + jj_la1[132] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + jj_consume_token(COMMA); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case STRENGTH:{ + jj_consume_token(STRENGTH); + break; + } + case SUPPLY:{ + jj_consume_token(SUPPLY); + break; + } + default: + jj_la1[133] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[134] = jj_gen; + ; + } + jj_consume_token(RPAREN); + } + + final public int lvalue() throws ParseException {int width; + Identifier ident; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case IDENT:{ + ident = complexIdentifier(); +variableAssignment(ident); + {if ("" != null) return ident.getWidth();} + break; + } + case LBRACE:{ + width = lvalueConcatenation(); +{if ("" != null) return width;} + break; + } + default: + jj_la1[135] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + throw new Error("Missing return statement in function"); + } + + final public int lvalueConcatenation() throws ParseException {int width; + int ret; + jj_consume_token(LBRACE); + ret = lvalue(); + label_43: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[136] = jj_gen; + break label_43; + } + jj_consume_token(COMMA); + width = lvalue(); +if (width == 0 || ret == 0) + ret = 0; + else + ret += width; + } + jj_consume_token(RBRACE); +{if ("" != null) return ret;} + throw new Error("Missing return statement in function"); + } + + final public Identifier identifier() throws ParseException {Token token; + token = jj_consume_token(IDENT); +{if ("" != null) return new Identifier(token);} + throw new Error("Missing return statement in function"); + } + + final public Expression constantExpression() throws ParseException {Expression ret; + ret = expression(); +{if ("" != null) return ret;} + throw new Error("Missing return statement in function"); + } + + final public Expression expression() throws ParseException {Expression ret, exp1, exp2; + Token op; + ret = logicalOrExpresstion(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case HOOK:{ + op = jj_consume_token(HOOK); + exp1 = expression(); + jj_consume_token(COLON); + exp2 = expression(); +ret = operator(ret, op, exp1, exp2); + break; + } + default: + jj_la1[137] = jj_gen; + ; + } +{if ("" != null) return ret;} + throw new Error("Missing return statement in function"); + } + + final public Expression logicalOrExpresstion() throws ParseException {Expression ret, exp; + Token op; + ret = logicalAndExpresstion(); + label_44: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case SC_OR:{ + ; + break; + } + default: + jj_la1[138] = jj_gen; + break label_44; + } + op = jj_consume_token(SC_OR); + exp = logicalAndExpresstion(); +ret = operator(ret, op, exp); + } +{if ("" != null) return ret;} + throw new Error("Missing return statement in function"); + } + + final public Expression logicalAndExpresstion() throws ParseException {Expression ret, exp; + Token op; + ret = bitOrExpresstion(); + label_45: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case SC_AND:{ + ; + break; + } + default: + jj_la1[139] = jj_gen; + break label_45; + } + op = jj_consume_token(SC_AND); + exp = bitOrExpresstion(); +ret = operator(ret, op, exp); + } +{if ("" != null) return ret;} + throw new Error("Missing return statement in function"); + } + + final public Expression bitOrExpresstion() throws ParseException {Expression ret, exp; + Token op; + ret = bitAndExpresstion(); + label_46: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case BIT_OR:{ + ; + break; + } + default: + jj_la1[140] = jj_gen; + break label_46; + } + op = jj_consume_token(BIT_OR); + exp = bitAndExpresstion(); +ret = operator(ret, op, exp); + } +{if ("" != null) return ret;} + throw new Error("Missing return statement in function"); + } + + final public Expression bitAndExpresstion() throws ParseException {Expression ret, exp; + Token op; + ret = equalityExpression(); + label_47: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case BIT_AND: + case XOR: + case NEG_XOR: + case XOR_NEG:{ + ; + break; + } + default: + jj_la1[141] = jj_gen; + break label_47; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case BIT_AND:{ + op = jj_consume_token(BIT_AND); + break; + } + case XOR:{ + op = jj_consume_token(XOR); + break; + } + case NEG_XOR:{ + op = jj_consume_token(NEG_XOR); + break; + } + case XOR_NEG:{ + op = jj_consume_token(XOR_NEG); + break; + } + default: + jj_la1[142] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + exp = equalityExpression(); +ret = operator(ret, op, exp); + } +{if ("" != null) return ret;} + throw new Error("Missing return statement in function"); + } + + final public Expression equalityExpression() throws ParseException {Expression ret, exp; + Token op; + ret = relationalExpression(); + label_48: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case EQ: + case NE: + case EQ_C: + case NE_C:{ + ; + break; + } + default: + jj_la1[143] = jj_gen; + break label_48; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case EQ:{ + op = jj_consume_token(EQ); + break; + } + case EQ_C:{ + op = jj_consume_token(EQ_C); + break; + } + case NE:{ + op = jj_consume_token(NE); + break; + } + case NE_C:{ + op = jj_consume_token(NE_C); + break; + } + default: + jj_la1[144] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + exp = relationalExpression(); +ret = operator(ret, op, exp); + } +{if ("" != null) return ret;} + throw new Error("Missing return statement in function"); + } + + final public Expression relationalExpression() throws ParseException {Expression ret, exp; + Token op; + ret = shiftExpression(); + label_49: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case GT: + case LT: + case LE: + case GE:{ + ; + break; + } + default: + jj_la1[145] = jj_gen; + break label_49; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LT:{ + op = jj_consume_token(LT); + break; + } + case LE:{ + op = jj_consume_token(LE); + break; + } + case GT:{ + op = jj_consume_token(GT); + break; + } + case GE:{ + op = jj_consume_token(GE); + break; + } + default: + jj_la1[146] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + exp = shiftExpression(); +ret = operator(ret, op, exp); + } +{if ("" != null) return ret;} + throw new Error("Missing return statement in function"); + } + + final public Expression shiftExpression() throws ParseException {Expression ret, exp; + Token op; + ret = addExpression(); + label_50: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LSHIFT: + case RSHIFT: + case ALSHIFT: + case ARSHIFT:{ + ; + break; + } + default: + jj_la1[147] = jj_gen; + break label_50; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LSHIFT:{ + op = jj_consume_token(LSHIFT); + break; + } + case RSHIFT:{ + op = jj_consume_token(RSHIFT); + break; + } + case ALSHIFT:{ + op = jj_consume_token(ALSHIFT); + break; + } + case ARSHIFT:{ + op = jj_consume_token(ARSHIFT); + break; + } + default: + jj_la1[148] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + exp = addExpression(); +ret = operator(ret, op, exp); + } +{if ("" != null) return ret;} + throw new Error("Missing return statement in function"); + } + + final public Expression addExpression() throws ParseException {Expression ret, exp; + Token op; + ret = multiplyExpression(); + label_51: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case PLUS: + case MINUS:{ + ; + break; + } + default: + jj_la1[149] = jj_gen; + break label_51; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case PLUS:{ + op = jj_consume_token(PLUS); + break; + } + case MINUS:{ + op = jj_consume_token(MINUS); + break; + } + default: + jj_la1[150] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + exp = multiplyExpression(); +ret = operator(ret, op, exp); + } +{if ("" != null) return ret;} + throw new Error("Missing return statement in function"); + } + + final public Expression multiplyExpression() throws ParseException {Expression ret, exp; + Token op; + ret = unaryExpression(); + label_52: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case STAR: + case SLASH: + case REM: + case POWER:{ + ; + break; + } + default: + jj_la1[151] = jj_gen; + break label_52; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case STAR:{ + op = jj_consume_token(STAR); + break; + } + case SLASH:{ + op = jj_consume_token(SLASH); + break; + } + case REM:{ + op = jj_consume_token(REM); + break; + } + case POWER:{ + op = jj_consume_token(POWER); + break; + } + default: + jj_la1[152] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + exp = unaryExpression(); +ret = operator(ret, op, exp); + } +{if ("" != null) return ret;} + throw new Error("Missing return statement in function"); + } + + final public Expression unaryExpression() throws ParseException {Expression ret, exp; + Token op = null; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case BANG: + case TILDE: + case PLUS: + case MINUS: + case BIT_AND: + case BIT_OR: + case XOR: + case NEG_AND: + case NEG_OR: + case NEG_XOR: + case XOR_NEG:{ + op = unaryOperator(); + break; + } + default: + jj_la1[153] = jj_gen; + ; + } + ret = primary(); +if (op != null) + {if ("" != null) return operator(ret, op);} + else + {if ("" != null) return ret;} + throw new Error("Missing return statement in function"); + } + + final public Expression primary() throws ParseException {Expression ret; + Identifier ident; + boolean isFunc = false; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case INTEGER_LITERAL: + case REAL_LITERAL: + case STRING_LITERAL:{ + ret = number(); + break; + } + case IDENT:{ + ident = complexIdentifier(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LPAREN:{ + functionArgs(ident); +isFunc = true; + break; + } + default: + jj_la1[154] = jj_gen; + ; + } +if (isFunc) { + ret = functionReference(ident); + } else { + ret = variableReference(ident); + } + break; + } + case SYSTEM_IDENT:{ + jj_consume_token(SYSTEM_IDENT); + label_53: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case SYSTEM_IDENT:{ + ; + break; + } + default: + jj_la1[155] = jj_gen; + break label_53; + } + jj_consume_token(SYSTEM_IDENT); + } + if (jj_2_8(2)) { + sysFunctionArgs(); + } else { + ; + } +ret = new Expression(); + break; + } + case LBRACE:{ + ret = concatenation(); + break; + } + case LPAREN:{ + jj_consume_token(LPAREN); + ret = minTypMaxExpresstion(); + jj_consume_token(RPAREN); + break; + } + default: + jj_la1[156] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +if (ret == null) + {if ("" != null) return new Expression();} + else + {if ("" != null) return ret;} + throw new Error("Missing return statement in function"); + } + + final public Identifier complexIdentifier() throws ParseException {Identifier ident, concat; + Token token; + ident = identifier(); + bitOrAry(ident); + label_54: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case AT: + case DOT:{ + ; + break; + } + default: + jj_la1[157] = jj_gen; + break label_54; + } + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case AT:{ + token = jj_consume_token(AT); + break; + } + case DOT:{ + token = jj_consume_token(DOT); + break; + } + default: + jj_la1[158] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + concat = identifier(); + bitOrAry(concat); +ident.endLine = concat.endLine; + ident.endColumn = concat.endColumn; + ident.image += token.image + concat.image; + ident.setWidth(concat.getWidthBit()); + ident.setDimension(concat.getDimension()); + ident.setEncodedDepends(concat.getEncodedDepends()); //Andrey: trying to add dependency on parameters used in bit selection + + } +{if ("" != null) return ident;} + throw new Error("Missing return statement in function"); + } + + final public Expression minTypMaxExpresstion() throws ParseException {Expression exp; + exp = expression(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COLON:{ + jj_consume_token(COLON); + expression(); + jj_consume_token(COLON); + expression(); + break; + } + default: + jj_la1[159] = jj_gen; + ; + } +{if ("" != null) return exp;} + throw new Error("Missing return statement in function"); + } + + final public void bitOrAry(Identifier ident) throws ParseException {int width = 0; + int lowBit = 0; + int dim = 0; + Expression msb=null, lsb; + Token token=null; + label_55: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LBRACKET:{ + ; + break; + } + default: + jj_la1[160] = jj_gen; + break label_55; + } + jj_consume_token(LBRACKET); + msb = expression(); +width = 1; + dim++; + if (msb.isValid()) + lowBit = msb.intValue(); + else + badBitRange(ident, msb.stringValue()); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COLON: + case PCOLON: + case MCOLON:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COLON:{ + token = jj_consume_token(COLON); + break; + } + case PCOLON:{ + token = jj_consume_token(PCOLON); + break; + } + case MCOLON:{ + token = jj_consume_token(MCOLON); + break; + } + default: + jj_la1[161] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + lsb = expression(); +msb.addAllDepends(lsb); + if (token.image.equals(":")) + { + if (msb.isValid() && lsb.isValid()) + { + width = msb.intValue() - lsb.intValue() + 1; + lowBit = lsb.intValue(); + } + else + { + width = 0; + lowBit = 0; + if (!lsb.isValid()) + badBitRange(ident, lsb.stringValue()); + } + } else if (token.image.equals("+:")){ // indexed part-select + if (lsb.isValid()) + width = lsb.intValue(); + else + { + width = 0; + badBitRange(ident, lsb.stringValue()); + } + if (msb.isValid()) + lowBit = msb.intValue(); + else + lowBit = 0; + } else if (token.image.equals("-:")){ // indexed part-select + if (lsb.isValid()) + width = lsb.intValue(); + else + width = 0; + if (msb.isValid()) + lowBit = msb.intValue()-width +((width >0)?1:0); + else + lowBit = 0; + if (!lsb.isValid() && !msb.isValid()) + badBitRange(ident, lsb.stringValue()); + } else { // dead code? + if (lsb.isValid()) + { + width = lsb.intValue(); +// width = 1; +// lowBit = lsb.intValue(); + } + else + { + width = 0; + badBitRange(ident, lsb.stringValue()); + } + } + break; + } + default: + jj_la1[162] = jj_gen; + ; + } + token = jj_consume_token(RBRACKET); + } +ident.setWidth(width,lowBit); + ident.setDimension(dim); + ident.extendPosition(token); // is token pointing to "]" ? + if (msb!=null) ident.setEncodedDepends(msb.encodeDepends()); + } + + final public String bitRangeWithDepend() throws ParseException {Expression msb, lsb; + String depends; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LBRACKET:{ + jj_consume_token(LBRACKET); + msb = expression(); + jj_consume_token(COLON); + lsb = expression(); + jj_consume_token(RBRACKET); +msb.addAllDepends(lsb); + depends=msb.encodeDepends(); + if (msb.isValid() && lsb.isValid()) + { + {if ("" != null) return "[" + msb.intValue() + ":" + lsb.intValue() + "]" + depends;} + } + else + {if ("" != null) return "[X]" + depends;} // invalid width + + break; + } + default: + jj_la1[163] = jj_gen; + ; + } +{if ("" != null) return "";} // No bit range + + throw new Error("Missing return statement in function"); + } + +//TODO: Andrey: bitRange() maybe needed to be upgraded to bitRangeWithDepend(), as for ports + final public String bitRange() throws ParseException {Expression msb, lsb; + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LBRACKET:{ + jj_consume_token(LBRACKET); + msb = expression(); + jj_consume_token(COLON); + lsb = expression(); + jj_consume_token(RBRACKET); +if (msb.isValid() && lsb.isValid()) + {if ("" != null) return "[" + msb.intValue() + ":" + lsb.intValue() + "]";} + else + {if ("" != null) return "";} + break; + } + default: + jj_la1[164] = jj_gen; + ; + } +{if ("" != null) return "";} + throw new Error("Missing return statement in function"); + } + + final public Token unaryOperator() throws ParseException { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case TILDE:{ + jj_consume_token(TILDE); + break; + } + case PLUS:{ + jj_consume_token(PLUS); + break; + } + case MINUS:{ + jj_consume_token(MINUS); + break; + } + case BANG:{ + jj_consume_token(BANG); + break; + } + case BIT_AND:{ + jj_consume_token(BIT_AND); + break; + } + case NEG_AND:{ + jj_consume_token(NEG_AND); + break; + } + case BIT_OR:{ + jj_consume_token(BIT_OR); + break; + } + case NEG_OR:{ + jj_consume_token(NEG_OR); + break; + } + case XOR:{ + jj_consume_token(XOR); + break; + } + case NEG_XOR:{ + jj_consume_token(NEG_XOR); + break; + } + case XOR_NEG:{ + jj_consume_token(XOR_NEG); + break; + } + default: + jj_la1[165] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +{if ("" != null) return token;} + throw new Error("Missing return statement in function"); + } + + final public Expression concatenation() throws ParseException {int width; + int value; + boolean valid; + boolean assignable; + Expression exp; + Expression refs = new Expression(); + jj_consume_token(LBRACE); + exp = expression(); +width = exp.getWidth(); + value = exp.intValue(); + valid = exp.isValid(); + assignable = exp.isAssignable(); + refs.addReference(exp); + refs.extendPosition(exp); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case LBRACE: + case COMMA:{ + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + label_56: + while (true) { + jj_consume_token(COMMA); + exp = expression(); +if (width == 0 || exp.getWidth() == 0) + width = 0; + else + width += exp.getWidth(); + value = (value << width) | exp.intValue(); + valid = valid && exp.isValid(); + assignable = assignable && exp.isAssignable(); + refs.addReference(exp); + refs.extendPosition(exp); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[166] = jj_gen; + break label_56; + } + } + break; + } + case LBRACE:{ + jj_consume_token(LBRACE); + exp = expression(); + jj_consume_token(RBRACE); +width = valid ? (value * exp.getWidth()) : 0; + value = exp.intValue(); + valid = exp.isValid(); + assignable = exp.isAssignable(); + exp.extendPosition(refs); + refs = exp; + break; + } + default: + jj_la1[167] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } + break; + } + default: + jj_la1[168] = jj_gen; + ; + } + jj_consume_token(RBRACE); +Expression ret = new Expression(width); + if (valid) + ret.setValue(value); + ret.setAssignable(assignable); + ret.addReference(refs); + ret.extendPosition(refs); + {if ("" != null) return ret;} + throw new Error("Missing return statement in function"); + } + +// for system functions - no checks of arguments + final public void sysFunctionArgs() throws ParseException { + jj_consume_token(LPAREN); + expression(); + label_57: + while (true) { + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case COMMA:{ + ; + break; + } + default: + jj_la1[169] = jj_gen; + break label_57; + } + jj_consume_token(COMMA); + expression(); + } + jj_consume_token(RPAREN); + } + +// for normal functions + final public void functionArgs(Identifier ident) throws ParseException {Token iend; + jj_consume_token(LPAREN); +beginOutlineElement(ident, ident.image+":"+ident.beginLine+":"+ident.beginColumn, "functionreference#"+ident.image); + portConnect(ident.image, PORT_TYPE.FUNCTION); + iend = jj_consume_token(RPAREN); +endOutlineElement(iend, ident.image+":"+ident.beginLine+":"+ident.beginColumn, "functionreference#"+ident.image); + addCollapsible(ident.beginLine, iend.endLine); + } + + final public Expression number() throws ParseException {Expression ret = new Expression(); + switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { + case INTEGER_LITERAL:{ + jj_consume_token(INTEGER_LITERAL); +ret.parseIntegerLiteral(token.image); + break; + } + case REAL_LITERAL:{ + jj_consume_token(REAL_LITERAL); +ret.parseRealLiteral(token.image); + break; + } + case STRING_LITERAL:{ + jj_consume_token(STRING_LITERAL); +ret.parseStringLiteral(token.image); + break; + } + default: + jj_la1[170] = jj_gen; + jj_consume_token(-1); + throw new ParseException(); + } +ret.extendPosition(token); + {if ("" != null) return ret;} + throw new Error("Missing return statement in function"); + } + + void unexpectedEof(Token token) throws ParseException {ParseException ex = new ParseException("unexpected EOF"); + ex.currentToken = token; + throw ex; + } + + Token skipTo(int skip) throws ParseException {Token current = token; + Token token ; + StringBuffer image = new StringBuffer(); + + for(;;) + { + token = getToken(1); + if (token.kind == EOF) + unexpectedEof(current); + if (token.kind == skip) + { + getNextToken(); + break ; + } + + image.append(token.image); + getNextToken(); + } + token.image = image.toString(); + return token ; + } + + private boolean jj_2_1(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_1(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(0, xla); } + } + + private boolean jj_2_2(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_2(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(1, xla); } + } + + private boolean jj_2_3(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_3(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(2, xla); } + } + + private boolean jj_2_4(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_4(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(3, xla); } + } + + private boolean jj_2_5(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_5(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(4, xla); } + } + + private boolean jj_2_6(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_6(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(5, xla); } + } + + private boolean jj_2_7(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_7(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(6, xla); } + } + + private boolean jj_2_8(int xla) + { + jj_la = xla; jj_lastpos = jj_scanpos = token; + try { return !jj_3_8(); } + catch(LookaheadSuccess ls) { return true; } + finally { jj_save(7, xla); } + } + + private boolean jj_3R_68() + { + if (jj_3R_75()) return true; + return false; + } + + private boolean jj_3R_75() + { + if (jj_3R_63()) return true; + return false; + } + + private boolean jj_3R_109() + { + if (jj_3R_74()) return true; + return false; + } + + private boolean jj_3R_90() + { + if (jj_3R_93()) return true; + return false; + } + + private boolean jj_3R_108() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(93)) { + jj_scanpos = xsp; + if (jj_scan_token(104)) { + jj_scanpos = xsp; + if (jj_scan_token(105)) { + jj_scanpos = xsp; + if (jj_scan_token(92)) { + jj_scanpos = xsp; + if (jj_scan_token(108)) { + jj_scanpos = xsp; + if (jj_scan_token(114)) { + jj_scanpos = xsp; + if (jj_scan_token(109)) { + jj_scanpos = xsp; + if (jj_scan_token(115)) { + jj_scanpos = xsp; + if (jj_scan_token(110)) { + jj_scanpos = xsp; + if (jj_scan_token(116)) { + jj_scanpos = xsp; + if (jj_scan_token(117)) return true; + } + } + } + } + } + } + } + } + } + } + return false; + } + + private boolean jj_3R_110() + { + if (jj_3R_114()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_115()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3R_67() + { + if (jj_3R_74()) return true; + return false; + } + + private boolean jj_3R_61() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_67()) { + jj_scanpos = xsp; + if (jj_3R_68()) return true; + } + return false; + } + + private boolean jj_3R_107() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_109()) { + jj_scanpos = xsp; + if (jj_3R_110()) { + jj_scanpos = xsp; + if (jj_3R_111()) { + jj_scanpos = xsp; + if (jj_3R_112()) { + jj_scanpos = xsp; + if (jj_3R_113()) return true; + } + } + } + } + return false; + } + + private boolean jj_3R_93() + { + if (jj_3R_63()) return true; + return false; + } + + private boolean jj_3_1() + { + if (jj_3R_58()) return true; + return false; + } + + private boolean jj_3R_63() + { + if (jj_scan_token(IDENT)) return true; + return false; + } + + private boolean jj_3R_89() + { + if (jj_3R_74()) return true; + return false; + } + + private boolean jj_3R_84() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_89()) { + jj_scanpos = xsp; + if (jj_3R_90()) return true; + } + return false; + } + + private boolean jj_3R_106() + { + if (jj_3R_108()) return true; + return false; + } + + private boolean jj_3R_104() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_106()) jj_scanpos = xsp; + if (jj_3R_107()) return true; + return false; + } + + private boolean jj_3R_70() + { + if (jj_scan_token(LPAREN)) return true; + return false; + } + + private boolean jj_3R_65() + { + if (jj_scan_token(LPAREN)) return true; + if (jj_3R_71()) return true; + return false; + } + + private boolean jj_3R_76() + { + if (jj_3R_84()) return true; + return false; + } + + private boolean jj_3R_105() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(106)) { + jj_scanpos = xsp; + if (jj_scan_token(107)) { + jj_scanpos = xsp; + if (jj_scan_token(111)) { + jj_scanpos = xsp; + if (jj_scan_token(120)) return true; + } + } + } + return false; + } + + private boolean jj_3R_69() + { + if (jj_scan_token(PARA)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_76()) { + jj_scanpos = xsp; + if (jj_3R_77()) return true; + } + return false; + } + + private boolean jj_3_5() + { + if (jj_3R_60()) return true; + if (jj_scan_token(COMMA)) return true; + return false; + } + + private boolean jj_3_4() + { + if (jj_3R_60()) return true; + if (jj_scan_token(COMMA)) return true; + return false; + } + + private boolean jj_3R_64() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_69()) jj_scanpos = xsp; + if (jj_3R_63()) return true; + xsp = jj_scanpos; + if (jj_3R_70()) jj_scanpos = xsp; + if (jj_scan_token(EOS)) return true; + return false; + } + + private boolean jj_3R_102() + { + if (jj_3R_104()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_105()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_103() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(104)) { + jj_scanpos = xsp; + if (jj_scan_token(105)) return true; + } + return false; + } + + private boolean jj_3R_58() + { + if (jj_3R_63()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_64()) { + jj_scanpos = xsp; + if (jj_3R_65()) return true; + } + return false; + } + + private boolean jj_3R_59() + { + if (jj_scan_token(LPAREN)) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(70)) { + jj_scanpos = xsp; + if (jj_scan_token(68)) return true; + } + return false; + } + + private boolean jj_3R_100() + { + if (jj_3R_102()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_103()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_60() + { + if (jj_3R_66()) return true; + return false; + } + + private boolean jj_3R_101() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(112)) { + jj_scanpos = xsp; + if (jj_scan_token(113)) { + jj_scanpos = xsp; + if (jj_scan_token(121)) { + jj_scanpos = xsp; + if (jj_scan_token(122)) return true; + } + } + } + return false; + } + + private boolean jj_3R_98() + { + if (jj_3R_100()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_101()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_99() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(91)) { + jj_scanpos = xsp; + if (jj_scan_token(99)) { + jj_scanpos = xsp; + if (jj_scan_token(90)) { + jj_scanpos = xsp; + if (jj_scan_token(100)) return true; + } + } + } + return false; + } + + private boolean jj_3_6() + { + if (jj_3R_59()) return true; + return false; + } + + private boolean jj_3R_96() + { + if (jj_3R_98()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_99()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3_3() + { + if (jj_3R_59()) return true; + return false; + } + + private boolean jj_3R_97() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(98)) { + jj_scanpos = xsp; + if (jj_scan_token(118)) { + jj_scanpos = xsp; + if (jj_scan_token(101)) { + jj_scanpos = xsp; + if (jj_scan_token(119)) return true; + } + } + } + return false; + } + + private boolean jj_3R_83() + { + if (jj_scan_token(STRING_LITERAL)) return true; + return false; + } + + private boolean jj_3R_82() + { + if (jj_scan_token(REAL_LITERAL)) return true; + return false; + } + + private boolean jj_3R_81() + { + if (jj_scan_token(INTEGER_LITERAL)) return true; + return false; + } + + private boolean jj_3R_74() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_81()) { + jj_scanpos = xsp; + if (jj_3R_82()) { + jj_scanpos = xsp; + if (jj_3R_83()) return true; + } + } + return false; + } + + private boolean jj_3_2() + { + if (jj_3R_59()) return true; + return false; + } + + private boolean jj_3R_94() + { + if (jj_3R_96()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_97()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_95() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(108)) { + jj_scanpos = xsp; + if (jj_scan_token(110)) { + jj_scanpos = xsp; + if (jj_scan_token(116)) { + jj_scanpos = xsp; + if (jj_scan_token(117)) return true; + } + } + } + return false; + } + + private boolean jj_3R_121() + { + if (jj_scan_token(LBRACKET)) return true; + return false; + } + + private boolean jj_3R_91() + { + if (jj_3R_94()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_95()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_120() + { + if (jj_scan_token(LPAREN)) return true; + return false; + } + + private boolean jj_3R_118() + { + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_121()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_62() + { + if (jj_scan_token(LPAREN)) return true; + if (jj_3R_66()) return true; + return false; + } + + private boolean jj_3R_86() + { + if (jj_3R_66()) return true; + return false; + } + + private boolean jj_3R_92() + { + if (jj_scan_token(BIT_OR)) return true; + return false; + } + + private boolean jj_3R_87() + { + if (jj_3R_91()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_92()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_78() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_85()) { + jj_scanpos = xsp; + if (jj_3R_86()) return true; + } + return false; + } + + private boolean jj_3R_85() + { + if (jj_scan_token(DOT)) return true; + return false; + } + + private boolean jj_3_7() + { + if (jj_3R_61()) return true; + return false; + } + + private boolean jj_3_8() + { + if (jj_3R_62()) return true; + return false; + } + + private boolean jj_3R_117() + { + if (jj_3R_66()) return true; + return false; + } + + private boolean jj_3R_88() + { + if (jj_scan_token(SC_AND)) return true; + return false; + } + + private boolean jj_3R_71() + { + if (jj_3R_78()) return true; + return false; + } + + private boolean jj_3R_79() + { + if (jj_3R_87()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_88()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_119() + { + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(85)) { + jj_scanpos = xsp; + if (jj_scan_token(88)) return true; + } + return false; + } + + private boolean jj_3R_80() + { + if (jj_scan_token(SC_OR)) return true; + return false; + } + + private boolean jj_3R_72() + { + if (jj_3R_79()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_80()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_115() + { + if (jj_3R_120()) return true; + return false; + } + + private boolean jj_3R_73() + { + if (jj_scan_token(HOOK)) return true; + return false; + } + + private boolean jj_3R_114() + { + if (jj_3R_63()) return true; + if (jj_3R_118()) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_3R_119()) { jj_scanpos = xsp; break; } + } + return false; + } + + private boolean jj_3R_113() + { + if (jj_scan_token(LPAREN)) return true; + if (jj_3R_117()) return true; + return false; + } + + private boolean jj_3R_112() + { + if (jj_3R_116()) return true; + return false; + } + + private boolean jj_3R_116() + { + if (jj_scan_token(LBRACE)) return true; + if (jj_3R_66()) return true; + return false; + } + + private boolean jj_3R_66() + { + if (jj_3R_72()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_73()) jj_scanpos = xsp; + return false; + } + + private boolean jj_3R_77() + { + if (jj_scan_token(LPAREN)) return true; + return false; + } + + private boolean jj_3R_111() + { + if (jj_scan_token(SYSTEM_IDENT)) return true; + Token xsp; + while (true) { + xsp = jj_scanpos; + if (jj_scan_token(124)) { jj_scanpos = xsp; break; } + } + xsp = jj_scanpos; + if (jj_3_8()) jj_scanpos = xsp; + return false; + } + + /** Generated Token Manager. */ + public VerilogParserCoreTokenManager token_source; + JavaCharStream jj_input_stream; + /** Current token. */ + public Token token; + /** Next token. */ + public Token jj_nt; + private int jj_ntk; + private Token jj_scanpos, jj_lastpos; + private int jj_la; + private int jj_gen; + final private int[] jj_la1 = new int[171]; + static private int[] jj_la1_0; + static private int[] jj_la1_1; + static private int[] jj_la1_2; + static private int[] jj_la1_3; + static private int[] jj_la1_4; + static { + jj_la1_init_0(); + jj_la1_init_1(); + jj_la1_init_2(); + jj_la1_init_3(); + jj_la1_init_4(); + } + private static void jj_la1_init_0() { + jj_la1_0 = new int[] {0xa000,0xa000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800000,0x0,0x0,0x0,0x20000,0x20000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfa280000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000000,0x0,0x0,0x0,0x0,0x280000,0x0,0x0,0xfa280000,0x500000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x12080000,0x0,0x12080000,0x12080000,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; + } + private static void jj_la1_init_1() { + jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x40000,0x0,0x0,0xe00,0x0,0xf1affea8,0x0,0xe00,0x0,0x3003fe00,0x3003fe00,0x121000,0x121000,0xe00,0x0,0xe00,0x0,0x200,0xf1affea8,0xf10ff028,0x800000,0xe00,0x0,0x0,0x30127000,0x30127000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x100000,0x0,0x0,0x3003b000,0x3003f000,0x0,0x0,0x0,0x0,0x0,0xc0000,0x0,0x0,0x0,0xf000001,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,0x80000000,0x0,0xf000000,0x0,0x0,0x0,0x2,0x2,0x0,0x700ff000,0x0,0xf000001,0x0,0x700ff000,0x0,0x0,0x200,0x0,0x700ff200,0x700ff200,0x700ffe00,0x0,0xe00,0x0,0x700ffe00,0x700ffe00,0xf18ff029,0x0,0xf18ff029,0xf18ff029,0x0,0x0,0x2,0x2,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; + } + private static void jj_la1_init_2() { + jj_la1_2 = new int[] {0x0,0x0,0x0,0x800000,0x0,0x100000,0x800000,0x0,0x2000,0x81fb6,0x800000,0x0,0x2000,0x30,0x30,0x0,0x0,0x0,0x2000000,0x0,0x2000000,0x0,0x81fb6,0x1fb0,0x80006,0x0,0x800000,0x800000,0x0,0x0,0x2000000,0x2000,0x100000,0x3100a000,0x2000,0x102000,0x0,0x3000a000,0x800000,0x3000a000,0x800000,0x3100a000,0x800000,0x3000a000,0x3100a000,0x800000,0x3000a000,0x3100a000,0x1f80,0xf00,0x100000,0x0,0x800000,0x800000,0x800000,0x80,0x100000,0x0,0x800000,0x100000,0x0,0x800000,0x2000,0x100000,0x800000,0x2000,0x0,0x100000,0x800000,0x0,0x30,0x20000,0x2000000,0x800000,0x800000,0x2000,0x0,0x800000,0x800000,0x6,0x388001,0x2000000,0x300000,0x82000,0x2082000,0x2000000,0x300000,0x800000,0x2000,0x8000,0x300000,0x2000,0x0,0x3000a008,0x2000,0x3000a008,0x800000,0x800000,0x3000a008,0x0,0x0,0x800000,0x80000000,0x3000a000,0x3000a000,0x0,0x30,0x80000000,0x388001,0x0,0x30,0x2000,0x800000,0x0,0x2000,0x30,0x30,0x30,0x800000,0x0,0x2000,0x30,0x30,0x81fb6,0x80000000,0x81fb6,0x81fb6,0x0,0x800000,0x3000a000,0x3000a000,0x30,0x50,0x50,0x800000,0x8000,0x800000,0x40000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xc000000,0xc000000,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x2000,0x0,0xa000,0x1200000,0x1200000,0x80000000,0x20000,0x80000000,0x80000000,0x20000,0x20000,0x30000000,0x800000,0x808000,0x808000,0x800000,0x0,}; + } + private static void jj_la1_init_3() { + jj_la1_3 = new int[] {0x8000000,0x8000000,0x8000000,0x0,0x0,0x0,0x0,0x8000000,0x0,0x8000000,0x0,0x8000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x8000000,0x8000000,0x0,0x8000000,0x0,0x0,0x0,0x0,0x0,0x0,0x88000000,0x0,0x983c7300,0x0,0x8000000,0x88000000,0x983c7300,0x0,0x983c7300,0x0,0x983c7300,0x0,0x983c7300,0x983c7300,0x0,0x983c7300,0x983c7300,0x0,0x0,0x0,0x8000000,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x0,0x8000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18000000,0x8,0x0,0x0,0x8,0x8,0x0,0x0,0x0,0x18000000,0x0,0x88000000,0x88000000,0x983c7700,0x8000400,0x983c7300,0x0,0x0,0x983c7300,0x0,0x0,0x0,0x0,0x983c7300,0x983c7300,0x0,0x0,0x0,0x18000000,0x0,0x0,0x0,0x0,0x8000000,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x0,0x0,0x8000000,0x0,0x8000000,0x8000000,0x0,0x0,0x983c7300,0x983c7300,0x0,0x0,0x0,0x0,0x8000000,0x0,0x0,0x40,0x80,0x2000,0x305000,0x305000,0xc00024,0xc00024,0x18,0x18,0x6030000,0x6030000,0x300,0x300,0x1008c00,0x1008c00,0x3c7300,0x0,0x10000000,0x98000000,0x0,0x0,0x0,0x0,0x3,0x3,0x0,0x0,0x3c7300,0x0,0x0,0x0,0x0,0x80000000,}; + } + private static void jj_la1_init_4() { + jj_la1_4 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x60,0x0,0x60,0x0,0x0,0x60,0x60,0x0,0x60,0x0,0x60,0x0,0x60,0x60,0x0,0x60,0x60,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x60,0x60,0x60,0x0,0x60,0x0,0x0,0x60,0x0,0x0,0x0,0x0,0x60,0x60,0x0,0x0,0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x60,0x60,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x60,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x60,}; + } + final private JJCalls[] jj_2_rtns = new JJCalls[8]; + private boolean jj_rescan = false; + private int jj_gc = 0; + + /** Constructor with InputStream. */ + public VerilogParserCore(java.io.InputStream stream) { + this(stream, null); + } + /** Constructor with InputStream and supplied encoding */ + public VerilogParserCore(java.io.InputStream stream, String encoding) { + try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } + token_source = new VerilogParserCoreTokenManager(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 171; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream stream) { + ReInit(stream, null); + } + /** Reinitialise. */ + public void ReInit(java.io.InputStream stream, String encoding) { + try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } + token_source.ReInit(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 171; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + /** Constructor. */ + public VerilogParserCore(java.io.Reader stream) { + jj_input_stream = new JavaCharStream(stream, 1, 1); + token_source = new VerilogParserCoreTokenManager(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 171; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + /** Reinitialise. */ + public void ReInit(java.io.Reader stream) { + jj_input_stream.ReInit(stream, 1, 1); + token_source.ReInit(jj_input_stream); + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 171; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + /** Constructor with generated Token Manager. */ + public VerilogParserCore(VerilogParserCoreTokenManager tm) { + token_source = tm; + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 171; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + /** Reinitialise. */ + public void ReInit(VerilogParserCoreTokenManager tm) { + token_source = tm; + token = new Token(); + jj_ntk = -1; + jj_gen = 0; + for (int i = 0; i < 171; i++) jj_la1[i] = -1; + for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); + } + + private Token jj_consume_token(int kind) throws ParseException { + Token oldToken; + if ((oldToken = token).next != null) token = token.next; + else token = token.next = token_source.getNextToken(); + jj_ntk = -1; + if (token.kind == kind) { + jj_gen++; + if (++jj_gc > 100) { + jj_gc = 0; + for (int i = 0; i < jj_2_rtns.length; i++) { + JJCalls c = jj_2_rtns[i]; + while (c != null) { + if (c.gen < jj_gen) c.first = null; + c = c.next; + } + } + } + return token; + } + token = oldToken; + jj_kind = kind; + throw generateParseException(); + } + + @SuppressWarnings("serial") + static private final class LookaheadSuccess extends java.lang.Error { } + final private LookaheadSuccess jj_ls = new LookaheadSuccess(); + private boolean jj_scan_token(int kind) { + if (jj_scanpos == jj_lastpos) { + jj_la--; + if (jj_scanpos.next == null) { + jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); + } else { + jj_lastpos = jj_scanpos = jj_scanpos.next; + } + } else { + jj_scanpos = jj_scanpos.next; + } + if (jj_rescan) { + int i = 0; Token tok = token; + while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } + if (tok != null) jj_add_error_token(kind, i); + } + if (jj_scanpos.kind != kind) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; + return false; + } + + +/** Get the next Token. */ + final public Token getNextToken() { + if (token.next != null) token = token.next; + else token = token.next = token_source.getNextToken(); + jj_ntk = -1; + jj_gen++; + return token; + } + +/** Get the specific Token. */ + final public Token getToken(int index) { + Token t = token; + for (int i = 0; i < index; i++) { + if (t.next != null) t = t.next; + else t = t.next = token_source.getNextToken(); + } + return t; + } + + private int jj_ntk_f() { + if ((jj_nt=token.next) == null) + return (jj_ntk = (token.next=token_source.getNextToken()).kind); + else + return (jj_ntk = jj_nt.kind); + } + + private java.util.List jj_expentries = new java.util.ArrayList(); + private int[] jj_expentry; + private int jj_kind = -1; + private int[] jj_lasttokens = new int[100]; + private int jj_endpos; + + private void jj_add_error_token(int kind, int pos) { + if (pos >= 100) return; + if (pos == jj_endpos + 1) { + jj_lasttokens[jj_endpos++] = kind; + } else if (jj_endpos != 0) { + jj_expentry = new int[jj_endpos]; + for (int i = 0; i < jj_endpos; i++) { + jj_expentry[i] = jj_lasttokens[i]; + } + jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) { + int[] oldentry = (int[])(it.next()); + if (oldentry.length == jj_expentry.length) { + for (int i = 0; i < jj_expentry.length; i++) { + if (oldentry[i] != jj_expentry[i]) { + continue jj_entries_loop; + } + } + jj_expentries.add(jj_expentry); + break jj_entries_loop; + } + } + if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; + } + } + + /** Generate ParseException. */ + public ParseException generateParseException() { + jj_expentries.clear(); + boolean[] la1tokens = new boolean[136]; + if (jj_kind >= 0) { + la1tokens[jj_kind] = true; + jj_kind = -1; + } + for (int i = 0; i < 171; i++) { + if (jj_la1[i] == jj_gen) { + for (int j = 0; j < 32; j++) { + if ((jj_la1_0[i] & (1< jj_gen) { + jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; + switch (i) { + case 0: jj_3_1(); break; + case 1: jj_3_2(); break; + case 2: jj_3_3(); break; + case 3: jj_3_4(); break; + case 4: jj_3_5(); break; + case 5: jj_3_6(); break; + case 6: jj_3_7(); break; + case 7: jj_3_8(); break; + } + } + p = p.next; + } while (p != null); + } catch(LookaheadSuccess ls) { } + } + jj_rescan = false; + } + + private void jj_save(int index, int xla) { + JJCalls p = jj_2_rtns[index]; + while (p.gen > jj_gen) { + if (p.next == null) { p = p.next = new JJCalls(); break; } + p = p.next; + } + p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; + } + + static final class JJCalls { + int gen; + Token first; + int arg; + JJCalls next; + } + + // Andrey - parameters used in delays + +} diff -U 3 -dHrN -- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/verilog/VerilogParserCoreTokenManager.java vdt/_generated/com/elphel/vdt/veditor/parser/verilog/VerilogParserCoreTokenManager.java --- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/verilog/VerilogParserCoreTokenManager.java 2017-11-28 14:28:04.250792933 -0700 +++ vdt/_generated/com/elphel/vdt/veditor/parser/verilog/VerilogParserCoreTokenManager.java 2017-11-28 14:28:04.194794586 -0700 @@ -1,1588 +1,2672 @@ -/* Generated By:JavaCC: Do not edit this line. VerilogParserCoreTokenManager.java */ -package net.sourceforge.veditor.parser; - -public class VerilogParserCoreTokenManager implements VerilogParserCoreConstants -{ - public java.io.PrintStream debugStream = System.out; - public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } -private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) -{ - switch (pos) - { - case 0: - if ((active0 & 0x200000000L) != 0L) - { - jjmatchedKind = 64; - return 40; - } - if ((active0 & 0x400000000000L) != 0L) - { - jjmatchedKind = 64; - return 52; - } - if ((active0 & 0x1200L) != 0L) - return 70; - if ((active0 & 0x2L) != 0L) - { - jjmatchedKind = 65; - return 0; - } - if ((active0 & 0x10000L) != 0L) - { - jjmatchedKind = 64; - return 26; - } - if ((active0 & 0xbe5dffbec000L) != 0L) - { - jjmatchedKind = 64; - return 35; - } - if ((active0 & 0x1a000400000L) != 0L) - { - jjmatchedKind = 64; - return 33; - } - return -1; - case 1: - if ((active0 & 0xfe5fffbfc000L) != 0L) - { - jjmatchedKind = 64; - jjmatchedPos = 1; - return 35; - } - if ((active0 & 0x1000L) != 0L) - return 6; - if ((active0 & 0x1a000000000L) != 0L) - { - jjmatchedKind = 64; - jjmatchedPos = 1; - return 32; - } - if ((active0 & 0x400000L) != 0L) - return 35; - return -1; - case 2: - if ((active0 & 0xfbeab9994000L) != 0L) - { - if (jjmatchedPos != 2) - { - jjmatchedKind = 64; - jjmatchedPos = 2; - } - return 35; - } - if ((active0 & 0x41546268000L) != 0L) - return 35; - if ((active0 & 0x1000L) != 0L) - { - if (jjmatchedPos != 2) - { - jjmatchedKind = 13; - jjmatchedPos = 2; - } - return 7; - } - return -1; - case 3: - if ((active0 & 0x1000L) != 0L) - { - if (jjmatchedPos != 3) - { - jjmatchedKind = 13; - jjmatchedPos = 3; - } - return 7; - } - if ((active0 & 0x2202308c0000L) != 0L) - return 35; - if ((active0 & 0xd9fdcd31c000L) != 0L) - { - if (jjmatchedPos != 3) - { - jjmatchedKind = 64; - jjmatchedPos = 3; - } - return 35; - } - return -1; - case 4: - if ((active0 & 0x8a021010000L) != 0L) - return 35; - if ((active0 & 0x1000L) != 0L) - { - jjmatchedKind = 13; - jjmatchedPos = 4; - return 7; - } - if ((active0 & 0xd15dcc30c000L) != 0L) - { - jjmatchedKind = 64; - jjmatchedPos = 4; - return 35; - } - return -1; - case 5: - if ((active0 & 0x411dc4308000L) != 0L) - { - jjmatchedKind = 64; - jjmatchedPos = 5; - return 35; - } - if ((active0 & 0x904008004000L) != 0L) - return 35; - if ((active0 & 0x1000L) != 0L) - return 7; - return -1; - case 6: - if ((active0 & 0x10444100000L) != 0L) - return 35; - if ((active0 & 0x401980208000L) != 0L) - { - jjmatchedKind = 64; - jjmatchedPos = 6; - return 35; - } - return -1; - case 7: - if ((active0 & 0x880000000L) != 0L) - return 35; - if ((active0 & 0x401100208000L) != 0L) - { - jjmatchedKind = 64; - jjmatchedPos = 7; - return 35; - } - return -1; - case 8: - if ((active0 & 0x1100200000L) != 0L) - { - jjmatchedKind = 64; - jjmatchedPos = 8; - return 35; - } - if ((active0 & 0x400000008000L) != 0L) - return 35; - return -1; - case 9: - if ((active0 & 0x1100000000L) != 0L) - { - jjmatchedKind = 64; - jjmatchedPos = 9; - return 35; - } - if ((active0 & 0x200000L) != 0L) - return 35; - return -1; - default : - return -1; - } -} -private final int jjStartNfa_0(int pos, long active0, long active1) -{ - return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1); -} -private final int jjStopAtPos(int pos, int kind) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - return pos + 1; -} -private final int jjStartNfaWithStates_0(int pos, int kind, int state) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_0(state, pos + 1); -} -private final int jjMoveStringLiteralDfa0_0() -{ - switch(curChar) - { - case 10: - jjmatchedKind = 9; - return jjMoveStringLiteralDfa1_0(0x1000L, 0x0L); - case 12: - return jjStopAtPos(0, 10); - case 13: - return jjStopAtPos(0, 8); - case 35: - return jjStopAtPos(0, 57); - case 36: - return jjStopAtPos(0, 60); - case 40: - return jjStopAtPos(0, 50); - case 41: - return jjStopAtPos(0, 51); - case 44: - return jjStopAtPos(0, 61); - case 47: - return jjMoveStringLiteralDfa1_0(0x2L, 0x0L); - case 58: - return jjStopAtPos(0, 62); - case 59: - return jjStopAtPos(0, 56); - case 61: - return jjStopAtPos(0, 63); - case 64: - return jjStopAtPos(0, 58); - case 91: - jjmatchedKind = 54; - return jjMoveStringLiteralDfa1_0(0x0L, 0x4L); - case 93: - return jjStopAtPos(0, 55); - case 96: - return jjStopAtPos(0, 59); - case 98: - return jjMoveStringLiteralDfa1_0(0x10000L, 0x0L); - case 99: - return jjMoveStringLiteralDfa1_0(0x30000000L, 0x0L); - case 101: - return jjMoveStringLiteralDfa1_0(0x81540a28000L, 0x0L); - case 102: - return jjMoveStringLiteralDfa1_0(0x86040000L, 0x0L); - case 103: - return jjMoveStringLiteralDfa1_0(0x100800000000L, 0x0L); - case 105: - return jjMoveStringLiteralDfa1_0(0x1a000400000L, 0x0L); - case 106: - return jjMoveStringLiteralDfa1_0(0x80000L, 0x0L); - case 109: - return jjMoveStringLiteralDfa1_0(0x4000L, 0x0L); - case 111: - return jjMoveStringLiteralDfa1_0(0x4000000000L, 0x0L); - case 112: - return jjMoveStringLiteralDfa1_0(0x400000000000L, 0x0L); - case 114: - return jjMoveStringLiteralDfa1_0(0x240008000000L, 0x0L); - case 115: - return jjMoveStringLiteralDfa1_0(0x800000100000L, 0x0L); - case 116: - return jjMoveStringLiteralDfa1_0(0x200000000L, 0x0L); - case 119: - return jjMoveStringLiteralDfa1_0(0x20001000000L, 0x0L); - case 123: - return jjStopAtPos(0, 52); - case 125: - return jjStopAtPos(0, 53); - default : - return jjMoveNfa_0(2, 0); - } -} -private final int jjMoveStringLiteralDfa1_0(long active0, long active1) -{ - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(0, active0, active1); - return 1; - } - switch(curChar) - { - case 42: - if ((active0 & 0x2L) != 0L) - return jjStopAtPos(1, 1); - break; - case 46: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x4L); - case 96: - return jjMoveStringLiteralDfa2_0(active0, 0x1000L, active1, 0L); - case 97: - return jjMoveStringLiteralDfa2_0(active0, 0x400230000000L, active1, 0L); - case 101: - return jjMoveStringLiteralDfa2_0(active0, 0x340808010000L, active1, 0L); - case 102: - if ((active0 & 0x400000L) != 0L) - return jjStartNfaWithStates_0(1, 22, 35); - break; - case 104: - return jjMoveStringLiteralDfa2_0(active0, 0x1000000L, active1, 0L); - case 105: - return jjMoveStringLiteralDfa2_0(active0, 0x820000000000L, active1, 0L); - case 108: - return jjMoveStringLiteralDfa2_0(active0, 0x800000L, active1, 0L); - case 110: - return jjMoveStringLiteralDfa2_0(active0, 0x1b540228000L, active1, 0L); - case 111: - return jjMoveStringLiteralDfa2_0(active0, 0x60c4000L, active1, 0L); - case 112: - return jjMoveStringLiteralDfa2_0(active0, 0x100000L, active1, 0L); - case 117: - return jjMoveStringLiteralDfa2_0(active0, 0x4080000000L, active1, 0L); - case 118: - return jjMoveStringLiteralDfa2_0(active0, 0x80000000000L, active1, 0L); - default : - break; - } - return jjStartNfa_0(0, active0, active1); -} -private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1) -{ - if (((active0 &= old0) | (active1 &= old1)) == 0L) - return jjStartNfa_0(0, old0, old1); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(1, active0, active1); - return 2; - } - switch(curChar) - { - case 93: - if ((active1 & 0x4L) != 0L) - return jjStopAtPos(2, 66); - break; - case 97: - return jjMoveStringLiteralDfa3_0(active0, 0x200000000000L, active1, 0L); - case 100: - if ((active0 & 0x20000L) != 0L) - { - jjmatchedKind = 17; - jjmatchedPos = 2; - } - return jjMoveStringLiteralDfa3_0(active0, 0x154020c000L, active1, 0L); - case 101: - return jjMoveStringLiteralDfa3_0(active0, 0x80000101000L, active1, 0L); - case 103: - if ((active0 & 0x40000000000L) != 0L) - return jjStartNfaWithStates_0(2, 42, 35); - return jjMoveStringLiteralDfa3_0(active0, 0x800000010000L, active1, 0L); - case 105: - return jjMoveStringLiteralDfa3_0(active0, 0x1080000L, active1, 0L); - case 110: - return jjMoveStringLiteralDfa3_0(active0, 0x100880000000L, active1, 0L); - case 111: - return jjMoveStringLiteralDfa3_0(active0, 0x8000000000L, active1, 0L); - case 112: - return jjMoveStringLiteralDfa3_0(active0, 0x2008000000L, active1, 0L); - case 114: - if ((active0 & 0x2000000L) != 0L) - { - jjmatchedKind = 25; - jjmatchedPos = 2; - } - return jjMoveStringLiteralDfa3_0(active0, 0x420004040000L, active1, 0L); - case 115: - return jjMoveStringLiteralDfa3_0(active0, 0x230800000L, active1, 0L); - case 116: - return jjMoveStringLiteralDfa3_0(active0, 0x14000000000L, active1, 0L); - default : - break; - } - return jjStartNfa_0(1, active0, active1); -} -private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1) -{ - if (((active0 &= old0) | (active1 &= old1)) == 0L) - return jjStartNfa_0(1, old0, old1); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(2, active0, 0L); - return 3; - } - switch(curChar) - { - case 97: - return jjMoveStringLiteralDfa4_0(active0, 0x400000000000L); - case 99: - return jjMoveStringLiteralDfa4_0(active0, 0xc0100000L); - case 101: - if ((active0 & 0x800000L) != 0L) - return jjStartNfaWithStates_0(3, 23, 35); - else if ((active0 & 0x10000000L) != 0L) - { - jjmatchedKind = 28; - jjmatchedPos = 3; - } - else if ((active0 & 0x20000000000L) != 0L) - return jjStartNfaWithStates_0(3, 41, 35); - return jjMoveStringLiteralDfa4_0(active0, 0x1082c000000L); - case 102: - return jjMoveStringLiteralDfa4_0(active0, 0x100000000L); - case 103: - return jjMoveStringLiteralDfa4_0(active0, 0x1000000000L); - case 105: - return jjMoveStringLiteralDfa4_0(active0, 0x10000L); - case 107: - if ((active0 & 0x40000L) != 0L) - return jjStartNfaWithStates_0(3, 18, 35); - else if ((active0 & 0x200000000L) != 0L) - return jjStartNfaWithStates_0(3, 33, 35); - break; - case 108: - if ((active0 & 0x200000000000L) != 0L) - return jjStartNfaWithStates_0(3, 45, 35); - return jjMoveStringLiteralDfa4_0(active0, 0x1001000L); - case 109: - return jjMoveStringLiteralDfa4_0(active0, 0x8000L); - case 110: - if ((active0 & 0x80000L) != 0L) - return jjStartNfaWithStates_0(3, 19, 35); - return jjMoveStringLiteralDfa4_0(active0, 0x880000000000L); - case 112: - return jjMoveStringLiteralDfa4_0(active0, 0x4000000000L); - case 115: - return jjMoveStringLiteralDfa4_0(active0, 0x200000L); - case 116: - return jjMoveStringLiteralDfa4_0(active0, 0x400000000L); - case 117: - return jjMoveStringLiteralDfa4_0(active0, 0xa000004000L); - case 118: - return jjMoveStringLiteralDfa4_0(active0, 0x100000000000L); - default : - break; - } - return jjStartNfa_0(2, active0, 0L); -} -private final int jjMoveStringLiteralDfa4_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(2, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(3, active0, 0L); - return 4; - } - switch(curChar) - { - case 97: - return jjMoveStringLiteralDfa5_0(active0, 0x100448000000L); - case 101: - if ((active0 & 0x1000000L) != 0L) - return jjStartNfaWithStates_0(4, 24, 35); - return jjMoveStringLiteralDfa5_0(active0, 0x801000000000L); - case 103: - return jjMoveStringLiteralDfa5_0(active0, 0x10000000000L); - case 105: - return jjMoveStringLiteralDfa5_0(active0, 0x100000L); - case 108: - return jjMoveStringLiteralDfa5_0(active0, 0x4000L); - case 109: - return jjMoveStringLiteralDfa5_0(active0, 0x400000000000L); - case 110: - if ((active0 & 0x10000L) != 0L) - return jjStartNfaWithStates_0(4, 16, 35); - break; - case 111: - return jjMoveStringLiteralDfa5_0(active0, 0x8000L); - case 112: - return jjMoveStringLiteralDfa5_0(active0, 0x200000L); - case 114: - return jjMoveStringLiteralDfa5_0(active0, 0x800000000L); - case 115: - return jjMoveStringLiteralDfa5_0(active0, 0x1000L); - case 116: - if ((active0 & 0x2000000000L) != 0L) - return jjStartNfaWithStates_0(4, 37, 35); - else if ((active0 & 0x8000000000L) != 0L) - return jjStartNfaWithStates_0(4, 39, 35); - else if ((active0 & 0x80000000000L) != 0L) - return jjStartNfaWithStates_0(4, 43, 35); - return jjMoveStringLiteralDfa5_0(active0, 0x80000000L); - case 117: - return jjMoveStringLiteralDfa5_0(active0, 0x4100000000L); - case 118: - return jjMoveStringLiteralDfa5_0(active0, 0x4000000L); - case 120: - if ((active0 & 0x20000000L) != 0L) - return jjStartNfaWithStates_0(4, 29, 35); - break; - default : - break; - } - return jjStartNfa_0(3, active0, 0L); -} -private final int jjMoveStringLiteralDfa5_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(3, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(4, active0, 0L); - return 5; - } - switch(curChar) - { - case 97: - return jjMoveStringLiteralDfa6_0(active0, 0x800000000L); - case 100: - if ((active0 & 0x800000000000L) != 0L) - return jjStartNfaWithStates_0(5, 47, 35); - return jjMoveStringLiteralDfa6_0(active0, 0x8000L); - case 101: - if ((active0 & 0x1000L) != 0L) - return jjStartNfaWithStates_0(5, 12, 7); - else if ((active0 & 0x4000L) != 0L) - return jjStartNfaWithStates_0(5, 14, 35); - return jjMoveStringLiteralDfa6_0(active0, 0x410004200000L); - case 102: - return jjMoveStringLiteralDfa6_0(active0, 0x100000L); - case 105: - return jjMoveStringLiteralDfa6_0(active0, 0x80000000L); - case 110: - return jjMoveStringLiteralDfa6_0(active0, 0x1100000000L); - case 114: - if ((active0 & 0x100000000000L) != 0L) - return jjStartNfaWithStates_0(5, 44, 35); - break; - case 115: - return jjMoveStringLiteralDfa6_0(active0, 0x440000000L); - case 116: - if ((active0 & 0x8000000L) != 0L) - return jjStartNfaWithStates_0(5, 27, 35); - else if ((active0 & 0x4000000000L) != 0L) - return jjStartNfaWithStates_0(5, 38, 35); - break; - default : - break; - } - return jjStartNfa_0(4, active0, 0L); -} -private final int jjMoveStringLiteralDfa6_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(4, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(5, active0, 0L); - return 6; - } - switch(curChar) - { - case 99: - return jjMoveStringLiteralDfa7_0(active0, 0x100200000L); - case 101: - if ((active0 & 0x40000000L) != 0L) - return jjStartNfaWithStates_0(6, 30, 35); - return jjMoveStringLiteralDfa7_0(active0, 0x1000000000L); - case 107: - if ((active0 & 0x400000000L) != 0L) - return jjStartNfaWithStates_0(6, 34, 35); - break; - case 111: - return jjMoveStringLiteralDfa7_0(active0, 0x80000000L); - case 114: - if ((active0 & 0x4000000L) != 0L) - return jjStartNfaWithStates_0(6, 26, 35); - else if ((active0 & 0x10000000000L) != 0L) - return jjStartNfaWithStates_0(6, 40, 35); - break; - case 116: - return jjMoveStringLiteralDfa7_0(active0, 0x400800000000L); - case 117: - return jjMoveStringLiteralDfa7_0(active0, 0x8000L); - case 121: - if ((active0 & 0x100000L) != 0L) - return jjStartNfaWithStates_0(6, 20, 35); - break; - default : - break; - } - return jjStartNfa_0(5, active0, 0L); -} -private final int jjMoveStringLiteralDfa7_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(5, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(6, active0, 0L); - return 7; - } - switch(curChar) - { - case 101: - if ((active0 & 0x800000000L) != 0L) - return jjStartNfaWithStates_0(7, 35, 35); - return jjMoveStringLiteralDfa8_0(active0, 0x400000000000L); - case 105: - return jjMoveStringLiteralDfa8_0(active0, 0x200000L); - case 108: - return jjMoveStringLiteralDfa8_0(active0, 0x8000L); - case 110: - if ((active0 & 0x80000000L) != 0L) - return jjStartNfaWithStates_0(7, 31, 35); - break; - case 114: - return jjMoveStringLiteralDfa8_0(active0, 0x1000000000L); - case 116: - return jjMoveStringLiteralDfa8_0(active0, 0x100000000L); - default : - break; - } - return jjStartNfa_0(6, active0, 0L); -} -private final int jjMoveStringLiteralDfa8_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(6, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(7, active0, 0L); - return 8; - } - switch(curChar) - { - case 97: - return jjMoveStringLiteralDfa9_0(active0, 0x1000000000L); - case 101: - if ((active0 & 0x8000L) != 0L) - return jjStartNfaWithStates_0(8, 15, 35); - break; - case 102: - return jjMoveStringLiteralDfa9_0(active0, 0x200000L); - case 105: - return jjMoveStringLiteralDfa9_0(active0, 0x100000000L); - case 114: - if ((active0 & 0x400000000000L) != 0L) - return jjStartNfaWithStates_0(8, 46, 35); - break; - default : - break; - } - return jjStartNfa_0(7, active0, 0L); -} -private final int jjMoveStringLiteralDfa9_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(7, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(8, active0, 0L); - return 9; - } - switch(curChar) - { - case 111: - return jjMoveStringLiteralDfa10_0(active0, 0x100000000L); - case 116: - return jjMoveStringLiteralDfa10_0(active0, 0x1000000000L); - case 121: - if ((active0 & 0x200000L) != 0L) - return jjStartNfaWithStates_0(9, 21, 35); - break; - default : - break; - } - return jjStartNfa_0(8, active0, 0L); -} -private final int jjMoveStringLiteralDfa10_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(8, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(9, active0, 0L); - return 10; - } - switch(curChar) - { - case 101: - if ((active0 & 0x1000000000L) != 0L) - return jjStartNfaWithStates_0(10, 36, 35); - break; - case 110: - if ((active0 & 0x100000000L) != 0L) - return jjStartNfaWithStates_0(10, 32, 35); - break; - default : - break; - } - return jjStartNfa_0(9, active0, 0L); -} -private final void jjCheckNAdd(int state) -{ - if (jjrounds[state] != jjround) - { - jjstateSet[jjnewStateCnt++] = state; - jjrounds[state] = jjround; - } -} -private final void jjAddStates(int start, int end) -{ - do { - jjstateSet[jjnewStateCnt++] = jjnextStates[start]; - } while (start++ != end); -} -private final void jjCheckNAddTwoStates(int state1, int state2) -{ - jjCheckNAdd(state1); - jjCheckNAdd(state2); -} -private final void jjCheckNAddStates(int start, int end) -{ - do { - jjCheckNAdd(jjnextStates[start]); - } while (start++ != end); -} -private final void jjCheckNAddStates(int start) -{ - jjCheckNAdd(jjnextStates[start]); - jjCheckNAdd(jjnextStates[start + 1]); -} -static final long[] jjbitVec0 = { - 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL -}; -static final long[] jjbitVec2 = { - 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL -}; -private final int jjMoveNfa_0(int startState, int curPos) -{ - int[] nextStates; - int startsAt = 0; - jjnewStateCnt = 70; - int i = 1; - jjstateSet[0] = startState; - int j, kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 33: - case 35: - if ((0x83ff408400000000L & l) == 0L) - break; - if (kind > 64) - kind = 64; - jjCheckNAdd(35); - break; - case 32: - if ((0x83ff408400000000L & l) == 0L) - break; - if (kind > 64) - kind = 64; - jjCheckNAdd(35); - break; - case 40: - if ((0x83ff408400000000L & l) == 0L) - break; - if (kind > 64) - kind = 64; - jjCheckNAdd(35); - break; - case 70: - case 4: - if (curChar == 32) - jjCheckNAddTwoStates(4, 5); - break; - case 2: - if ((0xfffffffefffffdffL & l) != 0L) - { - if (kind > 65) - kind = 65; - } - if ((0x83ff408400000000L & l) != 0L) - { - if (kind > 64) - kind = 64; - jjCheckNAdd(35); - } - else if (curChar == 10) - jjCheckNAddTwoStates(4, 5); - else if (curChar == 47) - jjstateSet[jjnewStateCnt++] = 0; - break; - case 52: - if ((0x83ff408400000000L & l) == 0L) - break; - if (kind > 64) - kind = 64; - jjCheckNAdd(35); - break; - case 26: - if ((0x83ff408400000000L & l) == 0L) - break; - if (kind > 64) - kind = 64; - jjCheckNAdd(35); - break; - case 0: - if (curChar != 47) - break; - if (kind > 11) - kind = 11; - jjCheckNAdd(1); - break; - case 1: - if ((0xfffffffffffffbffL & l) == 0L) - break; - if (kind > 11) - kind = 11; - jjCheckNAdd(1); - break; - case 3: - if (curChar == 10) - jjCheckNAddTwoStates(4, 5); - break; - case 7: - if ((0xfffffffffffffbffL & l) == 0L) - break; - if (kind > 13) - kind = 13; - jjstateSet[jjnewStateCnt++] = 7; - break; - case 36: - if ((0xfffffffefffffdffL & l) != 0L && kind > 65) - kind = 65; - break; - case 41: - if (curChar == 48 && kind > 48) - kind = 48; - break; - case 44: - if (curChar == 49 && kind > 48) - kind = 48; - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 33: - if ((0x7fffffe87fffffeL & l) != 0L) - { - if (kind > 64) - kind = 64; - jjCheckNAdd(35); - } - if (curChar == 110) - jjstateSet[jjnewStateCnt++] = 32; - break; - case 32: - if ((0x7fffffe87fffffeL & l) != 0L) - { - if (kind > 64) - kind = 64; - jjCheckNAdd(35); - } - if (curChar == 105) - jjstateSet[jjnewStateCnt++] = 31; - break; - case 40: - if ((0x7fffffe87fffffeL & l) != 0L) - { - if (kind > 64) - kind = 64; - jjCheckNAdd(35); - } - if (curChar == 114) - jjstateSet[jjnewStateCnt++] = 45; - else if (curChar == 105) - jjstateSet[jjnewStateCnt++] = 39; - if (curChar == 114) - jjstateSet[jjnewStateCnt++] = 42; - break; - case 70: - case 5: - if (curChar == 96) - jjstateSet[jjnewStateCnt++] = 6; - break; - case 2: - if (kind > 65) - kind = 65; - if ((0x7fffffe87fffffeL & l) != 0L) - { - if (kind > 64) - kind = 64; - jjCheckNAdd(35); - } - if (curChar == 97) - jjAddStates(0, 1); - else if (curChar == 112) - jjAddStates(2, 3); - else if (curChar == 116) - jjAddStates(4, 6); - else if (curChar == 105) - jjstateSet[jjnewStateCnt++] = 33; - else if (curChar == 98) - jjstateSet[jjnewStateCnt++] = 26; - else if (curChar == 100) - jjstateSet[jjnewStateCnt++] = 23; - else if (curChar == 108) - jjstateSet[jjnewStateCnt++] = 16; - break; - case 52: - if ((0x7fffffe87fffffeL & l) != 0L) - { - if (kind > 64) - kind = 64; - jjCheckNAdd(35); - } - if (curChar == 117) - jjstateSet[jjnewStateCnt++] = 58; - if (curChar == 117) - jjstateSet[jjnewStateCnt++] = 51; - break; - case 26: - if ((0x7fffffe87fffffeL & l) != 0L) - { - if (kind > 64) - kind = 64; - jjCheckNAdd(35); - } - if (curChar == 117) - jjstateSet[jjnewStateCnt++] = 25; - break; - case 1: - if (kind > 11) - kind = 11; - jjstateSet[jjnewStateCnt++] = 1; - break; - case 6: - if ((0x7fffffe00000000L & l) == 0L) - break; - if (kind > 13) - kind = 13; - jjCheckNAdd(7); - break; - case 7: - if (kind > 13) - kind = 13; - jjCheckNAdd(7); - break; - case 8: - if (curChar == 109 && kind > 48) - kind = 48; - break; - case 9: - case 18: - if (curChar == 97) - jjCheckNAdd(8); - break; - case 10: - if (curChar == 114) - jjstateSet[jjnewStateCnt++] = 9; - break; - case 11: - if (curChar == 97) - jjstateSet[jjnewStateCnt++] = 10; - break; - case 12: - if (curChar == 112) - jjstateSet[jjnewStateCnt++] = 11; - break; - case 13: - if (curChar == 108) - jjstateSet[jjnewStateCnt++] = 12; - break; - case 14: - if (curChar == 97) - jjstateSet[jjnewStateCnt++] = 13; - break; - case 15: - if (curChar == 99) - jjstateSet[jjnewStateCnt++] = 14; - break; - case 16: - if (curChar == 111) - jjstateSet[jjnewStateCnt++] = 15; - break; - case 17: - if (curChar == 108) - jjstateSet[jjnewStateCnt++] = 16; - break; - case 19: - if (curChar == 114) - jjstateSet[jjnewStateCnt++] = 18; - break; - case 20: - if (curChar == 97) - jjstateSet[jjnewStateCnt++] = 19; - break; - case 21: - if (curChar == 112) - jjstateSet[jjnewStateCnt++] = 20; - break; - case 22: - if (curChar == 102) - jjstateSet[jjnewStateCnt++] = 21; - break; - case 23: - if (curChar == 101) - jjstateSet[jjnewStateCnt++] = 22; - break; - case 24: - if (curChar == 100) - jjstateSet[jjnewStateCnt++] = 23; - break; - case 25: - if (curChar == 102 && kind > 48) - kind = 48; - break; - case 27: - if (curChar == 98) - jjstateSet[jjnewStateCnt++] = 26; - break; - case 28: - if (curChar == 108 && kind > 49) - kind = 49; - break; - case 29: - if (curChar == 97) - jjstateSet[jjnewStateCnt++] = 28; - break; - case 30: - if (curChar == 105) - jjstateSet[jjnewStateCnt++] = 29; - break; - case 31: - if (curChar == 116) - jjstateSet[jjnewStateCnt++] = 30; - break; - case 34: - if (curChar == 105) - jjstateSet[jjnewStateCnt++] = 33; - break; - case 35: - if ((0x7fffffe87fffffeL & l) == 0L) - break; - if (kind > 64) - kind = 64; - jjCheckNAdd(35); - break; - case 36: - if (kind > 65) - kind = 65; - break; - case 37: - if (curChar == 116) - jjAddStates(4, 6); - break; - case 38: - if (curChar == 101 && kind > 48) - kind = 48; - break; - case 39: - if (curChar == 109) - jjstateSet[jjnewStateCnt++] = 38; - break; - case 42: - if (curChar == 105) - jjstateSet[jjnewStateCnt++] = 41; - break; - case 43: - if (curChar == 114) - jjstateSet[jjnewStateCnt++] = 42; - break; - case 45: - if (curChar == 105) - jjstateSet[jjnewStateCnt++] = 44; - break; - case 46: - if (curChar == 114) - jjstateSet[jjnewStateCnt++] = 45; - break; - case 47: - if (curChar == 112) - jjAddStates(2, 3); - break; - case 48: - if (curChar == 112 && kind > 48) - kind = 48; - break; - case 49: - if (curChar == 117) - jjstateSet[jjnewStateCnt++] = 48; - break; - case 50: - if (curChar == 108) - jjstateSet[jjnewStateCnt++] = 49; - break; - case 51: - if (curChar == 108) - jjstateSet[jjnewStateCnt++] = 50; - break; - case 53: - if (curChar == 110 && kind > 48) - kind = 48; - break; - case 54: - if (curChar == 119) - jjCheckNAdd(53); - break; - case 55: - if (curChar == 111) - jjstateSet[jjnewStateCnt++] = 54; - break; - case 56: - if (curChar == 100) - jjstateSet[jjnewStateCnt++] = 55; - break; - case 57: - if (curChar == 108) - jjstateSet[jjnewStateCnt++] = 56; - break; - case 58: - if (curChar == 108) - jjstateSet[jjnewStateCnt++] = 57; - break; - case 59: - if (curChar == 117) - jjstateSet[jjnewStateCnt++] = 58; - break; - case 60: - if (curChar == 97) - jjAddStates(0, 1); - break; - case 61: - if (curChar == 103) - jjCheckNAdd(53); - break; - case 62: - if (curChar == 105) - jjstateSet[jjnewStateCnt++] = 61; - break; - case 63: - if (curChar == 115) - jjstateSet[jjnewStateCnt++] = 62; - break; - case 64: - if (curChar == 115) - jjstateSet[jjnewStateCnt++] = 63; - break; - case 65: - if (curChar == 115 && kind > 49) - kind = 49; - break; - case 66: - if (curChar == 121) - jjstateSet[jjnewStateCnt++] = 65; - break; - case 67: - if (curChar == 97) - jjstateSet[jjnewStateCnt++] = 66; - break; - case 68: - if (curChar == 119) - jjstateSet[jjnewStateCnt++] = 67; - break; - case 69: - if (curChar == 108) - jjstateSet[jjnewStateCnt++] = 68; - break; - default : break; - } - } while(i != startsAt); - } - else - { - int hiByte = (int)(curChar >> 8); - int i1 = hiByte >> 6; - long l1 = 1L << (hiByte & 077); - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - MatchLoop: do - { - switch(jjstateSet[--i]) - { - case 2: - if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 65) - kind = 65; - break; - case 1: - if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) - break; - if (kind > 11) - kind = 11; - jjstateSet[jjnewStateCnt++] = 1; - break; - case 7: - if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) - break; - if (kind > 13) - kind = 13; - jjstateSet[jjnewStateCnt++] = 7; - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 70 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -private final int jjMoveStringLiteralDfa0_1() -{ - switch(curChar) - { - case 42: - return jjMoveStringLiteralDfa1_1(0x4L); - default : - return 1; - } -} -private final int jjMoveStringLiteralDfa1_1(long active0) -{ - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - return 1; - } - switch(curChar) - { - case 47: - if ((active0 & 0x4L) != 0L) - return jjStopAtPos(1, 2); - break; - default : - return 2; - } - return 2; -} -private final int jjMoveStringLiteralDfa0_2() -{ - switch(curChar) - { - case 96: - return jjMoveStringLiteralDfa1_2(0x10L); - default : - return 1; - } -} -private final int jjMoveStringLiteralDfa1_2(long active0) -{ - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - return 1; - } - switch(curChar) - { - case 101: - return jjMoveStringLiteralDfa2_2(active0, 0x10L); - default : - return 2; - } -} -private final int jjMoveStringLiteralDfa2_2(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return 2; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - return 2; - } - switch(curChar) - { - case 110: - return jjMoveStringLiteralDfa3_2(active0, 0x10L); - default : - return 3; - } -} -private final int jjMoveStringLiteralDfa3_2(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return 3; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - return 3; - } - switch(curChar) - { - case 100: - return jjMoveStringLiteralDfa4_2(active0, 0x10L); - default : - return 4; - } -} -private final int jjMoveStringLiteralDfa4_2(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return 4; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - return 4; - } - switch(curChar) - { - case 105: - return jjMoveStringLiteralDfa5_2(active0, 0x10L); - default : - return 5; - } -} -private final int jjMoveStringLiteralDfa5_2(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return 5; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - return 5; - } - switch(curChar) - { - case 102: - if ((active0 & 0x10L) != 0L) - return jjStopAtPos(5, 4); - break; - default : - return 6; - } - return 6; -} -static final int[] jjnextStates = { - 64, 69, 52, 59, 40, 43, 46, -}; -private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) -{ - switch(hiByte) - { - case 0: - return ((jjbitVec2[i2] & l2) != 0L); - default : - if ((jjbitVec0[i1] & l1) != 0L) - return true; - return false; - } -} -public static final String[] jjstrLiteralImages = { -"", null, null, null, null, null, null, null, null, null, null, null, null, -null, "\155\157\144\165\154\145", "\145\156\144\155\157\144\165\154\145", -"\142\145\147\151\156", "\145\156\144", "\146\157\162\153", "\152\157\151\156", -"\163\160\145\143\151\146\171", "\145\156\144\163\160\145\143\151\146\171", "\151\146", "\145\154\163\145", -"\167\150\151\154\145", "\146\157\162", "\146\157\162\145\166\145\162", "\162\145\160\145\141\164", -"\143\141\163\145", "\143\141\163\145\170", "\145\156\144\143\141\163\145", -"\146\165\156\143\164\151\157\156", "\145\156\144\146\165\156\143\164\151\157\156", "\164\141\163\153", -"\145\156\144\164\141\163\153", "\147\145\156\145\162\141\164\145", -"\145\156\144\147\145\156\145\162\141\164\145", "\151\156\160\165\164", "\157\165\164\160\165\164", "\151\156\157\165\164", -"\151\156\164\145\147\145\162", "\167\151\162\145", "\162\145\147", "\145\166\145\156\164", -"\147\145\156\166\141\162", "\162\145\141\154", "\160\141\162\141\155\145\164\145\162", -"\163\151\147\156\145\144", null, null, "\50", "\51", "\173", "\175", "\133", "\135", "\73", "\43", -"\100", "\140", "\44", "\54", "\72", "\75", null, null, "\133\56\135", }; -public static final String[] lexStateNames = { - "DEFAULT", - "IN_MULTI_LINE_COMMENT", - "IN_ELSE_BLOCK", -}; -public static final int[] jjnewLexState = { - -1, 1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -}; -static final long[] jjtoToken = { - 0xffffffffffffc001L, 0x7L, -}; -static final long[] jjtoSkip = { - 0x3fd4L, 0x0L, -}; -static final long[] jjtoSpecial = { - 0x3800L, 0x0L, -}; -static final long[] jjtoMore = { - 0x2aL, 0x0L, -}; -protected JavaCharStream input_stream; -private final int[] jjrounds = new int[70]; -private final int[] jjstateSet = new int[140]; -StringBuffer image; -int jjimageLen; -int lengthOfMatch; -protected char curChar; -public VerilogParserCoreTokenManager(JavaCharStream stream){ - if (JavaCharStream.staticFlag) - throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); - input_stream = stream; -} -public VerilogParserCoreTokenManager(JavaCharStream stream, int lexState){ - this(stream); - SwitchTo(lexState); -} -public void ReInit(JavaCharStream stream) -{ - jjmatchedPos = jjnewStateCnt = 0; - curLexState = defaultLexState; - input_stream = stream; - ReInitRounds(); -} -private final void ReInitRounds() -{ - int i; - jjround = 0x80000001; - for (i = 70; i-- > 0;) - jjrounds[i] = 0x80000000; -} -public void ReInit(JavaCharStream stream, int lexState) -{ - ReInit(stream); - SwitchTo(lexState); -} -public void SwitchTo(int lexState) -{ - if (lexState >= 3 || lexState < 0) - throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); - else - curLexState = lexState; -} - -protected Token jjFillToken() -{ - Token t = Token.newToken(jjmatchedKind); - t.kind = jjmatchedKind; - String im = jjstrLiteralImages[jjmatchedKind]; - t.image = (im == null) ? input_stream.GetImage() : im; - t.beginLine = input_stream.getBeginLine(); - t.beginColumn = input_stream.getBeginColumn(); - t.endLine = input_stream.getEndLine(); - t.endColumn = input_stream.getEndColumn(); - return t; -} - -int curLexState = 0; -int defaultLexState = 0; -int jjnewStateCnt; -int jjround; -int jjmatchedPos; -int jjmatchedKind; - -public Token getNextToken() -{ - int kind; - Token specialToken = null; - Token matchedToken; - int curPos = 0; - - EOFLoop : - for (;;) - { - try - { - curChar = input_stream.BeginToken(); - } - catch(java.io.IOException e) - { - jjmatchedKind = 0; - matchedToken = jjFillToken(); - matchedToken.specialToken = specialToken; - return matchedToken; - } - image = null; - jjimageLen = 0; - - for (;;) - { - switch(curLexState) - { - case 0: - try { input_stream.backup(0); - while (curChar <= 32 && (0x100000200L & (1L << curChar)) != 0L) - curChar = input_stream.BeginToken(); - } - catch (java.io.IOException e1) { continue EOFLoop; } - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_0(); - break; - case 1: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_1(); - if (jjmatchedPos == 0 && jjmatchedKind > 3) - { - jjmatchedKind = 3; - } - break; - case 2: - jjmatchedKind = 0x7fffffff; - jjmatchedPos = 0; - curPos = jjMoveStringLiteralDfa0_2(); - if (jjmatchedPos == 0 && jjmatchedKind > 5) - { - jjmatchedKind = 5; - } - break; - } - if (jjmatchedKind != 0x7fffffff) - { - if (jjmatchedPos + 1 < curPos) - input_stream.backup(curPos - jjmatchedPos - 1); - if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) - { - matchedToken = jjFillToken(); - matchedToken.specialToken = specialToken; - if (jjnewLexState[jjmatchedKind] != -1) - curLexState = jjnewLexState[jjmatchedKind]; - return matchedToken; - } - else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) - { - if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) - { - matchedToken = jjFillToken(); - if (specialToken == null) - specialToken = matchedToken; - else - { - matchedToken.specialToken = specialToken; - specialToken = (specialToken.next = matchedToken); - } - SkipLexicalActions(matchedToken); - } - else - SkipLexicalActions(null); - if (jjnewLexState[jjmatchedKind] != -1) - curLexState = jjnewLexState[jjmatchedKind]; - continue EOFLoop; - } - jjimageLen += jjmatchedPos + 1; - if (jjnewLexState[jjmatchedKind] != -1) - curLexState = jjnewLexState[jjmatchedKind]; - curPos = 0; - jjmatchedKind = 0x7fffffff; - try { - curChar = input_stream.readChar(); - continue; - } - catch (java.io.IOException e1) { } - } - int error_line = input_stream.getEndLine(); - int error_column = input_stream.getEndColumn(); - String error_after = null; - boolean EOFSeen = false; - try { input_stream.readChar(); input_stream.backup(1); } - catch (java.io.IOException e1) { - EOFSeen = true; - error_after = curPos <= 1 ? "" : input_stream.GetImage(); - if (curChar == '\n' || curChar == '\r') { - error_line++; - error_column = 0; - } - else - error_column++; - } - if (!EOFSeen) { - input_stream.backup(1); - error_after = curPos <= 1 ? "" : input_stream.GetImage(); - } - throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); - } - } -} - -void SkipLexicalActions(Token matchedToken) -{ - switch(jjmatchedKind) - { - default : - break; - } -} -} +/* VerilogParserCoreTokenManager.java */ +/* Generated By:JavaCC: Do not edit this line. VerilogParserCoreTokenManager.java */ +package com.elphel.vdt.veditor.parser.verilog; + +/** Token Manager. */ +@SuppressWarnings("unused")public class VerilogParserCoreTokenManager implements VerilogParserCoreConstants { + + /** Debug output. */ + public java.io.PrintStream debugStream = System.out; + /** Set debug output. */ + public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } +private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1, long active2){ + switch (pos) + { + case 0: + if ((active0 & 0x1000002000020000L) != 0L) + { + jjmatchedKind = 123; + return 194; + } + if ((active0 & 0x2L) != 0L || (active1 & 0x80000000000L) != 0L) + return 3; + if ((active0 & 0x100000000000000L) != 0L || (active1 & 0x2L) != 0L) + { + jjmatchedKind = 123; + return 62; + } + if ((active0 & 0x2802200040000000L) != 0L) + { + jjmatchedKind = 123; + return 149; + } + if ((active1 & 0x2000L) != 0L) + return 0; + if ((active0 & 0x400088000000L) != 0L) + { + jjmatchedKind = 123; + return 242; + } + if ((active0 & 0x10000000800000L) != 0L) + { + jjmatchedKind = 123; + return 223; + } + if ((active0 & 0x80000L) != 0L) + { + jjmatchedKind = 123; + return 137; + } + if ((active1 & 0x400000L) != 0L) + return 12; + if ((active0 & 0x24000000008000L) != 0L) + { + jjmatchedKind = 123; + return 90; + } + if ((active0 & 0xc6499fde37756000L) != 0L || (active1 & 0x5L) != 0L) + { + jjmatchedKind = 123; + return 8; + } + return -1; + case 1: + if ((active0 & 0x100000000000000L) != 0L) + { + if (jjmatchedPos != 1) + { + jjmatchedKind = 123; + jjmatchedPos = 1; + } + return 61; + } + if ((active0 & 0x8000000002000000L) != 0L) + return 8; + if ((active0 & 0x80000000L) != 0L) + { + if (jjmatchedPos != 1) + { + jjmatchedKind = 123; + jjmatchedPos = 1; + } + return 241; + } + if ((active0 & 0x7e7ffffe7dffe000L) != 0L || (active1 & 0x7L) != 0L) + { + if (jjmatchedPos != 1) + { + jjmatchedKind = 123; + jjmatchedPos = 1; + } + return 8; + } + return -1; + case 2: + if ((active0 & 0x7a3fdeaacccaa000L) != 0L || (active1 & 0x7L) != 0L) + { + if (jjmatchedPos != 2) + { + jjmatchedKind = 123; + jjmatchedPos = 2; + } + return 8; + } + if ((active0 & 0x100000000000000L) != 0L) + { + if (jjmatchedPos != 2) + { + jjmatchedKind = 123; + jjmatchedPos = 2; + } + return 60; + } + if ((active0 & 0x440215431354000L) != 0L) + return 8; + return -1; + case 3: + if ((active0 & 0x4f7d9fde698fe000L) != 0L || (active1 & 0x7L) != 0L) + { + if (jjmatchedPos != 3) + { + jjmatchedKind = 123; + jjmatchedPos = 3; + } + return 8; + } + if ((active0 & 0x3002402084600000L) != 0L) + return 8; + return -1; + case 4: + if ((active0 & 0x6b7d15de6185e000L) != 0L || (active1 & 0x7L) != 0L) + { + jjmatchedKind = 123; + jjmatchedPos = 4; + return 8; + } + if ((active0 & 0x4008a00080a0000L) != 0L) + return 8; + return -1; + case 5: + if ((active0 & 0x6a6c11de2185c000L) != 0L || (active1 & 0x5L) != 0L) + { + jjmatchedKind = 123; + jjmatchedPos = 5; + return 8; + } + if ((active0 & 0x111040040002000L) != 0L || (active1 & 0x2L) != 0L) + return 8; + return -1; + case 6: + if ((active0 & 0x626c01980105c000L) != 0L) + { + jjmatchedKind = 123; + jjmatchedPos = 6; + return 8; + } + if ((active0 & 0x800104620800000L) != 0L || (active1 & 0x5L) != 0L) + return 8; + return -1; + case 7: + if ((active0 & 0x4c01100101c000L) != 0L) + { + jjmatchedKind = 123; + jjmatchedPos = 7; + return 8; + } + if ((active0 & 0x6220008800040000L) != 0L) + return 8; + return -1; + case 8: + if ((active0 & 0x48011001010000L) != 0L) + { + jjmatchedKind = 123; + jjmatchedPos = 8; + return 8; + } + if ((active0 & 0x400000000c000L) != 0L) + return 8; + return -1; + case 9: + if ((active0 & 0x8000001000000L) != 0L) + return 8; + if ((active0 & 0x40011000010000L) != 0L) + { + jjmatchedKind = 123; + jjmatchedPos = 9; + return 8; + } + return -1; + case 10: + if ((active0 & 0x10000L) != 0L) + { + jjmatchedKind = 123; + jjmatchedPos = 10; + return 8; + } + if ((active0 & 0x40011000000000L) != 0L) + return 8; + return -1; + default : + return -1; + } +} +private final int jjStartNfa_0(int pos, long active0, long active1, long active2){ + return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1, active2), pos + 1); +} +private int jjStopAtPos(int pos, int kind) +{ + jjmatchedKind = kind; + jjmatchedPos = pos; + return pos + 1; +} +private int jjMoveStringLiteralDfa0_0(){ + switch(curChar) + { + case 33: + jjmatchedKind = 92; + return jjMoveStringLiteralDfa1_0(0x0L, 0x80002000000000L, 0x0L); + case 35: + return jjStopAtPos(0, 84); + case 36: + return jjStartNfaWithStates_0(0, 86, 12); + case 37: + return jjStopAtPos(0, 111); + case 38: + jjmatchedKind = 108; + return jjMoveStringLiteralDfa1_0(0x0L, 0x8000000000L, 0x0L); + case 40: + return jjStartNfaWithStates_0(0, 77, 0); + case 41: + return jjStopAtPos(0, 78); + case 42: + jjmatchedKind = 106; + return jjMoveStringLiteralDfa1_0(0x0L, 0x100000000000000L, 0x0L); + case 43: + jjmatchedKind = 104; + return jjMoveStringLiteralDfa1_0(0x0L, 0x100000000L, 0x0L); + case 44: + return jjStopAtPos(0, 87); + case 45: + jjmatchedKind = 105; + return jjMoveStringLiteralDfa1_0(0x0L, 0x200000000L, 0x80L); + case 46: + return jjStopAtPos(0, 88); + case 47: + jjmatchedKind = 107; + return jjMoveStringLiteralDfa1_0(0x2L, 0x0L, 0x0L); + case 58: + return jjStopAtPos(0, 95); + case 59: + return jjStopAtPos(0, 83); + case 60: + jjmatchedKind = 91; + return jjMoveStringLiteralDfa1_0(0x0L, 0x201000800000000L, 0x0L); + case 61: + jjmatchedKind = 89; + return jjMoveStringLiteralDfa1_0(0x0L, 0x40000400000000L, 0x0L); + case 62: + jjmatchedKind = 90; + return jjMoveStringLiteralDfa1_0(0x0L, 0x402001000000000L, 0x0L); + case 63: + return jjStopAtPos(0, 94); + case 64: + return jjStopAtPos(0, 85); + case 91: + return jjStopAtPos(0, 81); + case 93: + return jjStopAtPos(0, 82); + case 94: + jjmatchedKind = 110; + return jjMoveStringLiteralDfa1_0(0x0L, 0x20000000000000L, 0x0L); + case 97: + return jjMoveStringLiteralDfa1_0(0x100000000000000L, 0x2L, 0x0L); + case 98: + return jjMoveStringLiteralDfa1_0(0x80000L, 0x0L, 0x0L); + case 100: + return jjMoveStringLiteralDfa1_0(0x4200000200000000L, 0x1L, 0x0L); + case 101: + return jjMoveStringLiteralDfa1_0(0x40815405154000L, 0x0L, 0x0L); + case 102: + return jjMoveStringLiteralDfa1_0(0x400000830200000L, 0x0L, 0x0L); + case 103: + return jjMoveStringLiteralDfa1_0(0x1008000000000L, 0x0L, 0x0L); + case 105: + return jjMoveStringLiteralDfa1_0(0x1a0002000000L, 0x4L, 0x0L); + case 106: + return jjMoveStringLiteralDfa1_0(0x400000L, 0x0L, 0x0L); + case 108: + return jjMoveStringLiteralDfa1_0(0x8000000000000L, 0x0L, 0x0L); + case 109: + return jjMoveStringLiteralDfa1_0(0x2000L, 0x0L, 0x0L); + case 111: + return jjMoveStringLiteralDfa1_0(0x8000040000000000L, 0x0L, 0x0L); + case 112: + return jjMoveStringLiteralDfa1_0(0x24000000008000L, 0x0L, 0x0L); + case 114: + return jjMoveStringLiteralDfa1_0(0x2802200040000000L, 0x0L, 0x0L); + case 115: + return jjMoveStringLiteralDfa1_0(0x10000000800000L, 0x0L, 0x0L); + case 116: + return jjMoveStringLiteralDfa1_0(0x1000002000020000L, 0x0L, 0x0L); + case 119: + return jjMoveStringLiteralDfa1_0(0x400088000000L, 0x0L, 0x0L); + case 123: + return jjStopAtPos(0, 79); + case 124: + jjmatchedKind = 109; + return jjMoveStringLiteralDfa1_0(0x0L, 0x4000000000L, 0x0L); + case 125: + return jjStopAtPos(0, 80); + case 126: + jjmatchedKind = 93; + return jjMoveStringLiteralDfa1_0(0x0L, 0x1c000000000000L, 0x0L); + default : + return jjMoveNfa_0(2, 0); + } +} +private int jjMoveStringLiteralDfa1_0(long active0, long active1, long active2){ + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(0, active0, active1, active2); + return 1; + } + switch(curChar) + { + case 38: + if ((active1 & 0x8000000000L) != 0L) + return jjStopAtPos(1, 103); + else if ((active1 & 0x4000000000000L) != 0L) + return jjStopAtPos(1, 114); + break; + case 42: + if ((active0 & 0x2L) != 0L) + return jjStopAtPos(1, 1); + else if ((active1 & 0x100000000000000L) != 0L) + return jjStopAtPos(1, 120); + break; + case 58: + if ((active1 & 0x100000000L) != 0L) + return jjStopAtPos(1, 96); + else if ((active1 & 0x200000000L) != 0L) + return jjStopAtPos(1, 97); + break; + case 60: + if ((active1 & 0x1000000000000L) != 0L) + { + jjmatchedKind = 112; + jjmatchedPos = 1; + } + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x200000000000000L, active2, 0L); + case 61: + if ((active1 & 0x400000000L) != 0L) + { + jjmatchedKind = 98; + jjmatchedPos = 1; + } + else if ((active1 & 0x800000000L) != 0L) + return jjStopAtPos(1, 99); + else if ((active1 & 0x1000000000L) != 0L) + return jjStopAtPos(1, 100); + else if ((active1 & 0x2000000000L) != 0L) + { + jjmatchedKind = 101; + jjmatchedPos = 1; + } + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0xc0000000000000L, active2, 0L); + case 62: + if ((active1 & 0x2000000000000L) != 0L) + { + jjmatchedKind = 113; + jjmatchedPos = 1; + } + else if ((active2 & 0x80L) != 0L) + return jjStopAtPos(1, 135); + return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x400000000000000L, active2, 0L); + case 94: + if ((active1 & 0x10000000000000L) != 0L) + return jjStopAtPos(1, 116); + break; + case 97: + return jjMoveStringLiteralDfa2_0(active0, 0x4002080020000L, active1, 0L, active2, 0L); + case 101: + return jjMoveStringLiteralDfa2_0(active0, 0x6a03208240080000L, active1, 0L, active2, 0L); + case 102: + if ((active0 & 0x2000000L) != 0L) + return jjStartNfaWithStates_0(1, 25, 8); + break; + case 104: + return jjMoveStringLiteralDfa2_0(active0, 0x8000000L, active1, 0L, active2, 0L); + case 105: + return jjMoveStringLiteralDfa2_0(active0, 0x1010400000000000L, active1, 0x1L, active2, 0L); + case 108: + return jjMoveStringLiteralDfa2_0(active0, 0x4000000L, active1, 0x2L, active2, 0L); + case 110: + return jjMoveStringLiteralDfa2_0(active0, 0x401b5401154000L, active1, 0x4L, active2, 0L); + case 111: + return jjMoveStringLiteralDfa2_0(active0, 0x408000030602000L, active1, 0L, active2, 0L); + case 112: + return jjMoveStringLiteralDfa2_0(active0, 0x800000L, active1, 0L, active2, 0L); + case 114: + if ((active0 & 0x8000000000000000L) != 0L) + return jjStartNfaWithStates_0(1, 63, 8); + return jjMoveStringLiteralDfa2_0(active0, 0x20000000008000L, active1, 0L, active2, 0L); + case 115: + return jjMoveStringLiteralDfa2_0(active0, 0x100000000000000L, active1, 0L, active2, 0L); + case 117: + return jjMoveStringLiteralDfa2_0(active0, 0x40800000000L, active1, 0L, active2, 0L); + case 118: + return jjMoveStringLiteralDfa2_0(active0, 0x800000000000L, active1, 0L, active2, 0L); + case 124: + if ((active1 & 0x4000000000L) != 0L) + return jjStopAtPos(1, 102); + else if ((active1 & 0x8000000000000L) != 0L) + return jjStopAtPos(1, 115); + break; + case 126: + if ((active1 & 0x20000000000000L) != 0L) + return jjStopAtPos(1, 117); + break; + default : + break; + } + return jjStartNfa_0(0, active0, active1, active2); +} +private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1, long old2, long active2){ + if (((active0 &= old0) | (active1 &= old1) | (active2 &= old2)) == 0L) + return jjStartNfa_0(0, old0, old1, old2); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(1, active0, active1, 0L); + return 2; + } + switch(curChar) + { + case 60: + if ((active1 & 0x200000000000000L) != 0L) + return jjStopAtPos(2, 121); + break; + case 61: + if ((active1 & 0x40000000000000L) != 0L) + return jjStopAtPos(2, 118); + else if ((active1 & 0x80000000000000L) != 0L) + return jjStopAtPos(2, 119); + break; + case 62: + if ((active1 & 0x400000000000000L) != 0L) + return jjStopAtPos(2, 122); + break; + case 97: + return jjMoveStringLiteralDfa3_0(active0, 0x2202000000000000L, active1, 0L); + case 98: + return jjMoveStringLiteralDfa3_0(active0, 0x20000L, active1, 0L); + case 99: + return jjMoveStringLiteralDfa3_0(active0, 0x8000000000000L, active1, 0L); + case 100: + if ((active0 & 0x100000L) != 0L) + { + jjmatchedKind = 20; + jjmatchedPos = 2; + } + return jjMoveStringLiteralDfa3_0(active0, 0x40015401056000L, active1, 0L); + case 101: + return jjMoveStringLiteralDfa3_0(active0, 0x800000800000L, active1, 0L); + case 102: + return jjMoveStringLiteralDfa3_0(active0, 0x4000000200000000L, active1, 0L); + case 103: + if ((active0 & 0x200000000000L) != 0L) + return jjStartNfaWithStates_0(2, 45, 8); + return jjMoveStringLiteralDfa3_0(active0, 0x10000000080000L, active1, 0L); + case 105: + return jjMoveStringLiteralDfa3_0(active0, 0x88408000L, active1, 0x4L); + case 108: + return jjMoveStringLiteralDfa3_0(active0, 0x800000000000000L, active1, 0L); + case 109: + return jjMoveStringLiteralDfa3_0(active0, 0x1000000000000000L, active1, 0L); + case 110: + return jjMoveStringLiteralDfa3_0(active0, 0x1008800000000L, active1, 0L); + case 111: + return jjMoveStringLiteralDfa3_0(active0, 0x20080000000000L, active1, 0L); + case 112: + return jjMoveStringLiteralDfa3_0(active0, 0x20040000000L, active1, 0L); + case 114: + if ((active0 & 0x10000000L) != 0L) + { + jjmatchedKind = 28; + jjmatchedPos = 2; + } + return jjMoveStringLiteralDfa3_0(active0, 0x404400020200000L, active1, 0L); + case 115: + return jjMoveStringLiteralDfa3_0(active0, 0x100002004000000L, active1, 0x1L); + case 116: + return jjMoveStringLiteralDfa3_0(active0, 0x140000000000L, active1, 0L); + case 119: + return jjMoveStringLiteralDfa3_0(active0, 0L, active1, 0x2L); + default : + break; + } + return jjStartNfa_0(1, active0, active1, 0L); +} +private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1){ + if (((active0 &= old0) | (active1 &= old1)) == 0L) + return jjStartNfa_0(1, old0, old1, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(2, active0, active1, 0L); + return 3; + } + switch(curChar) + { + case 97: + return jjMoveStringLiteralDfa4_0(active0, 0xc000200000000L, active1, 0x3L); + case 99: + return jjMoveStringLiteralDfa4_0(active0, 0x400000c00800000L, active1, 0L); + case 101: + if ((active0 & 0x4000000L) != 0L) + return jjStartNfaWithStates_0(3, 26, 8); + else if ((active0 & 0x400000000000L) != 0L) + return jjStartNfaWithStates_0(3, 46, 8); + else if ((active0 & 0x1000000000000000L) != 0L) + return jjStartNfaWithStates_0(3, 60, 8); + return jjMoveStringLiteralDfa4_0(active0, 0x800108060000000L, active1, 0L); + case 102: + return jjMoveStringLiteralDfa4_0(active0, 0x1000000000L, active1, 0L); + case 103: + return jjMoveStringLiteralDfa4_0(active0, 0x10000000000L, active1, 0L); + case 105: + return jjMoveStringLiteralDfa4_0(active0, 0x100000000080000L, active1, 0L); + case 107: + if ((active0 & 0x200000L) != 0L) + return jjStartNfaWithStates_0(3, 21, 8); + else if ((active0 & 0x2000000000L) != 0L) + return jjStartNfaWithStates_0(3, 37, 8); + break; + case 108: + if ((active0 & 0x2000000000000L) != 0L) + { + jjmatchedKind = 49; + jjmatchedPos = 3; + } + return jjMoveStringLiteralDfa4_0(active0, 0x2000000008020000L, active1, 0L); + case 109: + return jjMoveStringLiteralDfa4_0(active0, 0xc000L, active1, 0L); + case 110: + if ((active0 & 0x400000L) != 0L) + return jjStartNfaWithStates_0(3, 22, 8); + return jjMoveStringLiteralDfa4_0(active0, 0x10800000000000L, active1, 0L); + case 112: + return jjMoveStringLiteralDfa4_0(active0, 0x4060040000010000L, active1, 0L); + case 115: + return jjMoveStringLiteralDfa4_0(active0, 0x200000001000000L, active1, 0L); + case 116: + if ((active0 & 0x80000000L) != 0L) + return jjStartNfaWithStates_0(3, 31, 8); + return jjMoveStringLiteralDfa4_0(active0, 0x4000040000L, active1, 0x4L); + case 117: + return jjMoveStringLiteralDfa4_0(active0, 0xa0000002000L, active1, 0L); + case 118: + return jjMoveStringLiteralDfa4_0(active0, 0x1000000000000L, active1, 0L); + default : + break; + } + return jjStartNfa_0(2, active0, active1, 0L); +} +private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1){ + if (((active0 &= old0) | (active1 &= old1)) == 0L) + return jjStartNfa_0(2, old0, old1, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(3, active0, active1, 0L); + return 4; + } + switch(curChar) + { + case 97: + return jjMoveStringLiteralDfa5_0(active0, 0x4801004440040000L, active1, 0L); + case 98: + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x1L); + case 101: + if ((active0 & 0x20000L) != 0L) + return jjStartNfaWithStates_0(4, 17, 8); + else if ((active0 & 0x8000000L) != 0L) + return jjStartNfaWithStates_0(4, 27, 8); + else if ((active0 & 0x400000000000000L) != 0L) + return jjStartNfaWithStates_0(4, 58, 8); + return jjMoveStringLiteralDfa5_0(active0, 0x30010000000000L, active1, 0L); + case 103: + return jjMoveStringLiteralDfa5_0(active0, 0x100100000000000L, active1, 0L); + case 105: + return jjMoveStringLiteralDfa5_0(active0, 0x808000L, active1, 0x4L); + case 108: + return jjMoveStringLiteralDfa5_0(active0, 0x8000000002000L, active1, 0L); + case 109: + return jjMoveStringLiteralDfa5_0(active0, 0x4000000000000L, active1, 0L); + case 110: + if ((active0 & 0x80000L) != 0L) + return jjStartNfaWithStates_0(4, 19, 8); + break; + case 111: + return jjMoveStringLiteralDfa5_0(active0, 0x4000L, active1, 0L); + case 112: + return jjMoveStringLiteralDfa5_0(active0, 0x1000000L, active1, 0L); + case 114: + return jjMoveStringLiteralDfa5_0(active0, 0x40008000010000L, active1, 0L); + case 115: + return jjMoveStringLiteralDfa5_0(active0, 0x200000000000000L, active1, 0L); + case 116: + if ((active0 & 0x20000000000L) != 0L) + return jjStartNfaWithStates_0(4, 41, 8); + else if ((active0 & 0x80000000000L) != 0L) + return jjStartNfaWithStates_0(4, 43, 8); + else if ((active0 & 0x800000000000L) != 0L) + return jjStartNfaWithStates_0(4, 47, 8); + return jjMoveStringLiteralDfa5_0(active0, 0x2000000800000000L, active1, 0L); + case 117: + return jjMoveStringLiteralDfa5_0(active0, 0x41200000000L, active1, 0L); + case 118: + return jjMoveStringLiteralDfa5_0(active0, 0x20000000L, active1, 0L); + case 121: + return jjMoveStringLiteralDfa5_0(active0, 0L, active1, 0x2L); + default : + break; + } + return jjStartNfa_0(3, active0, active1, 0L); +} +private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1){ + if (((active0 &= old0) | (active1 &= old1)) == 0L) + return jjStartNfa_0(3, old0, old1, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(4, active0, active1, 0L); + return 5; + } + switch(curChar) + { + case 97: + return jjMoveStringLiteralDfa6_0(active0, 0x8000000000L, active1, 0x4L); + case 98: + return jjMoveStringLiteralDfa6_0(active0, 0x40000L, active1, 0L); + case 100: + if ((active0 & 0x10000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 52, 8); + return jjMoveStringLiteralDfa6_0(active0, 0x4000L, active1, 0L); + case 101: + if ((active0 & 0x2000L) != 0L) + return jjStartNfaWithStates_0(5, 13, 8); + return jjMoveStringLiteralDfa6_0(active0, 0x4100021000000L, active1, 0L); + case 102: + return jjMoveStringLiteralDfa6_0(active0, 0x800000L, active1, 0L); + case 105: + return jjMoveStringLiteralDfa6_0(active0, 0x2200000800010000L, active1, 0L); + case 108: + return jjMoveStringLiteralDfa6_0(active0, 0x200000000L, active1, 0x1L); + case 110: + if ((active0 & 0x100000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 56, 8); + return jjMoveStringLiteralDfa6_0(active0, 0x11000000000L, active1, 0L); + case 111: + return jjMoveStringLiteralDfa6_0(active0, 0x40000000000000L, active1, 0L); + case 112: + return jjMoveStringLiteralDfa6_0(active0, 0x8000000000000L, active1, 0L); + case 114: + if ((active0 & 0x1000000000000L) != 0L) + return jjStartNfaWithStates_0(5, 48, 8); + return jjMoveStringLiteralDfa6_0(active0, 0x4020000000000000L, active1, 0L); + case 115: + if ((active1 & 0x2L) != 0L) + return jjStartNfaWithStates_0(5, 65, 8); + return jjMoveStringLiteralDfa6_0(active0, 0x800004400000000L, active1, 0L); + case 116: + if ((active0 & 0x40000000L) != 0L) + return jjStartNfaWithStates_0(5, 30, 8); + else if ((active0 & 0x40000000000L) != 0L) + return jjStartNfaWithStates_0(5, 42, 8); + return jjMoveStringLiteralDfa6_0(active0, 0x8000L, active1, 0L); + default : + break; + } + return jjStartNfa_0(4, active0, active1, 0L); +} +private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long active1){ + if (((active0 &= old0) | (active1 &= old1)) == 0L) + return jjStartNfa_0(4, old0, old1, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(5, active0, active1, 0L); + return 6; + } + switch(curChar) + { + case 97: + return jjMoveStringLiteralDfa7_0(active0, 0x4008000000000000L, active1, 0L); + case 99: + return jjMoveStringLiteralDfa7_0(active0, 0x1001000000L, active1, 0L); + case 101: + if ((active0 & 0x400000000L) != 0L) + return jjStartNfaWithStates_0(6, 34, 8); + else if ((active0 & 0x800000000000000L) != 0L) + return jjStartNfaWithStates_0(6, 59, 8); + else if ((active1 & 0x1L) != 0L) + return jjStartNfaWithStates_0(6, 64, 8); + return jjMoveStringLiteralDfa7_0(active0, 0x10000000000L, active1, 0L); + case 103: + return jjMoveStringLiteralDfa7_0(active0, 0x200000000000000L, active1, 0L); + case 105: + return jjMoveStringLiteralDfa7_0(active0, 0x8000L, active1, 0L); + case 107: + if ((active0 & 0x4000000000L) != 0L) + return jjStartNfaWithStates_0(6, 38, 8); + break; + case 108: + if ((active1 & 0x4L) != 0L) + return jjStartNfaWithStates_0(6, 66, 8); + return jjMoveStringLiteralDfa7_0(active0, 0x40000L, active1, 0L); + case 109: + return jjMoveStringLiteralDfa7_0(active0, 0x2000000000010000L, active1, 0L); + case 111: + return jjMoveStringLiteralDfa7_0(active0, 0x800000000L, active1, 0L); + case 112: + return jjMoveStringLiteralDfa7_0(active0, 0x40000000000000L, active1, 0L); + case 114: + if ((active0 & 0x20000000L) != 0L) + return jjStartNfaWithStates_0(6, 29, 8); + else if ((active0 & 0x100000000000L) != 0L) + return jjStartNfaWithStates_0(6, 44, 8); + break; + case 116: + if ((active0 & 0x200000000L) != 0L) + return jjStartNfaWithStates_0(6, 33, 8); + return jjMoveStringLiteralDfa7_0(active0, 0x24008000000000L, active1, 0L); + case 117: + return jjMoveStringLiteralDfa7_0(active0, 0x4000L, active1, 0L); + case 121: + if ((active0 & 0x800000L) != 0L) + return jjStartNfaWithStates_0(6, 23, 8); + break; + default : + break; + } + return jjStartNfa_0(5, active0, active1, 0L); +} +private int jjMoveStringLiteralDfa7_0(long old0, long active0, long old1, long active1){ + if (((active0 &= old0) | (active1 &= old1)) == 0L) + return jjStartNfa_0(5, old0, old1, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(6, active0, 0L, 0L); + return 7; + } + switch(curChar) + { + case 101: + if ((active0 & 0x40000L) != 0L) + return jjStartNfaWithStates_0(7, 18, 8); + else if ((active0 & 0x8000000000L) != 0L) + return jjStartNfaWithStates_0(7, 39, 8); + else if ((active0 & 0x2000000000000000L) != 0L) + return jjStartNfaWithStates_0(7, 61, 8); + return jjMoveStringLiteralDfa8_0(active0, 0x44000000000000L); + case 105: + return jjMoveStringLiteralDfa8_0(active0, 0x1010000L); + case 108: + return jjMoveStringLiteralDfa8_0(active0, 0x4000L); + case 109: + if ((active0 & 0x4000000000000000L) != 0L) + return jjStartNfaWithStates_0(7, 62, 8); + break; + case 110: + if ((active0 & 0x800000000L) != 0L) + return jjStartNfaWithStates_0(7, 35, 8); + else if ((active0 & 0x200000000000000L) != 0L) + return jjStartNfaWithStates_0(7, 57, 8); + break; + case 114: + return jjMoveStringLiteralDfa8_0(active0, 0x8010000000000L); + case 116: + return jjMoveStringLiteralDfa8_0(active0, 0x1000000000L); + case 118: + return jjMoveStringLiteralDfa8_0(active0, 0x8000L); + case 121: + if ((active0 & 0x20000000000000L) != 0L) + return jjStartNfaWithStates_0(7, 53, 8); + break; + default : + break; + } + return jjStartNfa_0(6, active0, 0L, 0L); +} +private int jjMoveStringLiteralDfa8_0(long old0, long active0){ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(6, old0, 0L, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(7, active0, 0L, 0L); + return 8; + } + switch(curChar) + { + case 97: + return jjMoveStringLiteralDfa9_0(active0, 0x8010000000000L); + case 101: + if ((active0 & 0x4000L) != 0L) + return jjStartNfaWithStates_0(8, 14, 8); + else if ((active0 & 0x8000L) != 0L) + return jjStartNfaWithStates_0(8, 15, 8); + break; + case 102: + return jjMoveStringLiteralDfa9_0(active0, 0x1000000L); + case 105: + return jjMoveStringLiteralDfa9_0(active0, 0x1000000000L); + case 114: + if ((active0 & 0x4000000000000L) != 0L) + return jjStartNfaWithStates_0(8, 50, 8); + return jjMoveStringLiteralDfa9_0(active0, 0x40000000000000L); + case 116: + return jjMoveStringLiteralDfa9_0(active0, 0x10000L); + default : + break; + } + return jjStartNfa_0(7, active0, 0L, 0L); +} +private int jjMoveStringLiteralDfa9_0(long old0, long active0){ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(7, old0, 0L, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(8, active0, 0L, 0L); + return 9; + } + switch(curChar) + { + case 105: + return jjMoveStringLiteralDfa10_0(active0, 0x10000L); + case 109: + if ((active0 & 0x8000000000000L) != 0L) + return jjStartNfaWithStates_0(9, 51, 8); + break; + case 111: + return jjMoveStringLiteralDfa10_0(active0, 0x1000000000L); + case 116: + return jjMoveStringLiteralDfa10_0(active0, 0x40010000000000L); + case 121: + if ((active0 & 0x1000000L) != 0L) + return jjStartNfaWithStates_0(9, 24, 8); + break; + default : + break; + } + return jjStartNfa_0(8, active0, 0L, 0L); +} +private int jjMoveStringLiteralDfa10_0(long old0, long active0){ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(8, old0, 0L, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(9, active0, 0L, 0L); + return 10; + } + switch(curChar) + { + case 101: + if ((active0 & 0x10000000000L) != 0L) + return jjStartNfaWithStates_0(10, 40, 8); + break; + case 110: + if ((active0 & 0x1000000000L) != 0L) + return jjStartNfaWithStates_0(10, 36, 8); + break; + case 118: + return jjMoveStringLiteralDfa11_0(active0, 0x10000L); + case 121: + if ((active0 & 0x40000000000000L) != 0L) + return jjStartNfaWithStates_0(10, 54, 8); + break; + default : + break; + } + return jjStartNfa_0(9, active0, 0L, 0L); +} +private int jjMoveStringLiteralDfa11_0(long old0, long active0){ + if (((active0 &= old0)) == 0L) + return jjStartNfa_0(9, old0, 0L, 0L); + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + jjStopStringLiteralDfa_0(10, active0, 0L, 0L); + return 11; + } + switch(curChar) + { + case 101: + if ((active0 & 0x10000L) != 0L) + return jjStartNfaWithStates_0(11, 16, 8); + break; + default : + break; + } + return jjStartNfa_0(10, active0, 0L, 0L); +} +private int jjStartNfaWithStates_0(int pos, int kind, int state) +{ + jjmatchedKind = kind; + jjmatchedPos = pos; + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { return pos + 1; } + return jjMoveNfa_0(state, pos + 1); +} +static final long[] jjbitVec0 = { + 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL +}; +static final long[] jjbitVec2 = { + 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL +}; +private int jjMoveNfa_0(int startState, int curPos) +{ + int startsAt = 0; + jjnewStateCnt = 250; + int i = 1; + jjstateSet[0] = startState; + int kind = 0x7fffffff; + for (;;) + { + if (++jjround == 0x7fffffff) + ReInitRounds(); + if (curChar < 64) + { + long l = 1L << curChar; + do + { + switch(jjstateSet[--i]) + { + case 194: + case 8: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + break; + case 62: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + break; + case 2: + if ((0x3ff000000000000L & l) != 0L) + { jjCheckNAddStates(0, 12); } + else if (curChar == 39) + { jjCheckNAddStates(13, 20); } + else if (curChar == 34) + { jjCheckNAddStates(21, 23); } + else if (curChar == 36) + jjstateSet[jjnewStateCnt++] = 12; + else if (curChar == 47) + jjstateSet[jjnewStateCnt++] = 3; + else if (curChar == 40) + jjstateSet[jjnewStateCnt++] = 0; + if ((0x3ff000000000000L & l) != 0L) + { + if (kind > 127) + kind = 127; + { jjCheckNAdd(14); } + } + break; + case 149: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + break; + case 137: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + break; + case 242: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + break; + case 223: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + break; + case 61: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + break; + case 241: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + break; + case 90: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + break; + case 60: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + break; + case 0: + if (curChar == 42) + jjstateSet[jjnewStateCnt++] = 1; + break; + case 1: + if ((0xfffffdffffffffffL & l) != 0L && kind > 4) + kind = 4; + break; + case 3: + if (curChar != 47) + break; + if (kind > 12) + kind = 12; + { jjCheckNAdd(4); } + break; + case 4: + if ((0xfffffffffffffbffL & l) == 0L) + break; + if (kind > 12) + kind = 12; + { jjCheckNAdd(4); } + break; + case 5: + if (curChar == 47) + jjstateSet[jjnewStateCnt++] = 3; + break; + case 10: + if ((0xfffffffeffffffffL & l) == 0L) + break; + if (kind > 123) + kind = 123; + jjstateSet[jjnewStateCnt++] = 10; + break; + case 11: + if (curChar == 36) + jjstateSet[jjnewStateCnt++] = 12; + break; + case 13: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 124) + kind = 124; + jjstateSet[jjnewStateCnt++] = 13; + break; + case 14: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 127) + kind = 127; + { jjCheckNAdd(14); } + break; + case 15: + if (curChar == 34) + { jjCheckNAddStates(21, 23); } + break; + case 16: + if ((0xfffffffbffffdbffL & l) != 0L) + { jjCheckNAddStates(21, 23); } + break; + case 18: + if ((0x8400000000L & l) != 0L) + { jjCheckNAddStates(21, 23); } + break; + case 19: + if (curChar == 34 && kind > 134) + kind = 134; + break; + case 20: + if ((0xff000000000000L & l) != 0L) + { jjCheckNAddStates(24, 27); } + break; + case 21: + if ((0xff000000000000L & l) != 0L) + { jjCheckNAddStates(21, 23); } + break; + case 22: + if ((0xf000000000000L & l) != 0L) + jjstateSet[jjnewStateCnt++] = 23; + break; + case 23: + if ((0xff000000000000L & l) != 0L) + { jjCheckNAdd(21); } + break; + case 24: + if (curChar == 39) + { jjCheckNAddStates(13, 20); } + break; + case 27: + if ((0x100000200L & l) == 0L) + break; + if (kind > 127) + kind = 127; + { jjCheckNAddTwoStates(27, 28); } + break; + case 28: + if ((0x83ff000000000000L & l) == 0L) + break; + if (kind > 127) + kind = 127; + { jjCheckNAdd(28); } + break; + case 31: + if ((0x100000200L & l) != 0L) + { jjCheckNAddTwoStates(31, 32); } + break; + case 32: + if ((0x83ff000000000000L & l) == 0L) + break; + if (kind > 127) + kind = 127; + { jjCheckNAdd(32); } + break; + case 35: + if ((0x100000200L & l) == 0L) + break; + if (kind > 127) + kind = 127; + { jjCheckNAddTwoStates(35, 36); } + break; + case 36: + if ((0x80ff000000000000L & l) == 0L) + break; + if (kind > 127) + kind = 127; + { jjCheckNAdd(36); } + break; + case 39: + if ((0x100000200L & l) == 0L) + break; + if (kind > 127) + kind = 127; + { jjCheckNAddTwoStates(39, 40); } + break; + case 40: + if ((0x8003000000000000L & l) == 0L) + break; + if (kind > 127) + kind = 127; + { jjCheckNAdd(40); } + break; + case 47: + if (curChar == 48 && kind > 70) + kind = 70; + break; + case 52: + if (curChar == 49 && kind > 70) + kind = 70; + break; + case 123: + if (curChar == 48 && kind > 73) + kind = 73; + break; + case 128: + if (curChar == 49 && kind > 73) + kind = 73; + break; + case 160: + if (curChar == 48 && kind > 76) + kind = 76; + break; + case 167: + if (curChar == 49 && kind > 76) + kind = 76; + break; + case 174: + if ((0x3ff000000000000L & l) != 0L) + { jjCheckNAddStates(0, 12); } + break; + case 175: + if ((0x3ff000000000000L & l) != 0L) + { jjCheckNAddTwoStates(175, 176); } + break; + case 176: + if (curChar == 39) + { jjCheckNAddTwoStates(25, 26); } + break; + case 177: + if ((0x3ff000000000000L & l) != 0L) + { jjCheckNAddTwoStates(177, 178); } + break; + case 178: + if (curChar == 39) + { jjCheckNAddTwoStates(29, 30); } + break; + case 179: + if ((0x3ff000000000000L & l) != 0L) + { jjCheckNAddTwoStates(179, 180); } + break; + case 180: + if (curChar == 39) + { jjCheckNAddTwoStates(33, 34); } + break; + case 181: + if ((0x3ff000000000000L & l) != 0L) + { jjCheckNAddTwoStates(181, 182); } + break; + case 182: + if (curChar == 39) + { jjCheckNAddTwoStates(37, 38); } + break; + case 183: + if ((0x3ff000000000000L & l) != 0L) + { jjCheckNAddTwoStates(183, 184); } + break; + case 184: + if (curChar != 46) + break; + if (kind > 133) + kind = 133; + { jjCheckNAdd(185); } + break; + case 185: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 133) + kind = 133; + { jjCheckNAdd(185); } + break; + case 186: + if ((0x3ff000000000000L & l) != 0L) + { jjCheckNAddStates(28, 30); } + break; + case 187: + if (curChar == 46) + { jjCheckNAddTwoStates(188, 189); } + break; + case 188: + if ((0x3ff000000000000L & l) != 0L) + { jjCheckNAddTwoStates(188, 189); } + break; + case 190: + if ((0x280000000000L & l) != 0L) + { jjCheckNAdd(191); } + break; + case 191: + if ((0x3ff000000000000L & l) == 0L) + break; + if (kind > 133) + kind = 133; + { jjCheckNAdd(191); } + break; + case 195: + if (curChar == 49 && kind > 69) + kind = 69; + break; + case 203: + if (curChar == 48 && kind > 69) + kind = 69; + break; + case 218: + if (curChar == 48 && kind > 68) + kind = 68; + break; + case 224: + if (curChar == 49 && kind > 68) + kind = 68; + break; + default : break; + } + } while(i != startsAt); + } + else if (curChar < 128) + { + long l = 1L << (curChar & 077); + do + { + switch(jjstateSet[--i]) + { + case 194: + if ((0x7fffffe87fffffeL & l) != 0L) + { + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + } + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 215; + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 210; + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 208; + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 204; + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 201; + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 196; + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 193; + break; + case 62: + if ((0x7fffffe87fffffeL & l) != 0L) + { + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + } + if (curChar == 110) + { jjCheckNAdd(63); } + else if (curChar == 115) + jjstateSet[jjnewStateCnt++] = 61; + break; + case 2: + if ((0x7fffffe87fffffeL & l) != 0L) + { + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + } + else if (curChar == 92) + { jjCheckNAdd(10); } + else if (curChar == 96) + jjstateSet[jjnewStateCnt++] = 7; + if (curChar == 119) + { jjAddStates(31, 34); } + else if (curChar == 115) + { jjAddStates(35, 38); } + else if (curChar == 116) + { jjAddStates(39, 45); } + else if (curChar == 114) + { jjAddStates(46, 51); } + else if (curChar == 98) + { jjAddStates(52, 54); } + else if (curChar == 110) + { jjAddStates(55, 61); } + else if (curChar == 112) + { jjAddStates(62, 67); } + else if (curChar == 99) + { jjAddStates(68, 72); } + else if (curChar == 97) + { jjAddStates(73, 74); } + else if (curChar == 104) + { jjAddStates(75, 76); } + else if (curChar == 120) + { jjAddStates(77, 78); } + else if (curChar == 95) + { + if (kind > 127) + kind = 127; + { jjCheckNAdd(14); } + } + break; + case 149: + if ((0x7fffffe87fffffeL & l) != 0L) + { + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + } + if (curChar == 116) + jjstateSet[jjnewStateCnt++] = 172; + else if (curChar == 99) + jjstateSet[jjnewStateCnt++] = 154; + else if (curChar == 110) + jjstateSet[jjnewStateCnt++] = 151; + else if (curChar == 112) + jjstateSet[jjnewStateCnt++] = 148; + if (curChar == 116) + jjstateSet[jjnewStateCnt++] = 165; + if (curChar == 116) + jjstateSet[jjnewStateCnt++] = 158; + break; + case 137: + if ((0x7fffffe87fffffeL & l) != 0L) + { + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + } + if (curChar == 117) + jjstateSet[jjnewStateCnt++] = 144; + if (curChar == 117) + jjstateSet[jjnewStateCnt++] = 140; + if (curChar == 117) + jjstateSet[jjnewStateCnt++] = 136; + break; + case 242: + if ((0x7fffffe87fffffeL & l) != 0L) + { + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + } + if (curChar == 101) + jjstateSet[jjnewStateCnt++] = 248; + else if (curChar == 111) + { jjCheckNAdd(206); } + else if (curChar == 97) + jjstateSet[jjnewStateCnt++] = 241; + if (curChar == 101) + jjstateSet[jjnewStateCnt++] = 245; + break; + case 223: + if ((0x7fffffe87fffffeL & l) != 0L) + { + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + } + if (curChar == 116) + jjstateSet[jjnewStateCnt++] = 238; + else if (curChar == 117) + jjstateSet[jjnewStateCnt++] = 228; + if (curChar == 116) + jjstateSet[jjnewStateCnt++] = 233; + else if (curChar == 117) + jjstateSet[jjnewStateCnt++] = 222; + break; + case 61: + if ((0x7fffffe87fffffeL & l) != 0L) + { + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + } + if (curChar == 115) + jjstateSet[jjnewStateCnt++] = 60; + break; + case 241: + if ((0x7fffffe87fffffeL & l) != 0L) + { + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + } + if (curChar == 110) + { jjCheckNAdd(198); } + break; + case 90: + if ((0x7fffffe87fffffeL & l) != 0L) + { + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + } + if (curChar == 117) + jjstateSet[jjnewStateCnt++] = 110; + else if (curChar == 109) + jjstateSet[jjnewStateCnt++] = 98; + else if (curChar == 111) + jjstateSet[jjnewStateCnt++] = 89; + if (curChar == 117) + jjstateSet[jjnewStateCnt++] = 103; + if (curChar == 117) + jjstateSet[jjnewStateCnt++] = 95; + if (curChar == 117) + jjstateSet[jjnewStateCnt++] = 92; + break; + case 60: + if ((0x7fffffe87fffffeL & l) != 0L) + { + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + } + if (curChar == 101) + jjstateSet[jjnewStateCnt++] = 59; + break; + case 1: + if (kind > 4) + kind = 4; + break; + case 4: + if (kind > 12) + kind = 12; + jjstateSet[jjnewStateCnt++] = 4; + break; + case 6: + if (curChar == 96) + jjstateSet[jjnewStateCnt++] = 7; + break; + case 7: + if ((0x7fffffe87fffffeL & l) == 0L) + break; + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + break; + case 8: + if ((0x7fffffe87fffffeL & l) == 0L) + break; + if (kind > 123) + kind = 123; + { jjCheckNAdd(8); } + break; + case 9: + if (curChar == 92) + { jjCheckNAdd(10); } + break; + case 10: + if (kind > 123) + kind = 123; + { jjCheckNAdd(10); } + break; + case 12: + case 13: + if ((0x7fffffe87fffffeL & l) == 0L) + break; + if (kind > 124) + kind = 124; + { jjCheckNAdd(13); } + break; + case 14: + if (curChar != 95) + break; + if (kind > 127) + kind = 127; + { jjCheckNAdd(14); } + break; + case 16: + { jjCheckNAddStates(21, 23); } + break; + case 17: + if (curChar == 92) + { jjAddStates(79, 81); } + break; + case 18: + if ((0x14404410000000L & l) != 0L) + { jjCheckNAddStates(21, 23); } + break; + case 25: + if ((0x8000000080000L & l) != 0L) + jjstateSet[jjnewStateCnt++] = 26; + break; + case 26: + if ((0x1000000010L & l) == 0L) + break; + if (kind > 127) + kind = 127; + { jjCheckNAddTwoStates(27, 28); } + break; + case 28: + if ((0x500000085000000L & l) == 0L) + break; + if (kind > 127) + kind = 127; + { jjCheckNAdd(28); } + break; + case 29: + if ((0x8000000080000L & l) != 0L) + jjstateSet[jjnewStateCnt++] = 30; + break; + case 30: + if ((0x10000000100L & l) != 0L) + { jjCheckNAddTwoStates(31, 32); } + break; + case 32: + if ((0x500007e8500007eL & l) == 0L) + break; + if (kind > 127) + kind = 127; + { jjCheckNAdd(32); } + break; + case 33: + if ((0x8000000080000L & l) != 0L) + jjstateSet[jjnewStateCnt++] = 34; + break; + case 34: + if ((0x800000008000L & l) == 0L) + break; + if (kind > 127) + kind = 127; + { jjCheckNAddTwoStates(35, 36); } + break; + case 36: + if ((0x500000085000000L & l) == 0L) + break; + if (kind > 127) + kind = 127; + { jjCheckNAdd(36); } + break; + case 37: + if ((0x8000000080000L & l) != 0L) + jjstateSet[jjnewStateCnt++] = 38; + break; + case 38: + if ((0x400000004L & l) == 0L) + break; + if (kind > 127) + kind = 127; + { jjCheckNAddTwoStates(39, 40); } + break; + case 40: + if ((0x500000085000000L & l) == 0L) + break; + if (kind > 127) + kind = 127; + { jjCheckNAdd(40); } + break; + case 41: + if (curChar == 120) + { jjAddStates(77, 78); } + break; + case 42: + if (curChar == 114 && kind > 71) + kind = 71; + break; + case 43: + case 44: + case 120: + if (curChar == 111) + { jjCheckNAdd(42); } + break; + case 45: + if (curChar == 110) + jjstateSet[jjnewStateCnt++] = 44; + break; + case 46: + if (curChar == 104) + { jjAddStates(75, 76); } + break; + case 48: + if (curChar == 122) + { jjCheckNAdd(47); } + break; + case 49: + if (curChar == 104) + jjstateSet[jjnewStateCnt++] = 48; + break; + case 50: + if (curChar == 103) + jjstateSet[jjnewStateCnt++] = 49; + break; + case 51: + if (curChar == 105) + jjstateSet[jjnewStateCnt++] = 50; + break; + case 53: + if (curChar == 122) + { jjCheckNAdd(52); } + break; + case 54: + if (curChar == 104) + jjstateSet[jjnewStateCnt++] = 53; + break; + case 55: + if (curChar == 103) + jjstateSet[jjnewStateCnt++] = 54; + break; + case 56: + if (curChar == 105) + jjstateSet[jjnewStateCnt++] = 55; + break; + case 57: + if (curChar == 97) + { jjAddStates(73, 74); } + break; + case 58: + if (curChar == 116 && kind > 55) + kind = 55; + break; + case 59: + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 58; + break; + case 63: + if (curChar == 100 && kind > 71) + kind = 71; + break; + case 64: + case 118: + if (curChar == 110) + { jjCheckNAdd(63); } + break; + case 65: + if (curChar == 99) + { jjAddStates(68, 72); } + break; + case 66: + if (curChar == 101 && kind > 32) + kind = 32; + break; + case 67: + if (curChar == 115) + jjstateSet[jjnewStateCnt++] = 66; + break; + case 68: + if (curChar == 97) + jjstateSet[jjnewStateCnt++] = 67; + break; + case 69: + if (curChar == 120 && kind > 32) + kind = 32; + break; + case 70: + if (curChar == 101) + jjstateSet[jjnewStateCnt++] = 69; + break; + case 71: + if (curChar == 115) + jjstateSet[jjnewStateCnt++] = 70; + break; + case 72: + if (curChar == 97) + jjstateSet[jjnewStateCnt++] = 71; + break; + case 73: + if (curChar == 122 && kind > 32) + kind = 32; + break; + case 74: + if (curChar == 101) + jjstateSet[jjnewStateCnt++] = 73; + break; + case 75: + if (curChar == 115) + jjstateSet[jjnewStateCnt++] = 74; + break; + case 76: + if (curChar == 97) + jjstateSet[jjnewStateCnt++] = 75; + break; + case 77: + if (curChar == 114 && kind > 55) + kind = 55; + break; + case 78: + if (curChar == 101) + jjstateSet[jjnewStateCnt++] = 77; + break; + case 79: + if (curChar == 118) + jjstateSet[jjnewStateCnt++] = 78; + break; + case 80: + if (curChar == 111) + jjstateSet[jjnewStateCnt++] = 79; + break; + case 81: + if (curChar == 115 && kind > 75) + kind = 75; + break; + case 82: + case 153: + if (curChar == 111) + { jjCheckNAdd(81); } + break; + case 83: + if (curChar == 109) + jjstateSet[jjnewStateCnt++] = 82; + break; + case 84: + if (curChar == 112) + { jjAddStates(62, 67); } + break; + case 85: + if (curChar == 101 && kind > 67) + kind = 67; + break; + case 86: + case 113: + if (curChar == 103) + { jjCheckNAdd(85); } + break; + case 87: + if (curChar == 100) + jjstateSet[jjnewStateCnt++] = 86; + break; + case 88: + if (curChar == 101) + jjstateSet[jjnewStateCnt++] = 87; + break; + case 89: + if (curChar == 115) + jjstateSet[jjnewStateCnt++] = 88; + break; + case 91: + if (curChar == 108) + { jjCheckNAdd(47); } + break; + case 92: + if (curChar == 108) + jjstateSet[jjnewStateCnt++] = 91; + break; + case 93: + if (curChar == 117) + jjstateSet[jjnewStateCnt++] = 92; + break; + case 94: + if (curChar == 108) + { jjCheckNAdd(52); } + break; + case 95: + if (curChar == 108) + jjstateSet[jjnewStateCnt++] = 94; + break; + case 96: + if (curChar == 117) + jjstateSet[jjnewStateCnt++] = 95; + break; + case 97: + if (curChar == 115 && kind > 73) + kind = 73; + break; + case 98: + case 133: + case 147: + case 150: + if (curChar == 111) + { jjCheckNAdd(97); } + break; + case 99: + if (curChar == 109) + jjstateSet[jjnewStateCnt++] = 98; + break; + case 100: + if (curChar == 112 && kind > 74) + kind = 74; + break; + case 101: + if (curChar == 117) + jjstateSet[jjnewStateCnt++] = 100; + break; + case 102: + if (curChar == 108) + jjstateSet[jjnewStateCnt++] = 101; + break; + case 103: + if (curChar == 108) + jjstateSet[jjnewStateCnt++] = 102; + break; + case 104: + if (curChar == 117) + jjstateSet[jjnewStateCnt++] = 103; + break; + case 105: + if (curChar == 110 && kind > 74) + kind = 74; + break; + case 106: + if (curChar == 119) + jjstateSet[jjnewStateCnt++] = 105; + break; + case 107: + if (curChar == 111) + jjstateSet[jjnewStateCnt++] = 106; + break; + case 108: + if (curChar == 100) + jjstateSet[jjnewStateCnt++] = 107; + break; + case 109: + if (curChar == 108) + jjstateSet[jjnewStateCnt++] = 108; + break; + case 110: + if (curChar == 108) + jjstateSet[jjnewStateCnt++] = 109; + break; + case 111: + if (curChar == 117) + jjstateSet[jjnewStateCnt++] = 110; + break; + case 112: + if (curChar == 110) + { jjAddStates(55, 61); } + break; + case 114: + if (curChar == 100) + jjstateSet[jjnewStateCnt++] = 113; + break; + case 115: + if (curChar == 101) + jjstateSet[jjnewStateCnt++] = 114; + break; + case 116: + if (curChar == 103) + jjstateSet[jjnewStateCnt++] = 115; + break; + case 117: + if (curChar == 101) + jjstateSet[jjnewStateCnt++] = 116; + break; + case 119: + if (curChar == 97) + jjstateSet[jjnewStateCnt++] = 118; + break; + case 121: + if (curChar == 116 && kind > 72) + kind = 72; + break; + case 122: + if (curChar == 111) + jjstateSet[jjnewStateCnt++] = 121; + break; + case 124: + case 138: + if (curChar == 102) + { jjCheckNAdd(123); } + break; + case 125: + if (curChar == 105) + jjstateSet[jjnewStateCnt++] = 124; + break; + case 126: + if (curChar == 116) + jjstateSet[jjnewStateCnt++] = 125; + break; + case 127: + if (curChar == 111) + jjstateSet[jjnewStateCnt++] = 126; + break; + case 129: + case 142: + if (curChar == 102) + { jjCheckNAdd(128); } + break; + case 130: + if (curChar == 105) + jjstateSet[jjnewStateCnt++] = 129; + break; + case 131: + if (curChar == 116) + jjstateSet[jjnewStateCnt++] = 130; + break; + case 132: + if (curChar == 111) + jjstateSet[jjnewStateCnt++] = 131; + break; + case 134: + if (curChar == 109) + jjstateSet[jjnewStateCnt++] = 133; + break; + case 135: + if (curChar == 98) + { jjAddStates(52, 54); } + break; + case 136: + if (curChar == 102 && kind > 72) + kind = 72; + break; + case 139: + if (curChar == 105) + jjstateSet[jjnewStateCnt++] = 138; + break; + case 140: + if (curChar == 102) + jjstateSet[jjnewStateCnt++] = 139; + break; + case 141: + if (curChar == 117) + jjstateSet[jjnewStateCnt++] = 140; + break; + case 143: + if (curChar == 105) + jjstateSet[jjnewStateCnt++] = 142; + break; + case 144: + if (curChar == 102) + jjstateSet[jjnewStateCnt++] = 143; + break; + case 145: + if (curChar == 117) + jjstateSet[jjnewStateCnt++] = 144; + break; + case 146: + if (curChar == 114) + { jjAddStates(46, 51); } + break; + case 148: + if (curChar == 109) + jjstateSet[jjnewStateCnt++] = 147; + break; + case 151: + if (curChar == 109) + jjstateSet[jjnewStateCnt++] = 150; + break; + case 152: + if (curChar == 110) + jjstateSet[jjnewStateCnt++] = 151; + break; + case 154: + if (curChar == 109) + jjstateSet[jjnewStateCnt++] = 153; + break; + case 155: + if (curChar == 99) + jjstateSet[jjnewStateCnt++] = 154; + break; + case 156: + if (curChar == 110 && kind > 76) + kind = 76; + break; + case 157: + case 210: + if (curChar == 97) + { jjCheckNAdd(156); } + break; + case 158: + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 157; + break; + case 159: + if (curChar == 116) + jjstateSet[jjnewStateCnt++] = 158; + break; + case 161: + case 212: + if (curChar == 102) + { jjCheckNAdd(160); } + break; + case 162: + if (curChar == 105) + jjstateSet[jjnewStateCnt++] = 161; + break; + case 163: + if (curChar == 110) + jjstateSet[jjnewStateCnt++] = 162; + break; + case 164: + if (curChar == 97) + jjstateSet[jjnewStateCnt++] = 163; + break; + case 165: + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 164; + break; + case 166: + if (curChar == 116) + jjstateSet[jjnewStateCnt++] = 165; + break; + case 168: + if (curChar == 102) + jjstateSet[jjnewStateCnt++] = 167; + break; + case 169: + if (curChar == 105) + jjstateSet[jjnewStateCnt++] = 168; + break; + case 170: + if (curChar == 110) + jjstateSet[jjnewStateCnt++] = 169; + break; + case 171: + if (curChar == 97) + jjstateSet[jjnewStateCnt++] = 170; + break; + case 172: + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 171; + break; + case 173: + if (curChar == 116) + jjstateSet[jjnewStateCnt++] = 172; + break; + case 189: + if ((0x2000000020L & l) != 0L) + { jjAddStates(82, 83); } + break; + case 192: + if (curChar == 116) + { jjAddStates(39, 45); } + break; + case 193: + if (curChar == 105 && kind > 69) + kind = 69; + break; + case 196: + if (curChar == 105) + jjstateSet[jjnewStateCnt++] = 195; + break; + case 197: + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 196; + break; + case 198: + if (curChar == 100 && kind > 69) + kind = 69; + break; + case 199: + if (curChar == 110) + { jjCheckNAdd(198); } + break; + case 200: + if (curChar == 97) + jjstateSet[jjnewStateCnt++] = 199; + break; + case 201: + if (curChar == 105) + jjstateSet[jjnewStateCnt++] = 200; + break; + case 202: + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 201; + break; + case 204: + if (curChar == 105) + jjstateSet[jjnewStateCnt++] = 203; + break; + case 205: + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 204; + break; + case 206: + if (curChar == 114 && kind > 69) + kind = 69; + break; + case 207: + if (curChar == 111) + { jjCheckNAdd(206); } + break; + case 208: + if (curChar == 105) + jjstateSet[jjnewStateCnt++] = 207; + break; + case 209: + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 208; + break; + case 211: + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 210; + break; + case 213: + if (curChar == 105) + jjstateSet[jjnewStateCnt++] = 212; + break; + case 214: + if (curChar == 110) + jjstateSet[jjnewStateCnt++] = 213; + break; + case 215: + if (curChar == 97) + jjstateSet[jjnewStateCnt++] = 214; + break; + case 216: + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 215; + break; + case 217: + if (curChar == 115) + { jjAddStates(35, 38); } + break; + case 219: + if (curChar == 121) + jjstateSet[jjnewStateCnt++] = 218; + break; + case 220: + if (curChar == 108) + jjstateSet[jjnewStateCnt++] = 219; + break; + case 221: + if (curChar == 112) + jjstateSet[jjnewStateCnt++] = 220; + break; + case 222: + if (curChar == 112) + jjstateSet[jjnewStateCnt++] = 221; + break; + case 225: + if (curChar == 121) + jjstateSet[jjnewStateCnt++] = 224; + break; + case 226: + if (curChar == 108) + jjstateSet[jjnewStateCnt++] = 225; + break; + case 227: + if (curChar == 112) + jjstateSet[jjnewStateCnt++] = 226; + break; + case 228: + if (curChar == 112) + jjstateSet[jjnewStateCnt++] = 227; + break; + case 229: + if (curChar == 117) + jjstateSet[jjnewStateCnt++] = 228; + break; + case 230: + if (curChar == 103) + { jjCheckNAdd(47); } + break; + case 231: + if (curChar == 110) + jjstateSet[jjnewStateCnt++] = 230; + break; + case 232: + if (curChar == 111) + jjstateSet[jjnewStateCnt++] = 231; + break; + case 233: + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 232; + break; + case 234: + if (curChar == 116) + jjstateSet[jjnewStateCnt++] = 233; + break; + case 235: + if (curChar == 103) + { jjCheckNAdd(52); } + break; + case 236: + if (curChar == 110) + jjstateSet[jjnewStateCnt++] = 235; + break; + case 237: + if (curChar == 111) + jjstateSet[jjnewStateCnt++] = 236; + break; + case 238: + if (curChar == 114) + jjstateSet[jjnewStateCnt++] = 237; + break; + case 239: + if (curChar == 116) + jjstateSet[jjnewStateCnt++] = 238; + break; + case 240: + if (curChar == 119) + { jjAddStates(31, 34); } + break; + case 243: + if (curChar == 111) + { jjCheckNAdd(206); } + break; + case 244: + if (curChar == 107) + { jjCheckNAdd(47); } + break; + case 245: + if (curChar == 97) + jjstateSet[jjnewStateCnt++] = 244; + break; + case 246: + if (curChar == 101) + jjstateSet[jjnewStateCnt++] = 245; + break; + case 247: + if (curChar == 107) + { jjCheckNAdd(52); } + break; + case 248: + if (curChar == 97) + jjstateSet[jjnewStateCnt++] = 247; + break; + case 249: + if (curChar == 101) + jjstateSet[jjnewStateCnt++] = 248; + break; + default : break; + } + } while(i != startsAt); + } + else + { + int hiByte = (curChar >> 8); + int i1 = hiByte >> 6; + long l1 = 1L << (hiByte & 077); + int i2 = (curChar & 0xff) >> 6; + long l2 = 1L << (curChar & 077); + do + { + switch(jjstateSet[--i]) + { + case 1: + if (jjCanMove_0(hiByte, i1, i2, l1, l2) && kind > 4) + kind = 4; + break; + case 4: + if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) + break; + if (kind > 12) + kind = 12; + jjstateSet[jjnewStateCnt++] = 4; + break; + case 10: + if (!jjCanMove_0(hiByte, i1, i2, l1, l2)) + break; + if (kind > 123) + kind = 123; + jjstateSet[jjnewStateCnt++] = 10; + break; + case 16: + if (jjCanMove_0(hiByte, i1, i2, l1, l2)) + { jjAddStates(21, 23); } + break; + default : if (i1 == 0 || l1 == 0 || i2 == 0 || l2 == 0) break; else break; + } + } while(i != startsAt); + } + if (kind != 0x7fffffff) + { + jjmatchedKind = kind; + jjmatchedPos = curPos; + kind = 0x7fffffff; + } + ++curPos; + if ((i = jjnewStateCnt) == (startsAt = 250 - (jjnewStateCnt = startsAt))) + return curPos; + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { return curPos; } + } +} +private int jjMoveStringLiteralDfa0_1(){ + switch(curChar) + { + case 42: + return jjMoveStringLiteralDfa1_1(0x4L); + default : + return 1; + } +} +private int jjMoveStringLiteralDfa1_1(long active0){ + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + return 1; + } + switch(curChar) + { + case 47: + if ((active0 & 0x4L) != 0L) + return jjStopAtPos(1, 2); + break; + default : + return 2; + } + return 2; +} +private int jjMoveStringLiteralDfa0_2(){ + switch(curChar) + { + case 42: + return jjMoveStringLiteralDfa1_2(0x20L); + default : + return 1; + } +} +private int jjMoveStringLiteralDfa1_2(long active0){ + try { curChar = input_stream.readChar(); } + catch(java.io.IOException e) { + return 1; + } + switch(curChar) + { + case 41: + if ((active0 & 0x20L) != 0L) + return jjStopAtPos(1, 5); + break; + default : + return 2; + } + return 2; +} +static final int[] jjnextStates = { + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 186, 187, 189, 25, 26, 29, + 30, 33, 34, 37, 38, 16, 17, 19, 16, 17, 21, 19, 186, 187, 189, 242, + 243, 246, 249, 223, 229, 234, 239, 194, 197, 202, 205, 209, 211, 216, 149, 152, + 155, 159, 166, 173, 137, 141, 145, 117, 119, 120, 122, 127, 132, 134, 90, 93, + 96, 99, 104, 111, 68, 72, 76, 80, 83, 62, 64, 51, 56, 43, 45, 18, + 20, 22, 190, 191, +}; +private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2) +{ + switch(hiByte) + { + case 0: + return ((jjbitVec2[i2] & l2) != 0L); + default : + if ((jjbitVec0[i1] & l1) != 0L) + return true; + return false; + } +} + +/** Token literal values. */ +public static final String[] jjstrLiteralImages = { +"", null, null, null, null, null, null, null, null, null, null, null, null, +"\155\157\144\165\154\145", "\145\156\144\155\157\144\165\154\145", +"\160\162\151\155\151\164\151\166\145", "\145\156\144\160\162\151\155\151\164\151\166\145", "\164\141\142\154\145", +"\145\156\144\164\141\142\154\145", "\142\145\147\151\156", "\145\156\144", "\146\157\162\153", +"\152\157\151\156", "\163\160\145\143\151\146\171", "\145\156\144\163\160\145\143\151\146\171", +"\151\146", "\145\154\163\145", "\167\150\151\154\145", "\146\157\162", +"\146\157\162\145\166\145\162", "\162\145\160\145\141\164", "\167\141\151\164", null, +"\144\145\146\141\165\154\164", "\145\156\144\143\141\163\145", "\146\165\156\143\164\151\157\156", +"\145\156\144\146\165\156\143\164\151\157\156", "\164\141\163\153", "\145\156\144\164\141\163\153", +"\147\145\156\145\162\141\164\145", "\145\156\144\147\145\156\145\162\141\164\145", "\151\156\160\165\164", +"\157\165\164\160\165\164", "\151\156\157\165\164", "\151\156\164\145\147\145\162", "\162\145\147", +"\167\151\162\145", "\145\166\145\156\164", "\147\145\156\166\141\162", "\162\145\141\154", +"\160\141\162\141\155\145\164\145\162", "\154\157\143\141\154\160\141\162\141\155", "\163\151\147\156\145\144", +"\160\162\157\160\145\162\164\171", "\145\156\144\160\162\157\160\145\162\164\171", null, +"\141\163\163\151\147\156", "\144\145\141\163\163\151\147\156", "\146\157\162\143\145", +"\162\145\154\145\141\163\145", "\164\151\155\145", "\162\145\141\154\164\151\155\145", +"\144\145\146\160\141\162\141\155", "\157\162", "\144\151\163\141\142\154\145", "\141\154\167\141\171\163", +"\151\156\151\164\151\141\154", null, null, null, null, null, null, null, null, null, null, "\50", "\51", +"\173", "\175", "\133", "\135", "\73", "\43", "\100", "\44", "\54", "\56", "\75", +"\76", "\74", "\41", "\176", "\77", "\72", "\53\72", "\55\72", "\75\75", "\74\75", +"\76\75", "\41\75", "\174\174", "\46\46", "\53", "\55", "\52", "\57", "\46", "\174", +"\136", "\45", "\74\74", "\76\76", "\176\46", "\176\174", "\176\136", "\136\176", +"\75\75\75", "\41\75\75", "\52\52", "\74\74\74", "\76\76\76", null, null, null, null, null, +null, null, null, null, null, null, null, "\55\76", }; +protected Token jjFillToken() +{ + final Token t; + final String curTokenImage; + final int beginLine; + final int endLine; + final int beginColumn; + final int endColumn; + String im = jjstrLiteralImages[jjmatchedKind]; + curTokenImage = (im == null) ? input_stream.GetImage() : im; + beginLine = input_stream.getBeginLine(); + beginColumn = input_stream.getBeginColumn(); + endLine = input_stream.getEndLine(); + endColumn = input_stream.getEndColumn(); + t = Token.newToken(jjmatchedKind, curTokenImage); + + t.beginLine = beginLine; + t.endLine = endLine; + t.beginColumn = beginColumn; + t.endColumn = endColumn; + + return t; +} + +int curLexState = 0; +int defaultLexState = 0; +int jjnewStateCnt; +int jjround; +int jjmatchedPos; +int jjmatchedKind; + +/** Get the next Token. */ +public Token getNextToken() +{ + Token specialToken = null; + Token matchedToken; + int curPos = 0; + + EOFLoop : + for (;;) + { + try + { + curChar = input_stream.BeginToken(); + } + catch(java.io.IOException e) + { + jjmatchedKind = 0; + jjmatchedPos = -1; + matchedToken = jjFillToken(); + matchedToken.specialToken = specialToken; + return matchedToken; + } + + for (;;) + { + switch(curLexState) + { + case 0: + try { input_stream.backup(0); + while (curChar <= 32 && (0x100003600L & (1L << curChar)) != 0L) + curChar = input_stream.BeginToken(); + } + catch (java.io.IOException e1) { continue EOFLoop; } + jjmatchedKind = 0x7fffffff; + jjmatchedPos = 0; + curPos = jjMoveStringLiteralDfa0_0(); + break; + case 1: + jjmatchedKind = 0x7fffffff; + jjmatchedPos = 0; + curPos = jjMoveStringLiteralDfa0_1(); + if (jjmatchedPos == 0 && jjmatchedKind > 3) + { + jjmatchedKind = 3; + } + break; + case 2: + jjmatchedKind = 0x7fffffff; + jjmatchedPos = 0; + curPos = jjMoveStringLiteralDfa0_2(); + if (jjmatchedPos == 0 && jjmatchedKind > 6) + { + jjmatchedKind = 6; + } + break; + } + if (jjmatchedKind != 0x7fffffff) + { + if (jjmatchedPos + 1 < curPos) + input_stream.backup(curPos - jjmatchedPos - 1); + if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) + { + matchedToken = jjFillToken(); + matchedToken.specialToken = specialToken; + if (jjnewLexState[jjmatchedKind] != -1) + curLexState = jjnewLexState[jjmatchedKind]; + return matchedToken; + } + else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) + { + if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L) + { + matchedToken = jjFillToken(); + if (specialToken == null) + specialToken = matchedToken; + else + { + matchedToken.specialToken = specialToken; + specialToken = (specialToken.next = matchedToken); + } + } + if (jjnewLexState[jjmatchedKind] != -1) + curLexState = jjnewLexState[jjmatchedKind]; + continue EOFLoop; + } + if (jjnewLexState[jjmatchedKind] != -1) + curLexState = jjnewLexState[jjmatchedKind]; + curPos = 0; + jjmatchedKind = 0x7fffffff; + try { + curChar = input_stream.readChar(); + continue; + } + catch (java.io.IOException e1) { } + } + int error_line = input_stream.getEndLine(); + int error_column = input_stream.getEndColumn(); + String error_after = null; + boolean EOFSeen = false; + try { input_stream.readChar(); input_stream.backup(1); } + catch (java.io.IOException e1) { + EOFSeen = true; + error_after = curPos <= 1 ? "" : input_stream.GetImage(); + if (curChar == '\n' || curChar == '\r') { + error_line++; + error_column = 0; + } + else + error_column++; + } + if (!EOFSeen) { + input_stream.backup(1); + error_after = curPos <= 1 ? "" : input_stream.GetImage(); + } + throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR); + } + } +} + +private void jjCheckNAdd(int state) +{ + if (jjrounds[state] != jjround) + { + jjstateSet[jjnewStateCnt++] = state; + jjrounds[state] = jjround; + } +} +private void jjAddStates(int start, int end) +{ + do { + jjstateSet[jjnewStateCnt++] = jjnextStates[start]; + } while (start++ != end); +} +private void jjCheckNAddTwoStates(int state1, int state2) +{ + jjCheckNAdd(state1); + jjCheckNAdd(state2); +} + +private void jjCheckNAddStates(int start, int end) +{ + do { + jjCheckNAdd(jjnextStates[start]); + } while (start++ != end); +} + + /** Constructor. */ + public VerilogParserCoreTokenManager(JavaCharStream stream){ + + if (JavaCharStream.staticFlag) + throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); + + input_stream = stream; + } + + /** Constructor. */ + public VerilogParserCoreTokenManager (JavaCharStream stream, int lexState){ + ReInit(stream); + SwitchTo(lexState); + } + + /** Reinitialise parser. */ + public void ReInit(JavaCharStream stream) + { + jjmatchedPos = jjnewStateCnt = 0; + curLexState = defaultLexState; + input_stream = stream; + ReInitRounds(); + } + + private void ReInitRounds() + { + int i; + jjround = 0x80000001; + for (i = 250; i-- > 0;) + jjrounds[i] = 0x80000000; + } + + /** Reinitialise parser. */ + public void ReInit(JavaCharStream stream, int lexState) + { + ReInit(stream); + SwitchTo(lexState); + } + + /** Switch to specified lex state. */ + public void SwitchTo(int lexState) + { + if (lexState >= 3 || lexState < 0) + throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); + else + curLexState = lexState; + } + +/** Lexer state names. */ +public static final String[] lexStateNames = { + "DEFAULT", + "IN_MULTI_LINE_COMMENT", + "IN_PROPERTY", +}; + +/** Lex State array. */ +public static final int[] jjnewLexState = { + -1, 1, 0, -1, 2, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, +}; +static final long[] jjtoToken = { + 0xffffffffffffe001L, 0x9fffffffffffffffL, 0xe0L, +}; +static final long[] jjtoSkip = { + 0x1fa4L, 0x0L, 0x0L, +}; +static final long[] jjtoSpecial = { + 0x1000L, 0x0L, 0x0L, +}; +static final long[] jjtoMore = { + 0x5aL, 0x0L, 0x0L, +}; + protected JavaCharStream input_stream; + + private final int[] jjrounds = new int[250]; + private final int[] jjstateSet = new int[2 * 250]; + + + protected char curChar; +} diff -U 3 -dHrN -- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/vhdl/ParseException.java vdt/_generated/com/elphel/vdt/veditor/parser/vhdl/ParseException.java --- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/vhdl/ParseException.java 2017-11-28 14:28:04.226793642 -0700 +++ vdt/_generated/com/elphel/vdt/veditor/parser/vhdl/ParseException.java 2017-11-28 14:28:04.194794586 -0700 @@ -1,197 +1,187 @@ -/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */ -package net.sourceforge.veditor.parser; - -/** - * This exception is thrown when parse errors are encountered. - * You can explicitly create objects of this exception type by - * calling the method generateParseException in the generated - * parser. - * - * You can modify this class to customize your error reporting - * mechanisms so long as you retain the public fields. - */ -public class ParseException extends Exception { - - /** - * - */ - private static final long serialVersionUID = 7811742812760162144L; - -/** - * This constructor is used by the method "generateParseException" - * in the generated parser. Calling this constructor generates - * a new object of this type with the fields "currentToken", - * "expectedTokenSequences", and "tokenImage" set. The boolean - * flag "specialConstructor" is also set to true to indicate that - * this constructor was used to create this object. - * This constructor calls its super class with the empty string - * to force the "toString" method of parent class "Throwable" to - * print the error message in the form: - * ParseException: - */ - public ParseException(Token currentTokenVal, - int[][] expectedTokenSequencesVal, - String[] tokenImageVal - ) - { - super(""); - specialConstructor = true; - currentToken = currentTokenVal; - expectedTokenSequences = expectedTokenSequencesVal; - tokenImage = tokenImageVal; - } - - /** - * The following constructors are for use by you for whatever - * purpose you can think of. Constructing the exception in this - * manner makes the exception behave in the normal way - i.e., as - * documented in the class "Throwable". The fields "errorToken", - * "expectedTokenSequences", and "tokenImage" do not contain - * relevant information. The JavaCC generated code does not use - * these constructors. - */ - - public ParseException() { - super(); - specialConstructor = false; - } - - public ParseException(String message) { - super(message); - specialConstructor = false; - } - - /** - * This variable determines which constructor was used to create - * this object and thereby affects the semantics of the - * "getMessage" method (see below). - */ - protected boolean specialConstructor; - - /** - * This is the last token that has been consumed successfully. If - * this object has been created due to a parse error, the token - * followng this token will (therefore) be the first error token. - */ - public Token currentToken; - - /** - * Each entry in this array is an array of integers. Each array - * of integers represents a sequence of tokens (by their ordinal - * values) that is expected at this point of the parse. - */ - public int[][] expectedTokenSequences; - - /** - * This is a reference to the "tokenImage" array of the generated - * parser within which the parse error occurred. This array is - * defined in the generated ...Constants interface. - */ - public String[] tokenImage; - - /** - * This method has the standard behavior when this object has been - * created using the standard constructors. Otherwise, it uses - * "currentToken" and "expectedTokenSequences" to generate a parse - * error message and returns it. If this object has been created - * due to a parse error, and you do not catch it (it gets thrown - * from the parser), then this method is called during the printing - * of the final stack trace, and hence the correct error message - * gets displayed. - */ - public String getMessage() { - if (!specialConstructor) { - return super.getMessage(); - } - StringBuffer expected = new StringBuffer(); - int maxSize = 0; - for (int i = 0; i < expectedTokenSequences.length; i++) { - if (maxSize < expectedTokenSequences[i].length) { - maxSize = expectedTokenSequences[i].length; - } - for (int j = 0; j < expectedTokenSequences[i].length; j++) { - expected.append(tokenImage[expectedTokenSequences[i][j]]).append(" "); - } - if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { - expected.append("..."); - } - expected.append(eol).append(" "); - } - String retval = "Encountered \""; - Token tok = currentToken.next; - for (int i = 0; i < maxSize; i++) { - if (i != 0) retval += " "; - if (tok.kind == 0) { - retval += tokenImage[0]; - break; - } - retval += add_escapes(tok.image); - tok = tok.next; - } - retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; - retval += "." + eol; - if (expectedTokenSequences.length == 1) { - retval += "Was expecting:" + eol + " "; - } else { - retval += "Was expecting one of:" + eol + " "; - } - retval += expected.toString(); - return retval; - } - - /** - * The end of line string for this machine. - */ - protected String eol = System.getProperty("line.separator", "\n"); - - /** - * Used to convert raw characters to their escaped version - * when these raw version cannot be used as part of an ASCII - * string literal. - */ - protected String add_escapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; - } - } - return retval.toString(); - } - -} +/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 6.0 */ +/* JavaCCOptions:KEEP_LINE_COL=null */ +package com.elphel.vdt.veditor.parser.vhdl; + +/** + * This exception is thrown when parse errors are encountered. + * You can explicitly create objects of this exception type by + * calling the method generateParseException in the generated + * parser. + * + * You can modify this class to customize your error reporting + * mechanisms so long as you retain the public fields. + */ +public class ParseException extends Exception { + + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; + + /** + * This constructor is used by the method "generateParseException" + * in the generated parser. Calling this constructor generates + * a new object of this type with the fields "currentToken", + * "expectedTokenSequences", and "tokenImage" set. + */ + public ParseException(Token currentTokenVal, + int[][] expectedTokenSequencesVal, + String[] tokenImageVal + ) + { + super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal)); + currentToken = currentTokenVal; + expectedTokenSequences = expectedTokenSequencesVal; + tokenImage = tokenImageVal; + } + + /** + * The following constructors are for use by you for whatever + * purpose you can think of. Constructing the exception in this + * manner makes the exception behave in the normal way - i.e., as + * documented in the class "Throwable". The fields "errorToken", + * "expectedTokenSequences", and "tokenImage" do not contain + * relevant information. The JavaCC generated code does not use + * these constructors. + */ + + public ParseException() { + super(); + } + + /** Constructor with message. */ + public ParseException(String message) { + super(message); + } + + + /** + * This is the last token that has been consumed successfully. If + * this object has been created due to a parse error, the token + * followng this token will (therefore) be the first error token. + */ + public Token currentToken; + + /** + * Each entry in this array is an array of integers. Each array + * of integers represents a sequence of tokens (by their ordinal + * values) that is expected at this point of the parse. + */ + public int[][] expectedTokenSequences; + + /** + * This is a reference to the "tokenImage" array of the generated + * parser within which the parse error occurred. This array is + * defined in the generated ...Constants interface. + */ + public String[] tokenImage; + + /** + * It uses "currentToken" and "expectedTokenSequences" to generate a parse + * error message and returns it. If this object has been created + * due to a parse error, and you do not catch it (it gets thrown + * from the parser) the correct error message + * gets displayed. + */ + private static String initialise(Token currentToken, + int[][] expectedTokenSequences, + String[] tokenImage) { + String eol = System.getProperty("line.separator", "\n"); + StringBuffer expected = new StringBuffer(); + int maxSize = 0; + for (int i = 0; i < expectedTokenSequences.length; i++) { + if (maxSize < expectedTokenSequences[i].length) { + maxSize = expectedTokenSequences[i].length; + } + for (int j = 0; j < expectedTokenSequences[i].length; j++) { + expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' '); + } + if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) { + expected.append("..."); + } + expected.append(eol).append(" "); + } + String retval = "Encountered \""; + Token tok = currentToken.next; + for (int i = 0; i < maxSize; i++) { + if (i != 0) retval += " "; + if (tok.kind == 0) { + retval += tokenImage[0]; + break; + } + retval += " " + tokenImage[tok.kind]; + retval += " \""; + retval += add_escapes(tok.image); + retval += " \""; + tok = tok.next; + } + retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn; + retval += "." + eol; + if (expectedTokenSequences.length == 1) { + retval += "Was expecting:" + eol + " "; + } else { + retval += "Was expecting one of:" + eol + " "; + } + retval += expected.toString(); + return retval; + } + + /** + * The end of line string for this machine. + */ + protected String eol = System.getProperty("line.separator", "\n"); + + /** + * Used to convert raw characters to their escaped version + * when these raw version cannot be used as part of an ASCII + * string literal. + */ + static String add_escapes(String str) { + StringBuffer retval = new StringBuffer(); + char ch; + for (int i = 0; i < str.length(); i++) { + switch (str.charAt(i)) + { + case 0 : + continue; + case '\b': + retval.append("\\b"); + continue; + case '\t': + retval.append("\\t"); + continue; + case '\n': + retval.append("\\n"); + continue; + case '\f': + retval.append("\\f"); + continue; + case '\r': + retval.append("\\r"); + continue; + case '\"': + retval.append("\\\""); + continue; + case '\'': + retval.append("\\\'"); + continue; + case '\\': + retval.append("\\\\"); + continue; + default: + if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { + String s = "0000" + Integer.toString(ch, 16); + retval.append("\\u" + s.substring(s.length() - 4, s.length())); + } else { + retval.append(ch); + } + continue; + } + } + return retval.toString(); + } + +} +/* JavaCC - OriginalChecksum=705a163ceaf6e6e23a4a787f3ceeadfd (do not edit this line) */ diff -U 3 -dHrN -- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/vhdl/SimpleCharStream.java vdt/_generated/com/elphel/vdt/veditor/parser/vhdl/SimpleCharStream.java --- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/vhdl/SimpleCharStream.java 1969-12-31 17:00:00.000000000 -0700 +++ vdt/_generated/com/elphel/vdt/veditor/parser/vhdl/SimpleCharStream.java 2017-11-28 14:28:04.194794586 -0700 @@ -0,0 +1,474 @@ +/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 6.0 */ +/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ +package com.elphel.vdt.veditor.parser.vhdl; + +/** + * An implementation of interface CharStream, where the stream is assumed to + * contain only ASCII characters (without unicode processing). + */ + +public class SimpleCharStream +{ +/** Whether parser is static. */ + public static final boolean staticFlag = false; + int bufsize; + int available; + int tokenBegin; +/** Position in buffer. */ + public int bufpos = -1; + protected int bufline[]; + protected int bufcolumn[]; + + protected int column = 0; + protected int line = 1; + + protected boolean prevCharIsCR = false; + protected boolean prevCharIsLF = false; + + protected java.io.Reader inputStream; + + protected char[] buffer; + protected int maxNextCharInd = 0; + protected int inBuf = 0; + protected int tabSize = 8; + protected boolean trackLineColumn = true; + + public void setTabSize(int i) { tabSize = i; } + public int getTabSize() { return tabSize; } + + + protected void ExpandBuff(boolean wrapAround) + { + char[] newbuffer = new char[bufsize + 2048]; + int newbufline[] = new int[bufsize + 2048]; + int newbufcolumn[] = new int[bufsize + 2048]; + + try + { + if (wrapAround) + { + System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); + System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos); + buffer = newbuffer; + + System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); + System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos); + bufline = newbufline; + + System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); + System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos); + bufcolumn = newbufcolumn; + + maxNextCharInd = (bufpos += (bufsize - tokenBegin)); + } + else + { + System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin); + buffer = newbuffer; + + System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin); + bufline = newbufline; + + System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin); + bufcolumn = newbufcolumn; + + maxNextCharInd = (bufpos -= tokenBegin); + } + } + catch (Throwable t) + { + throw new Error(t.getMessage()); + } + + + bufsize += 2048; + available = bufsize; + tokenBegin = 0; + } + + protected void FillBuff() throws java.io.IOException + { + if (maxNextCharInd == available) + { + if (available == bufsize) + { + if (tokenBegin > 2048) + { + bufpos = maxNextCharInd = 0; + available = tokenBegin; + } + else if (tokenBegin < 0) + bufpos = maxNextCharInd = 0; + else + ExpandBuff(false); + } + else if (available > tokenBegin) + available = bufsize; + else if ((tokenBegin - available) < 2048) + ExpandBuff(true); + else + available = tokenBegin; + } + + int i; + try { + if ((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) == -1) + { + inputStream.close(); + throw new java.io.IOException(); + } + else + maxNextCharInd += i; + return; + } + catch(java.io.IOException e) { + --bufpos; + backup(0); + if (tokenBegin == -1) + tokenBegin = bufpos; + throw e; + } + } + +/** Start. */ + public char BeginToken() throws java.io.IOException + { + tokenBegin = -1; + char c = readChar(); + tokenBegin = bufpos; + + return c; + } + + protected void UpdateLineColumn(char c) + { + column++; + + if (prevCharIsLF) + { + prevCharIsLF = false; + line += (column = 1); + } + else if (prevCharIsCR) + { + prevCharIsCR = false; + if (c == '\n') + { + prevCharIsLF = true; + } + else + line += (column = 1); + } + + switch (c) + { + case '\r' : + prevCharIsCR = true; + break; + case '\n' : + prevCharIsLF = true; + break; + case '\t' : + column--; + column += (tabSize - (column % tabSize)); + break; + default : + break; + } + + bufline[bufpos] = line; + bufcolumn[bufpos] = column; + } + +/** Read a character. */ + public char readChar() throws java.io.IOException + { + if (inBuf > 0) + { + --inBuf; + + if (++bufpos == bufsize) + bufpos = 0; + + return buffer[bufpos]; + } + + if (++bufpos >= maxNextCharInd) + FillBuff(); + + char c = buffer[bufpos]; + + UpdateLineColumn(c); + return c; + } + + @Deprecated + /** + * @deprecated + * @see #getEndColumn + */ + + public int getColumn() { + return bufcolumn[bufpos]; + } + + @Deprecated + /** + * @deprecated + * @see #getEndLine + */ + + public int getLine() { + return bufline[bufpos]; + } + + /** Get token end column number. */ + public int getEndColumn() { + return bufcolumn[bufpos]; + } + + /** Get token end line number. */ + public int getEndLine() { + return bufline[bufpos]; + } + + /** Get token beginning column number. */ + public int getBeginColumn() { + return bufcolumn[tokenBegin]; + } + + /** Get token beginning line number. */ + public int getBeginLine() { + return bufline[tokenBegin]; + } + +/** Backup a number of characters. */ + public void backup(int amount) { + + inBuf += amount; + if ((bufpos -= amount) < 0) + bufpos += bufsize; + } + + /** Constructor. */ + public SimpleCharStream(java.io.Reader dstream, int startline, + int startcolumn, int buffersize) + { + inputStream = dstream; + line = startline; + column = startcolumn - 1; + + available = bufsize = buffersize; + buffer = new char[buffersize]; + bufline = new int[buffersize]; + bufcolumn = new int[buffersize]; + } + + /** Constructor. */ + public SimpleCharStream(java.io.Reader dstream, int startline, + int startcolumn) + { + this(dstream, startline, startcolumn, 4096); + } + + /** Constructor. */ + public SimpleCharStream(java.io.Reader dstream) + { + this(dstream, 1, 1, 4096); + } + + /** Reinitialise. */ + public void ReInit(java.io.Reader dstream, int startline, + int startcolumn, int buffersize) + { + inputStream = dstream; + line = startline; + column = startcolumn - 1; + + if (buffer == null || buffersize != buffer.length) + { + available = bufsize = buffersize; + buffer = new char[buffersize]; + bufline = new int[buffersize]; + bufcolumn = new int[buffersize]; + } + prevCharIsLF = prevCharIsCR = false; + tokenBegin = inBuf = maxNextCharInd = 0; + bufpos = -1; + } + + /** Reinitialise. */ + public void ReInit(java.io.Reader dstream, int startline, + int startcolumn) + { + ReInit(dstream, startline, startcolumn, 4096); + } + + /** Reinitialise. */ + public void ReInit(java.io.Reader dstream) + { + ReInit(dstream, 1, 1, 4096); + } + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, + int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException + { + this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, int startline, + int startcolumn, int buffersize) + { + this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline, + int startcolumn) throws java.io.UnsupportedEncodingException + { + this(dstream, encoding, startline, startcolumn, 4096); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, int startline, + int startcolumn) + { + this(dstream, startline, startcolumn, 4096); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException + { + this(dstream, encoding, 1, 1, 4096); + } + + /** Constructor. */ + public SimpleCharStream(java.io.InputStream dstream) + { + this(dstream, 1, 1, 4096); + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding, int startline, + int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException + { + ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize); + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, int startline, + int startcolumn, int buffersize) + { + ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize); + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException + { + ReInit(dstream, encoding, 1, 1, 4096); + } + + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream) + { + ReInit(dstream, 1, 1, 4096); + } + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, String encoding, int startline, + int startcolumn) throws java.io.UnsupportedEncodingException + { + ReInit(dstream, encoding, startline, startcolumn, 4096); + } + /** Reinitialise. */ + public void ReInit(java.io.InputStream dstream, int startline, + int startcolumn) + { + ReInit(dstream, startline, startcolumn, 4096); + } + /** Get token literal value. */ + public String GetImage() + { + if (bufpos >= tokenBegin) + return new String(buffer, tokenBegin, bufpos - tokenBegin + 1); + else + return new String(buffer, tokenBegin, bufsize - tokenBegin) + + new String(buffer, 0, bufpos + 1); + } + + /** Get the suffix. */ + public char[] GetSuffix(int len) + { + char[] ret = new char[len]; + + if ((bufpos + 1) >= len) + System.arraycopy(buffer, bufpos - len + 1, ret, 0, len); + else + { + System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, + len - bufpos - 1); + System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1); + } + + return ret; + } + + /** Reset buffer when finished. */ + public void Done() + { + buffer = null; + bufline = null; + bufcolumn = null; + } + + /** + * Method to adjust line and column numbers for the start of a token. + */ + public void adjustBeginLineColumn(int newLine, int newCol) + { + int start = tokenBegin; + int len; + + if (bufpos >= tokenBegin) + { + len = bufpos - tokenBegin + inBuf + 1; + } + else + { + len = bufsize - tokenBegin + bufpos + 1 + inBuf; + } + + int i = 0, j = 0, k = 0; + int nextColDiff = 0, columnDiff = 0; + + while (i < len && bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) + { + bufline[j] = newLine; + nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j]; + bufcolumn[j] = newCol + columnDiff; + columnDiff = nextColDiff; + i++; + } + + if (i < len) + { + bufline[j] = newLine++; + bufcolumn[j] = newCol + columnDiff; + + while (i++ < len) + { + if (bufline[j = start % bufsize] != bufline[++start % bufsize]) + bufline[j] = newLine++; + else + bufline[j] = newLine; + } + } + + line = bufline[j]; + column = bufcolumn[j]; + } + + boolean getTrackLineColumn() { return trackLineColumn; } + void setTrackLineColumn(boolean tlc) { trackLineColumn = tlc; } +} +/* JavaCC - OriginalChecksum=481f01d084994900d089ac6372520457 (do not edit this line) */ diff -U 3 -dHrN -- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/vhdl/Token.java vdt/_generated/com/elphel/vdt/veditor/parser/vhdl/Token.java --- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/vhdl/Token.java 2017-11-28 14:28:04.234793405 -0700 +++ vdt/_generated/com/elphel/vdt/veditor/parser/vhdl/Token.java 2017-11-28 14:28:04.194794586 -0700 @@ -1,81 +1,131 @@ -/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */ -package net.sourceforge.veditor.parser; - -/** - * Describes the input token stream. - */ - -public class Token { - - /** - * An integer that describes the kind of this token. This numbering - * system is determined by JavaCCParser, and a table of these numbers is - * stored in the file ...Constants.java. - */ - public int kind; - - /** - * beginLine and beginColumn describe the position of the first character - * of this token; endLine and endColumn describe the position of the - * last character of this token. - */ - public int beginLine, beginColumn, endLine, endColumn; - - /** - * The string image of the token. - */ - public String image; - - /** - * A reference to the next regular (non-special) token from the input - * stream. If this is the last token from the input stream, or if the - * token manager has not read tokens beyond this one, this field is - * set to null. This is true only if this token is also a regular - * token. Otherwise, see below for a description of the contents of - * this field. - */ - public Token next; - - /** - * This field is used to access special tokens that occur prior to this - * token, but after the immediately preceding regular (non-special) token. - * If there are no such special tokens, this field is set to null. - * When there are more than one such special token, this field refers - * to the last of these special tokens, which in turn refers to the next - * previous special token through its specialToken field, and so on - * until the first special token (whose specialToken field is null). - * The next fields of special tokens refer to other special tokens that - * immediately follow it (without an intervening regular token). If there - * is no such token, this field is null. - */ - public Token specialToken; - - /** - * Returns the image. - */ - public String toString() - { - return image; - } - - /** - * Returns a new Token object, by default. However, if you want, you - * can create and return subclass objects based on the value of ofKind. - * Simply add the cases to the switch for all those special cases. - * For example, if you have a subclass of Token called IDToken that - * you want to create if ofKind is ID, simlpy add something like : - * - * case MyParserConstants.ID : return new IDToken(); - * - * to the following switch statement. Then you can cast matchedToken - * variable to the appropriate type and use it in your lexical actions. - */ - public static final Token newToken(int ofKind) - { - switch(ofKind) - { - default : return new Token(); - } - } - -} +/* Generated By:JavaCC: Do not edit this line. Token.java Version 6.0 */ +/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ +package com.elphel.vdt.veditor.parser.vhdl; + +/** + * Describes the input token stream. + */ + +public class Token implements java.io.Serializable { + + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; + + /** + * An integer that describes the kind of this token. This numbering + * system is determined by JavaCCParser, and a table of these numbers is + * stored in the file ...Constants.java. + */ + public int kind; + + /** The line number of the first character of this Token. */ + public int beginLine; + /** The column number of the first character of this Token. */ + public int beginColumn; + /** The line number of the last character of this Token. */ + public int endLine; + /** The column number of the last character of this Token. */ + public int endColumn; + + /** + * The string image of the token. + */ + public String image; + + /** + * A reference to the next regular (non-special) token from the input + * stream. If this is the last token from the input stream, or if the + * token manager has not read tokens beyond this one, this field is + * set to null. This is true only if this token is also a regular + * token. Otherwise, see below for a description of the contents of + * this field. + */ + public Token next; + + /** + * This field is used to access special tokens that occur prior to this + * token, but after the immediately preceding regular (non-special) token. + * If there are no such special tokens, this field is set to null. + * When there are more than one such special token, this field refers + * to the last of these special tokens, which in turn refers to the next + * previous special token through its specialToken field, and so on + * until the first special token (whose specialToken field is null). + * The next fields of special tokens refer to other special tokens that + * immediately follow it (without an intervening regular token). If there + * is no such token, this field is null. + */ + public Token specialToken; + + /** + * An optional attribute value of the Token. + * Tokens which are not used as syntactic sugar will often contain + * meaningful values that will be used later on by the compiler or + * interpreter. This attribute value is often different from the image. + * Any subclass of Token that actually wants to return a non-null value can + * override this method as appropriate. + */ + public Object getValue() { + return null; + } + + /** + * No-argument constructor + */ + public Token() {} + + /** + * Constructs a new token for the specified Image. + */ + public Token(int kind) + { + this(kind, null); + } + + /** + * Constructs a new token for the specified Image and Kind. + */ + public Token(int kind, String image) + { + this.kind = kind; + this.image = image; + } + + /** + * Returns the image. + */ + public String toString() + { + return image; + } + + /** + * Returns a new Token object, by default. However, if you want, you + * can create and return subclass objects based on the value of ofKind. + * Simply add the cases to the switch for all those special cases. + * For example, if you have a subclass of Token called IDToken that + * you want to create if ofKind is ID, simply add something like : + * + * case MyParserConstants.ID : return new IDToken(ofKind, image); + * + * to the following switch statement. Then you can cast matchedToken + * variable to the appropriate type and use sit in your lexical actions. + */ + public static Token newToken(int ofKind, String image) + { + switch(ofKind) + { + default : return new Token(ofKind, image); + } + } + + public static Token newToken(int ofKind) + { + return newToken(ofKind, null); + } + +} +/* JavaCC - OriginalChecksum=e16af3189395a5ac351db220894b5f48 (do not edit this line) */ diff -U 3 -dHrN -- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/vhdl/TokenMgrError.java vdt/_generated/com/elphel/vdt/veditor/parser/vhdl/TokenMgrError.java --- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/vhdl/TokenMgrError.java 2017-11-28 14:28:04.238793287 -0700 +++ vdt/_generated/com/elphel/vdt/veditor/parser/vhdl/TokenMgrError.java 2017-11-28 14:28:04.194794586 -0700 @@ -1,138 +1,147 @@ -/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */ -package net.sourceforge.veditor.parser; - -public class TokenMgrError extends Error -{ - /* - * Ordinals for various reasons why an Error of this type can be thrown. - */ - - /** - * - */ - private static final long serialVersionUID = 8717981741131339532L; - -/** - * Lexical error occured. - */ - static final int LEXICAL_ERROR = 0; - - /** - * An attempt wass made to create a second instance of a static token manager. - */ - static final int STATIC_LEXER_ERROR = 1; - - /** - * Tried to change to an invalid lexical state. - */ - static final int INVALID_LEXICAL_STATE = 2; - - /** - * Detected (and bailed out of) an infinite loop in the token manager. - */ - static final int LOOP_DETECTED = 3; - - /** - * Indicates the reason why the exception is thrown. It will have - * one of the above 4 values. - */ - int errorCode; - - /** - * Replaces unprintable characters by their espaced (or unicode escaped) - * equivalents in the given string - */ - protected static final String addEscapes(String str) { - StringBuffer retval = new StringBuffer(); - char ch; - for (int i = 0; i < str.length(); i++) { - switch (str.charAt(i)) - { - case 0 : - continue; - case '\b': - retval.append("\\b"); - continue; - case '\t': - retval.append("\\t"); - continue; - case '\n': - retval.append("\\n"); - continue; - case '\f': - retval.append("\\f"); - continue; - case '\r': - retval.append("\\r"); - continue; - case '\"': - retval.append("\\\""); - continue; - case '\'': - retval.append("\\\'"); - continue; - case '\\': - retval.append("\\\\"); - continue; - default: - if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { - String s = "0000" + Integer.toString(ch, 16); - retval.append("\\u" + s.substring(s.length() - 4, s.length())); - } else { - retval.append(ch); - } - continue; - } - } - return retval.toString(); - } - - /** - * Returns a detailed message for the Error when it is thrown by the - * token manager to indicate a lexical error. - * Parameters : - * EOFSeen : indicates if EOF caused the lexicl error - * curLexState : lexical state in which this error occured - * errorLine : line number when the error occured - * errorColumn : column number when the error occured - * errorAfter : prefix that was seen before this error occured - * curchar : the offending character - * Note: You can customize the lexical error message by modifying this method. - */ - protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { - return("Lexical error at line " + - errorLine + ", column " + - errorColumn + ". Encountered: " + - (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + - "after : \"" + addEscapes(errorAfter) + "\""); - } - - /** - * You can also modify the body of this method to customize your error messages. - * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not - * of end-users concern, so you can return something like : - * - * "Internal Error : Please file a bug report .... " - * - * from this method for such cases in the release version of your parser. - */ - public String getMessage() { - return super.getMessage(); - } - - /* - * Constructors of various flavors follow. - */ - - public TokenMgrError() { - } - - public TokenMgrError(String message, int reason) { - super(message); - errorCode = reason; - } - - public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { - this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); - } -} +/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 6.0 */ +/* JavaCCOptions: */ +package com.elphel.vdt.veditor.parser.vhdl; + +/** Token Manager Error. */ +public class TokenMgrError extends Error +{ + + /** + * The version identifier for this Serializable class. + * Increment only if the serialized form of the + * class changes. + */ + private static final long serialVersionUID = 1L; + + /* + * Ordinals for various reasons why an Error of this type can be thrown. + */ + + /** + * Lexical error occurred. + */ + static final int LEXICAL_ERROR = 0; + + /** + * An attempt was made to create a second instance of a static token manager. + */ + static final int STATIC_LEXER_ERROR = 1; + + /** + * Tried to change to an invalid lexical state. + */ + static final int INVALID_LEXICAL_STATE = 2; + + /** + * Detected (and bailed out of) an infinite loop in the token manager. + */ + static final int LOOP_DETECTED = 3; + + /** + * Indicates the reason why the exception is thrown. It will have + * one of the above 4 values. + */ + int errorCode; + + /** + * Replaces unprintable characters by their escaped (or unicode escaped) + * equivalents in the given string + */ + protected static final String addEscapes(String str) { + StringBuffer retval = new StringBuffer(); + char ch; + for (int i = 0; i < str.length(); i++) { + switch (str.charAt(i)) + { + case 0 : + continue; + case '\b': + retval.append("\\b"); + continue; + case '\t': + retval.append("\\t"); + continue; + case '\n': + retval.append("\\n"); + continue; + case '\f': + retval.append("\\f"); + continue; + case '\r': + retval.append("\\r"); + continue; + case '\"': + retval.append("\\\""); + continue; + case '\'': + retval.append("\\\'"); + continue; + case '\\': + retval.append("\\\\"); + continue; + default: + if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) { + String s = "0000" + Integer.toString(ch, 16); + retval.append("\\u" + s.substring(s.length() - 4, s.length())); + } else { + retval.append(ch); + } + continue; + } + } + return retval.toString(); + } + + /** + * Returns a detailed message for the Error when it is thrown by the + * token manager to indicate a lexical error. + * Parameters : + * EOFSeen : indicates if EOF caused the lexical error + * curLexState : lexical state in which this error occurred + * errorLine : line number when the error occurred + * errorColumn : column number when the error occurred + * errorAfter : prefix that was seen before this error occurred + * curchar : the offending character + * Note: You can customize the lexical error message by modifying this method. + */ + protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) { + return("Lexical error at line " + + errorLine + ", column " + + errorColumn + ". Encountered: " + + (EOFSeen ? " " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") + + "after : \"" + addEscapes(errorAfter) + "\""); + } + + /** + * You can also modify the body of this method to customize your error messages. + * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not + * of end-users concern, so you can return something like : + * + * "Internal Error : Please file a bug report .... " + * + * from this method for such cases in the release version of your parser. + */ + public String getMessage() { + return super.getMessage(); + } + + /* + * Constructors of various flavors follow. + */ + + /** No arg constructor. */ + public TokenMgrError() { + } + + /** Constructor with message and reason. */ + public TokenMgrError(String message, int reason) { + super(message); + errorCode = reason; + } + + /** Full Constructor. */ + public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) { + this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason); + } +} +/* JavaCC - OriginalChecksum=c41bdfb9ac964ae021f18dc192808dd1 (do not edit this line) */ diff -U 3 -dHrN -- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/vhdl/VhdlParserCoreConstants.java vdt/_generated/com/elphel/vdt/veditor/parser/vhdl/VhdlParserCoreConstants.java --- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/vhdl/VhdlParserCoreConstants.java 2017-11-28 14:28:04.250792933 -0700 +++ vdt/_generated/com/elphel/vdt/veditor/parser/vhdl/VhdlParserCoreConstants.java 2017-11-28 14:28:04.194794586 -0700 @@ -1,154 +1,491 @@ -/* Generated By:JavaCC: Do not edit this line. VhdlParserCoreConstants.java */ -package net.sourceforge.veditor.parser; - -public interface VhdlParserCoreConstants { - - int EOF = 0; - int MULTI_LINE_COMMENT = 2; - int SINGLE_LINE_COMMENT = 9; - int LIBRARY = 10; - int BODY = 11; - int PACKAGE = 12; - int USE = 13; - int ENTITY = 14; - int ARCHITECTURE = 15; - int IS = 16; - int OF = 17; - int RECORD = 18; - int GENERIC = 19; - int PORT = 20; - int PROCESS = 21; - int BEGIN = 22; - int END = 23; - int CONSTANT = 24; - int PROCEDURE = 25; - int FUNCTION = 26; - int SIGNAL = 27; - int SHARED = 28; - int VARIABLE = 29; - int TYPE = 30; - int SUBTYPE = 31; - int FILE = 32; - int ALIAS = 33; - int ATTRIBUTE = 34; - int COMPONENT = 35; - int FOR = 36; - int IF = 37; - int CASE = 38; - int LOOP = 39; - int RETURN = 40; - int DISCONNECT = 41; - int GROUP = 42; - int BLOCK = 43; - int ASSERT = 44; - int GENERATE = 45; - int CONFIGURATION = 46; - int LABEL = 47; - int LITERAL = 48; - int UNITS = 49; - int TO = 50; - int RANGE = 51; - int WITH = 52; - int OTHERS = 53; - int ALL = 54; - int MODE = 55; - int LPAREN = 56; - int RPAREN = 57; - int LBRACE = 58; - int RBRACE = 59; - int LBRACKET = 60; - int RBRACKET = 61; - int EOS = 62; - int PARA = 63; - int AT = 64; - int BQ = 65; - int DOLLAR = 66; - int COMMA = 67; - int COLON = 68; - int ASSIGN = 69; - int EQUAL = 70; - int IDENT = 71; - int SPC_CHAR = 72; - int OTHER = 73; - - int DEFAULT = 0; - int IN_MULTI_LINE_COMMENT = 1; - - String[] tokenImage = { - "", - "\"/*\"", - "\"*/\"", - "", - "\" \"", - "\"\\t\"", - "\"\\r\"", - "\"\\n\"", - "\"\\f\"", - "", - "\"library\"", - "\"body\"", - "\"package\"", - "\"use\"", - "\"entity\"", - "\"architecture\"", - "\"is\"", - "\"of\"", - "\"record\"", - "\"generic\"", - "\"port\"", - "\"process\"", - "\"begin\"", - "\"end\"", - "\"constant\"", - "\"procedure\"", - "\"function\"", - "\"signal\"", - "\"shared\"", - "\"variable\"", - "\"type\"", - "\"subtype\"", - "\"file\"", - "\"alias\"", - "\"attribute\"", - "\"component\"", - "\"for\"", - "\"if\"", - "\"case\"", - "\"loop\"", - "\"return\"", - "\"disconnect\"", - "\"group\"", - "\"block\"", - "\"assert\"", - "\"generate\"", - "\"configuration\"", - "\"lable\"", - "\"literal\"", - "\"units\"", - "\"to\"", - "\"range\"", - "\"with\"", - "\"others\"", - "\"all\"", - "", - "\"(\"", - "\")\"", - "\"{\"", - "\"}\"", - "\"[\"", - "\"]\"", - "\";\"", - "\"#\"", - "\"@\"", - "\"`\"", - "\"$\"", - "\",\"", - "\":\"", - "\"<=\"", - "\"=\"", - "", - "", - "\"[.]\"", - }; - -} +/* Generated By:JJTree&JavaCC: Do not edit this line. VhdlParserCoreConstants.java */ +package com.elphel.vdt.veditor.parser.vhdl; + + +/** + * Token literal values and constants. + * Generated by org.javacc.parser.OtherFilesGen#start() + */ +public interface VhdlParserCoreConstants { + + /** End of File. */ + int EOF = 0; + /** RegularExpression Id. */ + int COMMENT = 6; + /** RegularExpression Id. */ + int ABS = 7; + /** RegularExpression Id. */ + int ACCESS = 8; + /** RegularExpression Id. */ + int ACROSS = 9; + /** RegularExpression Id. */ + int AFTER = 10; + /** RegularExpression Id. */ + int ALIAS = 11; + /** RegularExpression Id. */ + int ALL = 12; + /** RegularExpression Id. */ + int AND = 13; + /** RegularExpression Id. */ + int ARCHITECTURE = 14; + /** RegularExpression Id. */ + int ARRAY = 15; + /** RegularExpression Id. */ + int ASSERT = 16; + /** RegularExpression Id. */ + int ATTRIBUTE = 17; + /** RegularExpression Id. */ + int BEGIN = 18; + /** RegularExpression Id. */ + int BLOCK = 19; + /** RegularExpression Id. */ + int BODY = 20; + /** RegularExpression Id. */ + int BREAK = 21; + /** RegularExpression Id. */ + int BUFFER = 22; + /** RegularExpression Id. */ + int BUS = 23; + /** RegularExpression Id. */ + int CASE = 24; + /** RegularExpression Id. */ + int COMPONENT = 25; + /** RegularExpression Id. */ + int CONFIGURATION = 26; + /** RegularExpression Id. */ + int CONSTANT = 27; + /** RegularExpression Id. */ + int DISCONNECT = 28; + /** RegularExpression Id. */ + int DOWNTO = 29; + /** RegularExpression Id. */ + int ELSE = 30; + /** RegularExpression Id. */ + int ELSIF = 31; + /** RegularExpression Id. */ + int END = 32; + /** RegularExpression Id. */ + int ENTITY = 33; + /** RegularExpression Id. */ + int EXIT = 34; + /** RegularExpression Id. */ + int FILE = 35; + /** RegularExpression Id. */ + int FOR = 36; + /** RegularExpression Id. */ + int FUNCTION = 37; + /** RegularExpression Id. */ + int GENERATE = 38; + /** RegularExpression Id. */ + int GENERIC = 39; + /** RegularExpression Id. */ + int GROUP = 40; + /** RegularExpression Id. */ + int GUARDED = 41; + /** RegularExpression Id. */ + int IF = 42; + /** RegularExpression Id. */ + int IMPURE = 43; + /** RegularExpression Id. */ + int IN = 44; + /** RegularExpression Id. */ + int INERTIAL = 45; + /** RegularExpression Id. */ + int INOUT = 46; + /** RegularExpression Id. */ + int IS = 47; + /** RegularExpression Id. */ + int LABEL = 48; + /** RegularExpression Id. */ + int LIBRARY = 49; + /** RegularExpression Id. */ + int LINKAGE = 50; + /** RegularExpression Id. */ + int LITERAL = 51; + /** RegularExpression Id. */ + int LOOP = 52; + /** RegularExpression Id. */ + int MAP = 53; + /** RegularExpression Id. */ + int MOD = 54; + /** RegularExpression Id. */ + int NAND = 55; + /** RegularExpression Id. */ + int NATURE = 56; + /** RegularExpression Id. */ + int NEW = 57; + /** RegularExpression Id. */ + int NEXT = 58; + /** RegularExpression Id. */ + int NOISE = 59; + /** RegularExpression Id. */ + int NOR = 60; + /** RegularExpression Id. */ + int NOT = 61; + /** RegularExpression Id. */ + int NULL = 62; + /** RegularExpression Id. */ + int OF = 63; + /** RegularExpression Id. */ + int ON = 64; + /** RegularExpression Id. */ + int OPEN = 65; + /** RegularExpression Id. */ + int OR = 66; + /** RegularExpression Id. */ + int OTHERS = 67; + /** RegularExpression Id. */ + int OUT = 68; + /** RegularExpression Id. */ + int PACKAGE = 69; + /** RegularExpression Id. */ + int PORT = 70; + /** RegularExpression Id. */ + int POSTPONED = 71; + /** RegularExpression Id. */ + int PROCEDURAL = 72; + /** RegularExpression Id. */ + int PROCEDURE = 73; + /** RegularExpression Id. */ + int PROCESS = 74; + /** RegularExpression Id. */ + int PROTECTED = 75; + /** RegularExpression Id. */ + int PURE = 76; + /** RegularExpression Id. */ + int QUANTITY = 77; + /** RegularExpression Id. */ + int RANGE = 78; + /** RegularExpression Id. */ + int RECORD = 79; + /** RegularExpression Id. */ + int REGISTER = 80; + /** RegularExpression Id. */ + int REJECT = 81; + /** RegularExpression Id. */ + int REM = 82; + /** RegularExpression Id. */ + int REPORT = 83; + /** RegularExpression Id. */ + int RETURN = 84; + /** RegularExpression Id. */ + int ROL = 85; + /** RegularExpression Id. */ + int ROR = 86; + /** RegularExpression Id. */ + int SELECT = 87; + /** RegularExpression Id. */ + int SEVERITY = 88; + /** RegularExpression Id. */ + int SIGNAL = 89; + /** RegularExpression Id. */ + int SHARED = 90; + /** RegularExpression Id. */ + int SLA = 91; + /** RegularExpression Id. */ + int SLL = 92; + /** RegularExpression Id. */ + int SPECTRUM = 93; + /** RegularExpression Id. */ + int SRA = 94; + /** RegularExpression Id. */ + int SRL = 95; + /** RegularExpression Id. */ + int SUBNATURE = 96; + /** RegularExpression Id. */ + int SUBTYPE = 97; + /** RegularExpression Id. */ + int TERMINAL = 98; + /** RegularExpression Id. */ + int THEN = 99; + /** RegularExpression Id. */ + int THROUGH = 100; + /** RegularExpression Id. */ + int TO = 101; + /** RegularExpression Id. */ + int TOLERANCE = 102; + /** RegularExpression Id. */ + int TRANSPORT = 103; + /** RegularExpression Id. */ + int TYPE = 104; + /** RegularExpression Id. */ + int UNAFFECTED = 105; + /** RegularExpression Id. */ + int UNITS = 106; + /** RegularExpression Id. */ + int UNTIL = 107; + /** RegularExpression Id. */ + int USE = 108; + /** RegularExpression Id. */ + int VARIABLE = 109; + /** RegularExpression Id. */ + int WAIT = 110; + /** RegularExpression Id. */ + int WHEN = 111; + /** RegularExpression Id. */ + int WHILE = 112; + /** RegularExpression Id. */ + int WITH = 113; + /** RegularExpression Id. */ + int XNOR = 114; + /** RegularExpression Id. */ + int XOR = 115; + /** RegularExpression Id. */ + int upper_case_letter = 116; + /** RegularExpression Id. */ + int lower_case_letter = 117; + /** RegularExpression Id. */ + int digit = 118; + /** RegularExpression Id. */ + int extended_digit = 119; + /** RegularExpression Id. */ + int special_character = 120; + /** RegularExpression Id. */ + int other_special_character = 121; + /** RegularExpression Id. */ + int format_effector = 122; + /** RegularExpression Id. */ + int base_specifier = 123; + /** RegularExpression Id. */ + int underline = 124; + /** RegularExpression Id. */ + int letter = 125; + /** RegularExpression Id. */ + int letter_or_digit = 126; + /** RegularExpression Id. */ + int integer = 127; + /** RegularExpression Id. */ + int base = 128; + /** RegularExpression Id. */ + int based_integer = 129; + /** RegularExpression Id. */ + int based_literal = 130; + /** RegularExpression Id. */ + int basic_character = 131; + /** RegularExpression Id. */ + int basic_graphic_character = 132; + /** RegularExpression Id. */ + int basic_identifier = 133; + /** RegularExpression Id. */ + int bit_string_literal = 134; + /** RegularExpression Id. */ + int bit_value = 135; + /** RegularExpression Id. */ + int character_literal = 136; + /** RegularExpression Id. */ + int decimal_literal = 137; + /** RegularExpression Id. */ + int exponent = 138; + /** RegularExpression Id. */ + int extended_identifier = 139; + /** RegularExpression Id. */ + int graphic_character = 140; + /** RegularExpression Id. */ + int string_literal = 141; + /** RegularExpression Id. */ + int EXP = 142; + /** RegularExpression Id. */ + int MUL = 143; + /** RegularExpression Id. */ + int DIV = 144; + /** RegularExpression Id. */ + int ADD = 145; + /** RegularExpression Id. */ + int SUB = 146; + /** RegularExpression Id. */ + int CONCAT = 147; + /** RegularExpression Id. */ + int EQ = 148; + /** RegularExpression Id. */ + int NEQ = 149; + /** RegularExpression Id. */ + int GE = 150; + /** RegularExpression Id. */ + int LE = 151; + /** RegularExpression Id. */ + int GT = 152; + /** RegularExpression Id. */ + int LO = 153; + /** RegularExpression Id. */ + int SEMICOLON = 154; + /** RegularExpression Id. */ + int COLON = 155; + /** RegularExpression Id. */ + int ASSIGN = 156; + /** RegularExpression Id. */ + int RARROW = 157; + + /** Lexical state. */ + int DEFAULT = 0; + + /** Literal token values. */ + String[] tokenImage = { + "", + "\" \"", + "\"\\n\"", + "\"\\r\"", + "\"\\t\"", + "\"\\f\"", + "", + "\"abs\"", + "\"access\"", + "\"across\"", + "\"after\"", + "\"alias\"", + "\"all\"", + "\"and\"", + "\"architecture\"", + "\"array\"", + "\"assert\"", + "\"attribute\"", + "\"begin\"", + "\"block\"", + "\"body\"", + "\"break\"", + "\"buffer\"", + "\"bus\"", + "\"case\"", + "\"component\"", + "\"configuration\"", + "\"constant\"", + "\"disconnect\"", + "\"downto\"", + "\"else\"", + "\"elsif\"", + "\"end\"", + "\"entity\"", + "\"exit\"", + "\"file\"", + "\"for\"", + "\"function\"", + "\"generate\"", + "\"generic\"", + "\"group\"", + "\"guarded\"", + "\"if\"", + "\"impure\"", + "\"in\"", + "\"inertial\"", + "\"inout\"", + "\"is\"", + "\"label\"", + "\"library\"", + "\"linkage\"", + "\"literal\"", + "\"loop\"", + "\"map\"", + "\"mod\"", + "\"nand\"", + "\"nature\"", + "\"new\"", + "\"next\"", + "\"noise\"", + "\"nor\"", + "\"not\"", + "\"null\"", + "\"of\"", + "\"on\"", + "\"open\"", + "\"or\"", + "\"others\"", + "\"out\"", + "\"package\"", + "\"port\"", + "\"postponed\"", + "\"procedural\"", + "\"procedure\"", + "\"process\"", + "\"protected\"", + "\"pure\"", + "\"quantity\"", + "\"range\"", + "\"record\"", + "\"register\"", + "\"reject\"", + "\"rem\"", + "\"report\"", + "\"return\"", + "\"rol\"", + "\"ror\"", + "\"select\"", + "\"severity\"", + "\"signal\"", + "\"shared\"", + "\"sla\"", + "\"sll\"", + "\"spectrum\"", + "\"sra\"", + "\"srl\"", + "\"subnature\"", + "\"subtype\"", + "\"terminal\"", + "\"then\"", + "\"through\"", + "\"to\"", + "\"tolerance\"", + "\"transport\"", + "\"type\"", + "\"unaffected\"", + "\"units\"", + "\"until\"", + "\"use\"", + "\"variable\"", + "\"wait\"", + "\"when\"", + "\"while\"", + "\"with\"", + "\"xnor\"", + "\"xor\"", + "", + "", + "", + "", + "", + "", + "", + "", + "\"_\"", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "\"**\"", + "\"*\"", + "\"/\"", + "\"+\"", + "\"-\"", + "\"&\"", + "\"=\"", + "\"/=\"", + "\">=\"", + "\"<=\"", + "\">\"", + "\"<\"", + "\";\"", + "\":\"", + "\":=\"", + "\"=>\"", + "\"(\"", + "\")\"", + "\",\"", + "\"\\\'\"", + "\"|\"", + "\"<>\"", + "\".\"", + "\"==\"", + }; + +} diff -U 3 -dHrN -- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/vhdl/VhdlParserCore.java vdt/_generated/com/elphel/vdt/veditor/parser/vhdl/VhdlParserCore.java --- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/vhdl/VhdlParserCore.java 2017-11-28 14:28:04.250792933 -0700 +++ vdt/_generated/com/elphel/vdt/veditor/parser/vhdl/VhdlParserCore.java 2017-11-28 14:28:04.194794586 -0700 @@ -1,1311 +1,21173 @@ -/* Generated By:JavaCC: Do not edit this line. VhdlParserCore.java */ -package net.sourceforge.veditor.parser; - -public abstract class VhdlParserCore implements VhdlParserCoreConstants { - protected abstract void addModule(int begin, String name); - protected abstract void endModule(int line); - protected abstract void addPort(int line, String portName); - protected abstract void addVariable(int line, String varName); - protected abstract void addParameter(int line, String name); - protected abstract void addElement(int begin, int end, String type, String name); - protected abstract void addInstance(int begin, int end, String module, String inst); - protected abstract void beginStatement(); - protected abstract void endStatement(); - protected abstract void setPrefix(String fix); - protected abstract void setPostfix(String fix); - - public void parse() throws ParseException - { - modules(); - } - - final public void modules() throws ParseException { - label_1: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case LIBRARY: - jj_consume_token(LIBRARY); - skipTo(EOS); - break; - case USE: - jj_consume_token(USE); - skipTo(EOS); - break; - case ENTITY: - entity(); - break; - case ARCHITECTURE: - architecture(); - break; - case PACKAGE: - packageDef(); - break; - default: - jj_la1[0] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case LIBRARY: - case PACKAGE: - case USE: - case ENTITY: - case ARCHITECTURE: - ; - break; - default: - jj_la1[1] = jj_gen; - break label_1; - } - } - } - - final public void entity() throws ParseException { - Token name ; - Token end ; - jj_consume_token(ENTITY); - name = identifier(); - jj_consume_token(IS); - addModule( name.beginLine, name.image ); - label_2: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case GENERIC: - case PORT: - ; - break; - default: - jj_la1[2] = jj_gen; - break label_2; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case GENERIC: - genericList(); - break; - case PORT: - portList(); - break; - default: - jj_la1[3] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - label_3: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ATTRIBUTE: - ; - break; - default: - jj_la1[4] = jj_gen; - break label_3; - } - attributeList(); - } - jj_consume_token(END); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ENTITY: - jj_consume_token(ENTITY); - break; - default: - jj_la1[5] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENT: - identifier(); - break; - default: - jj_la1[6] = jj_gen; - ; - } - end = jj_consume_token(EOS); - endModule( end.beginLine ); - } - - final public void architecture() throws ParseException { - Token end; - jj_consume_token(ARCHITECTURE); - identifier(); - jj_consume_token(OF); - identifier(); - jj_consume_token(IS); - moduleBody(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ARCHITECTURE: - jj_consume_token(ARCHITECTURE); - break; - default: - jj_la1[7] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENT: - identifier(); - break; - default: - jj_la1[8] = jj_gen; - ; - } - end = jj_consume_token(EOS); - endModule( end.beginLine ); - } - - final public void packageDef() throws ParseException { - Token name ; - Token end ; - jj_consume_token(PACKAGE); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case BODY: - jj_consume_token(BODY); - break; - default: - jj_la1[9] = jj_gen; - ; - } - identifier(); - jj_consume_token(IS); - label_4: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case CONSTANT: - case PROCEDURE: - case FUNCTION: - case SIGNAL: - case SHARED: - case VARIABLE: - case TYPE: - case SUBTYPE: - case FILE: - case ALIAS: - case ATTRIBUTE: - case FOR: - case DISCONNECT: - case GROUP: - packageDeclaration(); - break; - case COMPONENT: - jj_consume_token(COMPONENT); - name = identifier(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IS: - jj_consume_token(IS); - break; - default: - jj_la1[10] = jj_gen; - ; - } - addModule( name.beginLine, name.image ); - label_5: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case GENERIC: - case PORT: - ; - break; - default: - jj_la1[11] = jj_gen; - break label_5; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case GENERIC: - genericList(); - break; - case PORT: - portList(); - break; - default: - jj_la1[12] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - end = jj_consume_token(END); - jj_consume_token(COMPONENT); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENT: - identifier(); - break; - default: - jj_la1[13] = jj_gen; - ; - } - jj_consume_token(EOS); - endModule( end.beginLine ); - break; - default: - jj_la1[14] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case CONSTANT: - case PROCEDURE: - case FUNCTION: - case SIGNAL: - case SHARED: - case VARIABLE: - case TYPE: - case SUBTYPE: - case FILE: - case ALIAS: - case ATTRIBUTE: - case COMPONENT: - case FOR: - case DISCONNECT: - case GROUP: - ; - break; - default: - jj_la1[15] = jj_gen; - break label_4; - } - } - jj_consume_token(END); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case PACKAGE: - jj_consume_token(PACKAGE); - break; - default: - jj_la1[16] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case BODY: - jj_consume_token(BODY); - break; - default: - jj_la1[17] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENT: - identifier(); - break; - default: - jj_la1[18] = jj_gen; - ; - } - jj_consume_token(EOS); - } - - final public void genericList() throws ParseException { - jj_consume_token(GENERIC); - jj_consume_token(LPAREN); - genericElement(); - label_6: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case EOS: - ; - break; - default: - jj_la1[19] = jj_gen; - break label_6; - } - jj_consume_token(EOS); - genericElement(); - } - jj_consume_token(RPAREN); - jj_consume_token(EOS); - } - - final public void genericElement() throws ParseException { - Token port; - Token postfix; - setPrefix("port "); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case CONSTANT: - case SIGNAL: - case VARIABLE: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case CONSTANT: - jj_consume_token(CONSTANT); - break; - case SIGNAL: - jj_consume_token(SIGNAL); - break; - case VARIABLE: - jj_consume_token(VARIABLE); - break; - default: - jj_la1[20] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[21] = jj_gen; - ; - } - port = identifier(); - addParameter(port.beginLine, port.image); - label_7: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[22] = jj_gen; - break label_7; - } - jj_consume_token(COMMA); - port = identifier(); - addParameter(port.beginLine, port.image); - } - jj_consume_token(COLON); - postfix = interfaceElementIndication(); - setPostfix(postfix.image); - } - - final public void portList() throws ParseException { - jj_consume_token(PORT); - jj_consume_token(LPAREN); - portElement(); - label_8: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case EOS: - ; - break; - default: - jj_la1[23] = jj_gen; - break label_8; - } - jj_consume_token(EOS); - portElement(); - } - jj_consume_token(RPAREN); - jj_consume_token(EOS); - } - - final public void attributeList() throws ParseException { - jj_consume_token(ATTRIBUTE); - identifier(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case OF: - jj_consume_token(OF); - entityNameList(); - jj_consume_token(COLON); - entityClass(); - jj_consume_token(IS); - break; - case COLON: - jj_consume_token(COLON); - identifier(); - break; - default: - jj_la1[24] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - skipTo(EOS); - } - - final public void entityClass() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ENTITY: - jj_consume_token(ENTITY); - break; - case ARCHITECTURE: - jj_consume_token(ARCHITECTURE); - break; - case CONFIGURATION: - jj_consume_token(CONFIGURATION); - break; - case PACKAGE: - jj_consume_token(PACKAGE); - break; - case PROCEDURE: - jj_consume_token(PROCEDURE); - break; - case FUNCTION: - jj_consume_token(FUNCTION); - break; - case TYPE: - jj_consume_token(TYPE); - break; - case SUBTYPE: - jj_consume_token(SUBTYPE); - break; - case CONSTANT: - jj_consume_token(CONSTANT); - break; - case SIGNAL: - jj_consume_token(SIGNAL); - break; - case VARIABLE: - jj_consume_token(VARIABLE); - break; - case FILE: - jj_consume_token(FILE); - break; - case COMPONENT: - jj_consume_token(COMPONENT); - break; - case LABEL: - jj_consume_token(LABEL); - break; - case LITERAL: - jj_consume_token(LITERAL); - break; - case UNITS: - jj_consume_token(UNITS); - break; - case GROUP: - jj_consume_token(GROUP); - break; - default: - jj_la1[25] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void entityNameList() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENT: - identifier(); - break; - case OTHERS: - jj_consume_token(OTHERS); - break; - case ALL: - jj_consume_token(ALL); - break; - default: - jj_la1[26] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void portElement() throws ParseException { - Token port; - Token postfix; - setPrefix("port "); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case CONSTANT: - case SIGNAL: - case VARIABLE: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case CONSTANT: - jj_consume_token(CONSTANT); - break; - case SIGNAL: - jj_consume_token(SIGNAL); - break; - case VARIABLE: - jj_consume_token(VARIABLE); - break; - default: - jj_la1[27] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - break; - default: - jj_la1[28] = jj_gen; - ; - } - port = identifier(); - addPort(port.beginLine, port.image); - label_9: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[29] = jj_gen; - break label_9; - } - jj_consume_token(COMMA); - port = identifier(); - addPort(port.beginLine, port.image); - } - jj_consume_token(COLON); - postfix = interfaceElementIndication(); - setPostfix(" : " + postfix.image); - } - - final public void moduleBody() throws ParseException { - Token module, inst, iend ; - label_10: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case CONSTANT: - case PROCEDURE: - case FUNCTION: - case SIGNAL: - case SHARED: - case VARIABLE: - case TYPE: - case SUBTYPE: - case FILE: - case ALIAS: - case ATTRIBUTE: - case COMPONENT: - case FOR: - case DISCONNECT: - case GROUP: - ; - break; - default: - jj_la1[30] = jj_gen; - break label_10; - } - declaration(); - } - jj_consume_token(BEGIN); - label_11: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case PROCESS: - case BLOCK: - case ASSERT: - case WITH: - case IDENT: - ; - break; - default: - jj_la1[31] = jj_gen; - break label_11; - } - statement(); - } - jj_consume_token(END); - } - - final public Token identifier() throws ParseException { - Token token ; - token = jj_consume_token(IDENT); - {if (true) return token ;} - throw new Error("Missing return statement in function"); - } - - final public void packageDeclaration() throws ParseException { - Token variable; - Token postfix; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case CONSTANT: - case SIGNAL: - case SHARED: - case VARIABLE: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case CONSTANT: - jj_consume_token(CONSTANT); - break; - case SIGNAL: - jj_consume_token(SIGNAL); - break; - case SHARED: - case VARIABLE: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case SHARED: - jj_consume_token(SHARED); - break; - default: - jj_la1[32] = jj_gen; - ; - } - jj_consume_token(VARIABLE); - break; - default: - jj_la1[33] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - setPrefix(token.image + " "); - variable = identifier(); - addVariable(variable.beginLine, variable.image); - label_12: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMA: - ; - break; - default: - jj_la1[34] = jj_gen; - break label_12; - } - jj_consume_token(COMMA); - variable = identifier(); - addVariable(variable.beginLine, variable.image); - } - jj_consume_token(COLON); - postfix = interfaceElementIndication(); - setPostfix(" : " + postfix.image); - jj_consume_token(EOS); - break; - case TYPE: - case SUBTYPE: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case TYPE: - jj_consume_token(TYPE); - break; - case SUBTYPE: - jj_consume_token(SUBTYPE); - break; - default: - jj_la1[35] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - identifier(); - jj_consume_token(IS); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case RECORD: - jj_consume_token(RECORD); - skipEnd(); - jj_consume_token(END); - jj_consume_token(RECORD); - jj_consume_token(EOS); - break; - default: - jj_la1[36] = jj_gen; - skipTo(EOS); - } - break; - case FILE: - case ALIAS: - case ATTRIBUTE: - case FOR: - case DISCONNECT: - case GROUP: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case FILE: - jj_consume_token(FILE); - break; - case ALIAS: - jj_consume_token(ALIAS); - break; - case ATTRIBUTE: - jj_consume_token(ATTRIBUTE); - break; - case FOR: - jj_consume_token(FOR); - break; - case DISCONNECT: - jj_consume_token(DISCONNECT); - break; - case GROUP: - jj_consume_token(GROUP); - break; - default: - jj_la1[37] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - skipTo(EOS); - break; - case PROCEDURE: - jj_consume_token(PROCEDURE); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case EOS: - jj_consume_token(EOS); - break; - default: - jj_la1[40] = jj_gen; - skipTo(BEGIN); - skipEnd(); - jj_consume_token(END); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case PROCEDURE: - jj_consume_token(PROCEDURE); - break; - default: - jj_la1[38] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENT: - identifier(); - break; - default: - jj_la1[39] = jj_gen; - ; - } - jj_consume_token(EOS); - } - break; - case FUNCTION: - jj_consume_token(FUNCTION); - skipTo(RETURN); - identifier(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case EOS: - jj_consume_token(EOS); - break; - default: - jj_la1[43] = jj_gen; - skipTo(BEGIN); - skipEnd(); - jj_consume_token(END); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case FUNCTION: - jj_consume_token(FUNCTION); - break; - default: - jj_la1[41] = jj_gen; - ; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENT: - identifier(); - break; - default: - jj_la1[42] = jj_gen; - ; - } - jj_consume_token(EOS); - } - break; - default: - jj_la1[44] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void declaration() throws ParseException { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case CONSTANT: - case PROCEDURE: - case FUNCTION: - case SIGNAL: - case SHARED: - case VARIABLE: - case TYPE: - case SUBTYPE: - case FILE: - case ALIAS: - case ATTRIBUTE: - case FOR: - case DISCONNECT: - case GROUP: - packageDeclaration(); - break; - case COMPONENT: - jj_consume_token(COMPONENT); - skipTo2(END, COMPONENT); - skipTo(EOS); - break; - default: - jj_la1[45] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void statement() throws ParseException { - Token ident, module, iend; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENT: - ident = identifier(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COLON: - jj_consume_token(COLON); - beginStatement(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ENTITY: - case IDENT: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ENTITY: - jj_consume_token(ENTITY); - break; - default: - jj_la1[46] = jj_gen; - ; - } - module = identifier(); - iend = skipTo(EOS); - addInstance( ident.beginLine, iend.endLine, module.image, ident.image ); - break; - case COMPONENT: - jj_consume_token(COMPONENT); - module = identifier(); - iend = skipTo(EOS); - addInstance( ident.beginLine, iend.endLine, module.image, ident.image ); - break; - case FOR: - case IF: - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IF: - jj_consume_token(IF); - break; - case FOR: - jj_consume_token(FOR); - break; - default: - jj_la1[47] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - skipTo(GENERATE); - label_13: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case CONSTANT: - case PROCEDURE: - case FUNCTION: - case SIGNAL: - case SHARED: - case VARIABLE: - case TYPE: - case SUBTYPE: - case FILE: - case ALIAS: - case ATTRIBUTE: - case COMPONENT: - case FOR: - case DISCONNECT: - case GROUP: - ; - break; - default: - jj_la1[48] = jj_gen; - break label_13; - } - declaration(); - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case BEGIN: - jj_consume_token(BEGIN); - label_14: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case PROCESS: - case BLOCK: - case ASSERT: - case WITH: - case IDENT: - ; - break; - default: - jj_la1[49] = jj_gen; - break label_14; - } - statement(); - } - break; - case PROCESS: - case BLOCK: - case ASSERT: - case WITH: - case IDENT: - label_15: - while (true) { - statement(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case PROCESS: - case BLOCK: - case ASSERT: - case WITH: - case IDENT: - ; - break; - default: - jj_la1[50] = jj_gen; - break label_15; - } - } - break; - default: - jj_la1[51] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jj_consume_token(END); - jj_consume_token(GENERATE); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENT: - identifier(); - break; - default: - jj_la1[52] = jj_gen; - ; - } - jj_consume_token(EOS); - break; - case PROCESS: - jj_consume_token(PROCESS); - process(); - break; - default: - jj_la1[53] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - endStatement(); - break; - default: - jj_la1[55] = jj_gen; - beginStatement(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case LPAREN: - jj_consume_token(LPAREN); - skipParen(); - jj_consume_token(RPAREN); - break; - default: - jj_la1[54] = jj_gen; - ; - } - skipTo(EOS); - endStatement(); - } - break; - case WITH: - jj_consume_token(WITH); - beginStatement(); - skipTo(EOS); - endStatement(); - break; - case PROCESS: - jj_consume_token(PROCESS); - beginStatement(); - process(); - endStatement(); - break; - case BLOCK: - jj_consume_token(BLOCK); - beginStatement(); - skipTo2(END, BLOCK); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENT: - identifier(); - break; - default: - jj_la1[56] = jj_gen; - ; - } - jj_consume_token(EOS); - endStatement(); - break; - case ASSERT: - jj_consume_token(ASSERT); - beginStatement(); - skipTo(EOS); - endStatement(); - break; - default: - jj_la1[57] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - - final public void process() throws ParseException { - skipTo2(END, PROCESS); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case IDENT: - identifier(); - break; - default: - jj_la1[58] = jj_gen; - ; - } - jj_consume_token(EOS); - } - - void unexpectedEof(Token token) throws ParseException { - ParseException ex = new ParseException("unexpected EOF"); - ex.currentToken = token; - throw ex; - } - - Token skipTo(int skip) throws ParseException { - Token current = token; - Token token; - StringBuffer image = new StringBuffer(); - - for(;;) - { - token = getToken(1); - if ( token.kind == EOF ) - unexpectedEof(current); - if (token.kind == skip) - { - getNextToken(); - break; - } - - image.append(token.image); - getNextToken(); - } - token.image = image.toString(); - return token; - } - - void skipTo2(int skip1, int skip2) throws ParseException { - Token current = token; - Token token; - - for(;;) - { - token = getToken(1); - if (token.kind == EOF) - unexpectedEof(current); - if (token.kind == skip1) - { - getNextToken(); - token = getToken(1); - if (token.kind == skip2) - { - getNextToken(); - break ; - } - } - else - getNextToken(); - } - } - - void skipParen() throws ParseException { - Token current = token; - Token token ; - int nesting = 1 ; - for(;;) - { - token = getToken(1); - if (token.kind == EOF) - unexpectedEof(current); - if (token.kind == LPAREN) - nesting++; - if (token.kind == RPAREN) - { - nesting--; - if (nesting == 0) - break; - } - getNextToken(); - } - } - - void skipEnd() throws ParseException { - Token current = token; - Token token; - int nesting = 1; - for(;;) - { - token = getToken(1); - if (token.kind == EOF) - unexpectedEof(current); - if (token.kind == BEGIN || token.kind == IF || token.kind == CASE || token.kind == LOOP) - nesting++; - if (token.kind == END) - { - nesting--; - if (nesting == 0) - break; - else - getNextToken(); // if or case - } - getNextToken(); - } - } - - Token interfaceElementIndication() throws ParseException { - Token current = token; - Token token ; - StringBuffer image = new StringBuffer(); - int nesting = 1; - - for(;;) - { - token = getToken(1); - if (token.kind == EOF) - unexpectedEof(current); - if (token.kind == LPAREN) - nesting++; - if (token.kind == RPAREN) - { - nesting--; - if (nesting == 0) - break; - } - if (token.kind == EOS) - { - break ; - } - - image.append(token.image + " "); - getNextToken(); - } - token.image = image.toString(); - return token ; - } - - public VhdlParserCoreTokenManager token_source; - JavaCharStream jj_input_stream; - public Token token, jj_nt; - private int jj_ntk; - private int jj_gen; - final private int[] jj_la1 = new int[59]; - static private int[] jj_la1_0; - static private int[] jj_la1_1; - static private int[] jj_la1_2; - static { - jj_la1_0(); - jj_la1_1(); - jj_la1_2(); - } - private static void jj_la1_0() { - jj_la1_0 = new int[] {0xf400,0xf400,0x180000,0x180000,0x0,0x4000,0x0,0x8000,0x0,0x800,0x10000,0x180000,0x180000,0x0,0xff000000,0xff000000,0x1000,0x800,0x0,0x0,0x29000000,0x29000000,0x0,0x0,0x20000,0xef00d000,0x0,0x29000000,0x29000000,0x0,0xff000000,0x200000,0x10000000,0x39000000,0x0,0xc0000000,0x40000,0x0,0x2000000,0x0,0x0,0x4000000,0x0,0x0,0xff000000,0xff000000,0x4000,0x0,0xff000000,0x200000,0x200000,0x600000,0x0,0x204000,0x0,0x0,0x0,0x200000,0x0,}; - } - private static void jj_la1_1() { - jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x61f,0x61f,0x0,0x0,0x0,0x40000000,0x0,0x0,0x0,0x40000000,0x0,0x3c409,0x600000,0x0,0x0,0x0,0x61f,0x101800,0x0,0x0,0x0,0x0,0x0,0x617,0x0,0x0,0x40000000,0x0,0x0,0x40000000,0x617,0x61f,0x0,0x30,0x61f,0x101800,0x101800,0x101800,0x0,0x38,0x1000000,0x0,0x0,0x101800,0x0,}; - } - private static void jj_la1_2() { - jj_la1_2 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x0,0x80,0x0,0x0,0x0,0x0,0x80,0x0,0x0,0x0,0x0,0x80,0x0,0x0,0x0,0x8,0x0,0x10,0x0,0x80,0x0,0x0,0x8,0x0,0x80,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x80,0x0,0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x80,0x80,0x80,0x80,0x0,0x10,0x80,0x80,0x80,}; - } - - public VhdlParserCore(java.io.InputStream stream) { - this(stream, null); - } - public VhdlParserCore(java.io.InputStream stream, String encoding) { - try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } - token_source = new VhdlParserCoreTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 59; i++) jj_la1[i] = -1; - } - - public void ReInit(java.io.InputStream stream) { - ReInit(stream, null); - } - public void ReInit(java.io.InputStream stream, String encoding) { - try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 59; i++) jj_la1[i] = -1; - } - - public VhdlParserCore(java.io.Reader stream) { - jj_input_stream = new JavaCharStream(stream, 1, 1); - token_source = new VhdlParserCoreTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 59; i++) jj_la1[i] = -1; - } - - public void ReInit(java.io.Reader stream) { - jj_input_stream.ReInit(stream, 1, 1); - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 59; i++) jj_la1[i] = -1; - } - - public VhdlParserCore(VhdlParserCoreTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 59; i++) jj_la1[i] = -1; - } - - public void ReInit(VhdlParserCoreTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 59; i++) jj_la1[i] = -1; - } - - final private Token jj_consume_token(int kind) throws ParseException { - Token oldToken; - if ((oldToken = token).next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - if (token.kind == kind) { - jj_gen++; - return token; - } - token = oldToken; - jj_kind = kind; - throw generateParseException(); - } - - final public Token getNextToken() { - if (token.next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - jj_gen++; - return token; - } - - final public Token getToken(int index) { - Token t = token; - for (int i = 0; i < index; i++) { - if (t.next != null) t = t.next; - else t = t.next = token_source.getNextToken(); - } - return t; - } - - final private int jj_ntk() { - if ((jj_nt=token.next) == null) - return (jj_ntk = (token.next=token_source.getNextToken()).kind); - else - return (jj_ntk = jj_nt.kind); - } - - private java.util.Vector jj_expentries = new java.util.Vector(); - private int[] jj_expentry; - private int jj_kind = -1; - - public ParseException generateParseException() { - jj_expentries.removeAllElements(); - boolean[] la1tokens = new boolean[74]; - for (int i = 0; i < 74; i++) { - la1tokens[i] = false; - } - if (jj_kind >= 0) { - la1tokens[jj_kind] = true; - jj_kind = -1; - } - for (int i = 0; i < 59; i++) { - if (jj_la1[i] == jj_gen) { - for (int j = 0; j < 32; j++) { - if ((jj_la1_0[i] & (1< 100) { + jj_gc = 0; + for (int i = 0; i < jj_2_rtns.length; i++) { + JJCalls c = jj_2_rtns[i]; + while (c != null) { + if (c.gen < jj_gen) c.first = null; + c = c.next; + } + } + } + return token; + } + token = oldToken; + jj_kind = kind; + throw generateParseException(); + } + + @SuppressWarnings("serial") + static private final class LookaheadSuccess extends java.lang.Error { } + final private LookaheadSuccess jj_ls = new LookaheadSuccess(); + private boolean jj_scan_token(int kind) { + if (jj_scanpos == jj_lastpos) { + jj_la--; + if (jj_scanpos.next == null) { + jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); + } else { + jj_lastpos = jj_scanpos = jj_scanpos.next; + } + } else { + jj_scanpos = jj_scanpos.next; + } + if (jj_rescan) { + int i = 0; Token tok = token; + while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } + if (tok != null) jj_add_error_token(kind, i); + } + if (jj_scanpos.kind != kind) return true; + if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; + return false; + } + + +/** Get the next Token. */ + final public Token getNextToken() { + if (token.next != null) token = token.next; + else token = token.next = token_source.getNextToken(); + jj_ntk = -1; + jj_gen++; + return token; + } + +/** Get the specific Token. */ + final public Token getToken(int index) { + Token t = token; + for (int i = 0; i < index; i++) { + if (t.next != null) t = t.next; + else t = t.next = token_source.getNextToken(); + } + return t; + } + + private int jj_ntk_f() { + if ((jj_nt=token.next) == null) + return (jj_ntk = (token.next=token_source.getNextToken()).kind); + else + return (jj_ntk = jj_nt.kind); + } + + private java.util.List jj_expentries = new java.util.ArrayList(); + private int[] jj_expentry; + private int jj_kind = -1; + private int[] jj_lasttokens = new int[100]; + private int jj_endpos; + + private void jj_add_error_token(int kind, int pos) { + if (pos >= 100) return; + if (pos == jj_endpos + 1) { + jj_lasttokens[jj_endpos++] = kind; + } else if (jj_endpos != 0) { + jj_expentry = new int[jj_endpos]; + for (int i = 0; i < jj_endpos; i++) { + jj_expentry[i] = jj_lasttokens[i]; + } + jj_entries_loop: for (java.util.Iterator it = jj_expentries.iterator(); it.hasNext();) { + int[] oldentry = (int[])(it.next()); + if (oldentry.length == jj_expentry.length) { + for (int i = 0; i < jj_expentry.length; i++) { + if (oldentry[i] != jj_expentry[i]) { + continue jj_entries_loop; + } + } + jj_expentries.add(jj_expentry); + break jj_entries_loop; + } + } + if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; + } + } + + /** Generate ParseException. */ + public ParseException generateParseException() { + jj_expentries.clear(); + boolean[] la1tokens = new boolean[166]; + if (jj_kind >= 0) { + la1tokens[jj_kind] = true; + jj_kind = -1; + } + for (int i = 0; i < 306; i++) { + if (jj_la1[i] == jj_gen) { + for (int j = 0; j < 32; j++) { + if ((jj_la1_0[i] & (1< jj_gen) { + jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; + switch (i) { + case 0: jj_3_1(); break; + case 1: jj_3_2(); break; + case 2: jj_3_3(); break; + case 3: jj_3_4(); break; + case 4: jj_3_5(); break; + case 5: jj_3_6(); break; + case 6: jj_3_7(); break; + case 7: jj_3_8(); break; + case 8: jj_3_9(); break; + case 9: jj_3_10(); break; + case 10: jj_3_11(); break; + case 11: jj_3_12(); break; + case 12: jj_3_13(); break; + case 13: jj_3_14(); break; + case 14: jj_3_15(); break; + case 15: jj_3_16(); break; + case 16: jj_3_17(); break; + case 17: jj_3_18(); break; + case 18: jj_3_19(); break; + case 19: jj_3_20(); break; + case 20: jj_3_21(); break; + case 21: jj_3_22(); break; + case 22: jj_3_23(); break; + case 23: jj_3_24(); break; + case 24: jj_3_25(); break; + case 25: jj_3_26(); break; + case 26: jj_3_27(); break; + case 27: jj_3_28(); break; + case 28: jj_3_29(); break; + case 29: jj_3_30(); break; + case 30: jj_3_31(); break; + case 31: jj_3_32(); break; + case 32: jj_3_33(); break; + case 33: jj_3_34(); break; + case 34: jj_3_35(); break; + case 35: jj_3_36(); break; + case 36: jj_3_37(); break; + case 37: jj_3_38(); break; + case 38: jj_3_39(); break; + case 39: jj_3_40(); break; + case 40: jj_3_41(); break; + case 41: jj_3_42(); break; + case 42: jj_3_43(); break; + case 43: jj_3_44(); break; + case 44: jj_3_45(); break; + case 45: jj_3_46(); break; + case 46: jj_3_47(); break; + case 47: jj_3_48(); break; + case 48: jj_3_49(); break; + case 49: jj_3_50(); break; + case 50: jj_3_51(); break; + case 51: jj_3_52(); break; + case 52: jj_3_53(); break; + case 53: jj_3_54(); break; + case 54: jj_3_55(); break; + case 55: jj_3_56(); break; + case 56: jj_3_57(); break; + case 57: jj_3_58(); break; + case 58: jj_3_59(); break; + case 59: jj_3_60(); break; + case 60: jj_3_61(); break; + case 61: jj_3_62(); break; + case 62: jj_3_63(); break; + case 63: jj_3_64(); break; + case 64: jj_3_65(); break; + case 65: jj_3_66(); break; + case 66: jj_3_67(); break; + case 67: jj_3_68(); break; + case 68: jj_3_69(); break; + case 69: jj_3_70(); break; + case 70: jj_3_71(); break; + case 71: jj_3_72(); break; + case 72: jj_3_73(); break; + case 73: jj_3_74(); break; + case 74: jj_3_75(); break; + case 75: jj_3_76(); break; + case 76: jj_3_77(); break; + case 77: jj_3_78(); break; + case 78: jj_3_79(); break; + case 79: jj_3_80(); break; + case 80: jj_3_81(); break; + case 81: jj_3_82(); break; + case 82: jj_3_83(); break; + case 83: jj_3_84(); break; + case 84: jj_3_85(); break; + case 85: jj_3_86(); break; + case 86: jj_3_87(); break; + case 87: jj_3_88(); break; + case 88: jj_3_89(); break; + case 89: jj_3_90(); break; + case 90: jj_3_91(); break; + case 91: jj_3_92(); break; + case 92: jj_3_93(); break; + case 93: jj_3_94(); break; + case 94: jj_3_95(); break; + case 95: jj_3_96(); break; + case 96: jj_3_97(); break; + case 97: jj_3_98(); break; + case 98: jj_3_99(); break; + case 99: jj_3_100(); break; + case 100: jj_3_101(); break; + case 101: jj_3_102(); break; + case 102: jj_3_103(); break; + case 103: jj_3_104(); break; + case 104: jj_3_105(); break; + case 105: jj_3_106(); break; + case 106: jj_3_107(); break; + case 107: jj_3_108(); break; + case 108: jj_3_109(); break; + case 109: jj_3_110(); break; + case 110: jj_3_111(); break; + case 111: jj_3_112(); break; + case 112: jj_3_113(); break; + case 113: jj_3_114(); break; + case 114: jj_3_115(); break; + case 115: jj_3_116(); break; + case 116: jj_3_117(); break; + case 117: jj_3_118(); break; + case 118: jj_3_119(); break; + case 119: jj_3_120(); break; + case 120: jj_3_121(); break; + case 121: jj_3_122(); break; + case 122: jj_3_123(); break; + case 123: jj_3_124(); break; + case 124: jj_3_125(); break; + case 125: jj_3_126(); break; + case 126: jj_3_127(); break; + case 127: jj_3_128(); break; + case 128: jj_3_129(); break; + case 129: jj_3_130(); break; + case 130: jj_3_131(); break; + case 131: jj_3_132(); break; + case 132: jj_3_133(); break; + case 133: jj_3_134(); break; + case 134: jj_3_135(); break; + case 135: jj_3_136(); break; + case 136: jj_3_137(); break; + case 137: jj_3_138(); break; + case 138: jj_3_139(); break; + case 139: jj_3_140(); break; + } + } + p = p.next; + } while (p != null); + } catch(LookaheadSuccess ls) { } + } + jj_rescan = false; + } + + private void jj_save(int index, int xla) { + JJCalls p = jj_2_rtns[index]; + while (p.gen > jj_gen) { + if (p.next == null) { p = p.next = new JJCalls(); break; } + p = p.next; + } + p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; + } + + static final class JJCalls { + int gen; + Token first; + int arg; + JJCalls next; + } + +} diff -U 3 -dHrN -- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/vhdl/VhdlParserCoreTokenManager.java vdt/_generated/com/elphel/vdt/veditor/parser/vhdl/VhdlParserCoreTokenManager.java --- vdt-veditor/_generated/com/elphel/vdt/veditor/parser/vhdl/VhdlParserCoreTokenManager.java 2017-11-28 14:28:04.250792933 -0700 +++ vdt/_generated/com/elphel/vdt/veditor/parser/vhdl/VhdlParserCoreTokenManager.java 2017-11-28 14:28:04.194794586 -0700 @@ -1,1426 +1,2572 @@ -/* Generated By:JavaCC: Do not edit this line. VhdlParserCoreTokenManager.java */ -package net.sourceforge.veditor.parser; - -public class VhdlParserCoreTokenManager implements VhdlParserCoreConstants -{ - public java.io.PrintStream debugStream = System.out; - public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } -private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) -{ - switch (pos) - { - case 0: - if ((active0 & 0x80000400800L) != 0L) - { - jjmatchedKind = 71; - return 11; - } - if ((active0 & 0x20000000020000L) != 0L) - { - jjmatchedKind = 71; - return 5; - } - if ((active0 & 0x2000010000L) != 0L) - { - jjmatchedKind = 71; - return 23; - } - if ((active0 & 0x1808000000400L) != 0L) - { - jjmatchedKind = 71; - return 18; - } - if ((active0 & 0x2L) != 0L || (active1 & 0x20L) != 0L) - { - jjmatchedKind = 72; - return -1; - } - if ((active0 & 0x5e775fffbcf000L) != 0L) - { - jjmatchedKind = 71; - return 20; - } - return -1; - case 1: - if ((active0 & 0x7affdffffcf800L) != 0L) - { - jjmatchedKind = 71; - jjmatchedPos = 1; - return 20; - } - if ((active0 & 0x1000000000400L) != 0L) - { - jjmatchedKind = 71; - jjmatchedPos = 1; - return 17; - } - if ((active0 & 0x2L) != 0L || (active1 & 0x20L) != 0L) - { - if (jjmatchedPos == 0) - { - jjmatchedKind = 72; - jjmatchedPos = 0; - } - return -1; - } - if ((active0 & 0x4002000030000L) != 0L) - return 20; - return -1; - case 2: - if ((active0 & 0x3bffcfff7cdc00L) != 0L) - { - jjmatchedKind = 71; - jjmatchedPos = 2; - return 20; - } - if ((active0 & 0x40001000802000L) != 0L) - return 20; - return -1; - case 3: - if ((active0 & 0x1000c140100800L) != 0L) - return 20; - if ((active0 & 0x2bff0ebf6cd400L) != 0L) - { - jjmatchedKind = 71; - jjmatchedPos = 3; - return 20; - } - return -1; - case 4: - if ((active0 & 0x21730cbf2cd400L) != 0L) - { - jjmatchedKind = 71; - jjmatchedPos = 4; - return 20; - } - if ((active0 & 0xa8c0200400000L) != 0L) - return 20; - return -1; - case 5: - if ((active0 & 0x1620ca7289400L) != 0L) - { - jjmatchedKind = 71; - jjmatchedPos = 5; - return 20; - } - if ((active0 & 0x20110018044000L) != 0L) - return 20; - return -1; - case 6: - if ((active0 & 0x620c27008000L) != 0L) - { - jjmatchedKind = 71; - jjmatchedPos = 6; - return 20; - } - if ((active0 & 0x1000080281400L) != 0L) - return 20; - return -1; - case 7: - if ((active0 & 0x420c02008000L) != 0L) - { - jjmatchedKind = 71; - jjmatchedPos = 7; - return 20; - } - if ((active0 & 0x200025000000L) != 0L) - return 20; - return -1; - case 8: - if ((active0 & 0x420000008000L) != 0L) - { - jjmatchedKind = 71; - jjmatchedPos = 8; - return 20; - } - if ((active0 & 0xc02000000L) != 0L) - return 20; - return -1; - case 9: - if ((active0 & 0x400000008000L) != 0L) - { - jjmatchedKind = 71; - jjmatchedPos = 9; - return 20; - } - if ((active0 & 0x20000000000L) != 0L) - return 20; - return -1; - case 10: - if ((active0 & 0x400000008000L) != 0L) - { - jjmatchedKind = 71; - jjmatchedPos = 10; - return 20; - } - return -1; - case 11: - if ((active0 & 0x400000000000L) != 0L) - { - jjmatchedKind = 71; - jjmatchedPos = 11; - return 20; - } - if ((active0 & 0x8000L) != 0L) - return 20; - return -1; - default : - return -1; - } -} -private final int jjStartNfa_0(int pos, long active0, long active1) -{ - return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1); -} -private final int jjStopAtPos(int pos, int kind) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - return pos + 1; -} -private final int jjStartNfaWithStates_0(int pos, int kind, int state) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_0(state, pos + 1); -} -private final int jjMoveStringLiteralDfa0_0() -{ - switch(curChar) - { - case 10: - return jjStopAtPos(0, 7); - case 12: - return jjStopAtPos(0, 8); - case 13: - return jjStopAtPos(0, 6); - case 35: - return jjStopAtPos(0, 63); - case 36: - return jjStopAtPos(0, 66); - case 40: - return jjStopAtPos(0, 56); - case 41: - return jjStopAtPos(0, 57); - case 44: - return jjStopAtPos(0, 67); - case 47: - return jjMoveStringLiteralDfa1_0(0x2L, 0x0L); - case 58: - return jjStopAtPos(0, 68); - case 59: - return jjStopAtPos(0, 62); - case 60: - return jjMoveStringLiteralDfa1_0(0x0L, 0x20L); - case 61: - return jjStopAtPos(0, 70); - case 64: - return jjStopAtPos(0, 64); - case 91: - jjmatchedKind = 60; - return jjMoveStringLiteralDfa1_0(0x0L, 0x200L); - case 93: - return jjStopAtPos(0, 61); - case 96: - return jjStopAtPos(0, 65); - case 65: - case 97: - return jjMoveStringLiteralDfa1_0(0x40100600008000L, 0x0L); - case 66: - case 98: - return jjMoveStringLiteralDfa1_0(0x80000400800L, 0x0L); - case 67: - case 99: - return jjMoveStringLiteralDfa1_0(0x404801000000L, 0x0L); - case 68: - case 100: - return jjMoveStringLiteralDfa1_0(0x20000000000L, 0x0L); - case 69: - case 101: - return jjMoveStringLiteralDfa1_0(0x804000L, 0x0L); - case 70: - case 102: - return jjMoveStringLiteralDfa1_0(0x1104000000L, 0x0L); - case 71: - case 103: - return jjMoveStringLiteralDfa1_0(0x240000080000L, 0x0L); - case 73: - case 105: - return jjMoveStringLiteralDfa1_0(0x2000010000L, 0x0L); - case 76: - case 108: - return jjMoveStringLiteralDfa1_0(0x1808000000400L, 0x0L); - case 79: - case 111: - return jjMoveStringLiteralDfa1_0(0x20000000020000L, 0x0L); - case 80: - case 112: - return jjMoveStringLiteralDfa1_0(0x2301000L, 0x0L); - case 82: - case 114: - return jjMoveStringLiteralDfa1_0(0x8010000040000L, 0x0L); - case 83: - case 115: - return jjMoveStringLiteralDfa1_0(0x98000000L, 0x0L); - case 84: - case 116: - return jjMoveStringLiteralDfa1_0(0x4000040000000L, 0x0L); - case 85: - case 117: - return jjMoveStringLiteralDfa1_0(0x2000000002000L, 0x0L); - case 86: - case 118: - return jjMoveStringLiteralDfa1_0(0x20000000L, 0x0L); - case 87: - case 119: - return jjMoveStringLiteralDfa1_0(0x10000000000000L, 0x0L); - case 123: - return jjStopAtPos(0, 58); - case 125: - return jjStopAtPos(0, 59); - default : - return jjMoveNfa_0(3, 0); - } -} -private final int jjMoveStringLiteralDfa1_0(long active0, long active1) -{ - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(0, active0, active1); - return 1; - } - switch(curChar) - { - case 42: - if ((active0 & 0x2L) != 0L) - return jjStopAtPos(1, 1); - break; - case 46: - return jjMoveStringLiteralDfa2_0(active0, 0L, active1, 0x200L); - case 61: - if ((active1 & 0x20L) != 0L) - return jjStopAtPos(1, 69); - break; - case 65: - case 97: - return jjMoveStringLiteralDfa2_0(active0, 0x8804020001000L, active1, 0L); - case 69: - case 101: - return jjMoveStringLiteralDfa2_0(active0, 0x2100004c0000L, active1, 0L); - case 70: - case 102: - if ((active0 & 0x20000L) != 0L) - return jjStartNfaWithStates_0(1, 17, 20); - else if ((active0 & 0x2000000000L) != 0L) - return jjStartNfaWithStates_0(1, 37, 20); - break; - case 72: - case 104: - return jjMoveStringLiteralDfa2_0(active0, 0x10000000L, active1, 0L); - case 73: - case 105: - return jjMoveStringLiteralDfa2_0(active0, 0x11020108000400L, active1, 0L); - case 76: - case 108: - return jjMoveStringLiteralDfa2_0(active0, 0x40080200000000L, active1, 0L); - case 78: - case 110: - return jjMoveStringLiteralDfa2_0(active0, 0x2000000804000L, active1, 0L); - case 79: - case 111: - if ((active0 & 0x4000000000000L) != 0L) - return jjStartNfaWithStates_0(1, 50, 20); - return jjMoveStringLiteralDfa2_0(active0, 0x409801100800L, active1, 0L); - case 82: - case 114: - return jjMoveStringLiteralDfa2_0(active0, 0x40002208000L, active1, 0L); - case 83: - case 115: - if ((active0 & 0x10000L) != 0L) - return jjStartNfaWithStates_0(1, 16, 20); - return jjMoveStringLiteralDfa2_0(active0, 0x100000002000L, active1, 0L); - case 84: - case 116: - return jjMoveStringLiteralDfa2_0(active0, 0x20000400000000L, active1, 0L); - case 85: - case 117: - return jjMoveStringLiteralDfa2_0(active0, 0x84000000L, active1, 0L); - case 89: - case 121: - return jjMoveStringLiteralDfa2_0(active0, 0x40000000L, active1, 0L); - default : - break; - } - return jjStartNfa_0(0, active0, active1); -} -private final int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1) -{ - if (((active0 &= old0) | (active1 &= old1)) == 0L) - return jjStartNfa_0(0, old0, old1); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(1, active0, active1); - return 2; - } - switch(curChar) - { - case 93: - if ((active1 & 0x200L) != 0L) - return jjStopAtPos(2, 73); - break; - case 65: - case 97: - return jjMoveStringLiteralDfa3_0(active0, 0x10000000L, active1, 0L); - case 66: - case 98: - return jjMoveStringLiteralDfa3_0(active0, 0x800080000400L, active1, 0L); - case 67: - case 99: - return jjMoveStringLiteralDfa3_0(active0, 0x49000L, active1, 0L); - case 68: - case 100: - if ((active0 & 0x800000L) != 0L) - return jjStartNfaWithStates_0(2, 23, 20); - return jjMoveStringLiteralDfa3_0(active0, 0x800L, active1, 0L); - case 69: - case 101: - if ((active0 & 0x2000L) != 0L) - return jjStartNfaWithStates_0(2, 13, 20); - break; - case 71: - case 103: - return jjMoveStringLiteralDfa3_0(active0, 0x8400000L, active1, 0L); - case 72: - case 104: - return jjMoveStringLiteralDfa3_0(active0, 0x20000000000000L, active1, 0L); - case 73: - case 105: - return jjMoveStringLiteralDfa3_0(active0, 0x2000200000000L, active1, 0L); - case 76: - case 108: - if ((active0 & 0x40000000000000L) != 0L) - return jjStartNfaWithStates_0(2, 54, 20); - return jjMoveStringLiteralDfa3_0(active0, 0x100000000L, active1, 0L); - case 77: - case 109: - return jjMoveStringLiteralDfa3_0(active0, 0x800000000L, active1, 0L); - case 78: - case 110: - return jjMoveStringLiteralDfa3_0(active0, 0x8600005080000L, active1, 0L); - case 79: - case 111: - return jjMoveStringLiteralDfa3_0(active0, 0xc8002200000L, active1, 0L); - case 80: - case 112: - return jjMoveStringLiteralDfa3_0(active0, 0x40000000L, active1, 0L); - case 82: - case 114: - if ((active0 & 0x1000000000L) != 0L) - return jjStartNfaWithStates_0(2, 36, 20); - return jjMoveStringLiteralDfa3_0(active0, 0x20100000L, active1, 0L); - case 83: - case 115: - return jjMoveStringLiteralDfa3_0(active0, 0x124000000000L, active1, 0L); - case 84: - case 116: - return jjMoveStringLiteralDfa3_0(active0, 0x11010400004000L, active1, 0L); - default : - break; - } - return jjStartNfa_0(1, active0, active1); -} -private final int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1) -{ - if (((active0 &= old0) | (active1 &= old1)) == 0L) - return jjStartNfa_0(1, old0, old1); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(2, active0, 0L); - return 3; - } - switch(curChar) - { - case 65: - case 97: - return jjMoveStringLiteralDfa4_0(active0, 0x200000000L); - case 67: - case 99: - return jjMoveStringLiteralDfa4_0(active0, 0xa0006200000L); - case 69: - case 101: - if ((active0 & 0x40000000L) != 0L) - return jjStartNfaWithStates_0(3, 30, 20); - else if ((active0 & 0x100000000L) != 0L) - return jjStartNfaWithStates_0(3, 32, 20); - else if ((active0 & 0x4000000000L) != 0L) - return jjStartNfaWithStates_0(3, 38, 20); - return jjMoveStringLiteralDfa4_0(active0, 0x21300000080000L); - case 70: - case 102: - return jjMoveStringLiteralDfa4_0(active0, 0x400000000000L); - case 71: - case 103: - return jjMoveStringLiteralDfa4_0(active0, 0x8000000000000L); - case 72: - case 104: - if ((active0 & 0x10000000000000L) != 0L) - return jjStartNfaWithStates_0(3, 52, 20); - return jjMoveStringLiteralDfa4_0(active0, 0x8000L); - case 73: - case 105: - return jjMoveStringLiteralDfa4_0(active0, 0x20404000L); - case 75: - case 107: - return jjMoveStringLiteralDfa4_0(active0, 0x1000L); - case 76: - case 108: - return jjMoveStringLiteralDfa4_0(active0, 0x800000000000L); - case 78: - case 110: - return jjMoveStringLiteralDfa4_0(active0, 0x8000000L); - case 79: - case 111: - return jjMoveStringLiteralDfa4_0(active0, 0x40000L); - case 80: - case 112: - if ((active0 & 0x8000000000L) != 0L) - return jjStartNfaWithStates_0(3, 39, 20); - return jjMoveStringLiteralDfa4_0(active0, 0x800000000L); - case 82: - case 114: - return jjMoveStringLiteralDfa4_0(active0, 0x410000400L); - case 83: - case 115: - return jjMoveStringLiteralDfa4_0(active0, 0x1000000L); - case 84: - case 116: - if ((active0 & 0x100000L) != 0L) - return jjStartNfaWithStates_0(3, 20, 20); - return jjMoveStringLiteralDfa4_0(active0, 0x2000080000000L); - case 85: - case 117: - return jjMoveStringLiteralDfa4_0(active0, 0x50000000000L); - case 89: - case 121: - if ((active0 & 0x800L) != 0L) - return jjStartNfaWithStates_0(3, 11, 20); - break; - default : - break; - } - return jjStartNfa_0(2, active0, 0L); -} -private final int jjMoveStringLiteralDfa4_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(2, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(3, active0, 0L); - return 4; - } - switch(curChar) - { - case 65: - case 97: - return jjMoveStringLiteralDfa5_0(active0, 0x28001400L); - case 69: - case 101: - if ((active0 & 0x800000000000L) != 0L) - return jjStartNfaWithStates_0(4, 47, 20); - else if ((active0 & 0x8000000000000L) != 0L) - return jjStartNfaWithStates_0(4, 51, 20); - return jjMoveStringLiteralDfa5_0(active0, 0x12200000L); - case 73: - case 105: - return jjMoveStringLiteralDfa5_0(active0, 0x400400008000L); - case 75: - case 107: - if ((active0 & 0x80000000000L) != 0L) - return jjStartNfaWithStates_0(4, 43, 20); - break; - case 78: - case 110: - if ((active0 & 0x400000L) != 0L) - return jjStartNfaWithStates_0(4, 22, 20); - break; - case 79: - case 111: - return jjMoveStringLiteralDfa5_0(active0, 0x20800000000L); - case 80: - case 112: - if ((active0 & 0x40000000000L) != 0L) - return jjStartNfaWithStates_0(4, 42, 20); - break; - case 82: - case 114: - return jjMoveStringLiteralDfa5_0(active0, 0x213100000c0000L); - case 83: - case 115: - if ((active0 & 0x200000000L) != 0L) - return jjStartNfaWithStates_0(4, 33, 20); - else if ((active0 & 0x2000000000000L) != 0L) - return jjStartNfaWithStates_0(4, 49, 20); - break; - case 84: - case 116: - return jjMoveStringLiteralDfa5_0(active0, 0x5004000L); - case 89: - case 121: - return jjMoveStringLiteralDfa5_0(active0, 0x80000000L); - default : - break; - } - return jjStartNfa_0(3, active0, 0L); -} -private final int jjMoveStringLiteralDfa5_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(3, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(4, active0, 0L); - return 5; - } - switch(curChar) - { - case 65: - case 97: - return jjMoveStringLiteralDfa6_0(active0, 0x1200001000000L); - case 66: - case 98: - return jjMoveStringLiteralDfa6_0(active0, 0x420000000L); - case 68: - case 100: - if ((active0 & 0x40000L) != 0L) - return jjStartNfaWithStates_0(5, 18, 20); - else if ((active0 & 0x10000000L) != 0L) - return jjStartNfaWithStates_0(5, 28, 20); - return jjMoveStringLiteralDfa6_0(active0, 0x2000000L); - case 71: - case 103: - return jjMoveStringLiteralDfa6_0(active0, 0x400000001000L); - case 73: - case 105: - return jjMoveStringLiteralDfa6_0(active0, 0x4080000L); - case 76: - case 108: - if ((active0 & 0x8000000L) != 0L) - return jjStartNfaWithStates_0(5, 27, 20); - break; - case 78: - case 110: - if ((active0 & 0x10000000000L) != 0L) - return jjStartNfaWithStates_0(5, 40, 20); - return jjMoveStringLiteralDfa6_0(active0, 0x20800000000L); - case 80: - case 112: - return jjMoveStringLiteralDfa6_0(active0, 0x80000000L); - case 82: - case 114: - return jjMoveStringLiteralDfa6_0(active0, 0x400L); - case 83: - case 115: - if ((active0 & 0x20000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 53, 20); - return jjMoveStringLiteralDfa6_0(active0, 0x200000L); - case 84: - case 116: - if ((active0 & 0x100000000000L) != 0L) - return jjStartNfaWithStates_0(5, 44, 20); - return jjMoveStringLiteralDfa6_0(active0, 0x8000L); - case 89: - case 121: - if ((active0 & 0x4000L) != 0L) - return jjStartNfaWithStates_0(5, 14, 20); - break; - default : - break; - } - return jjStartNfa_0(4, active0, 0L); -} -private final int jjMoveStringLiteralDfa6_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(4, old0, 0L); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(5, active0, 0L); - return 6; - } - switch(curChar) - { - case 67: - case 99: - if ((active0 & 0x80000L) != 0L) - return jjStartNfaWithStates_0(6, 19, 20); -