| 151 |
</tr> |
</tr> |
| 152 |
<tr> |
<tr> |
| 153 |
<th VALIGN=top align=left>javasym.java</th> |
<th VALIGN=top align=left>javasym.java</th> |
| 154 |
<td>This is the contents of the class org.eclipse.jdt.core.compiler.ITerminalSymbols. You need to replace:<br> |
<td>This is the contents of the class org.eclipse.jdt.core.compiler.TerminalTokens. You need to replace:<br> |
| 155 |
<ul> |
<ul> |
| 156 |
<li>TokenName$eof with TokenNameEOF</li> |
<li>TokenName$eof with TokenNameEOF</li> |
| 157 |
<li>TokenName$error with TokenNameERROR</li> |
<li>TokenName$error with TokenNameERROR</li> |
| 172 |
<ol> |
<ol> |
| 173 |
<li>Copy the contents of the <font color="#3366FF">JavaAction.java</font> file into the <font color="#3366FF">consumeRule(int)</font> method of the org.eclipse.jdt.internal.compiler.parser.Parser class. |
<li>Copy the contents of the <font color="#3366FF">JavaAction.java</font> file into the <font color="#3366FF">consumeRule(int)</font> method of the org.eclipse.jdt.internal.compiler.parser.Parser class. |
| 174 |
</li> |
</li> |
| 175 |
<li>The definition of the Parser needs to be updated with two tables from <font color="#3366FF">javadcl.java</font>. Those are <font color="#3366FF">rhs[]</font> and <font color="#3366FF">name[]</font>. |
<li>The definition of the Parser needs to be updated with three tables from <font color="#3366FF">javadcl.java</font>. Those are <font color="#3366FF">rhs[]</font>, <font color="#3366FF">name[]</font> and <font color="#3366FF">scope_la[]</font>. |
| 176 |
The following entries in name[] need to be replaced: |
The following entries in name[] need to be replaced: |
| 177 |
<ul> |
<ul> |
| 178 |
<li><font color="#3366FF">$eof</font> with <font color="#3366FF">UNEXPECTED_EOF</font></li> |
<li><font color="#3366FF">$eof</font> with <font color="#3366FF">UNEXPECTED_EOF</font></li> |
| 182 |
</li> |
</li> |
| 183 |
<li>The class <font color="#3366FF">org.eclipse.jdt.internal.compiler.parser.ParserBasicInformation</font> needs to be updated with the content of the file <font color="#3366FF">javadef.java</font>. Don't copy the |
<li>The class <font color="#3366FF">org.eclipse.jdt.internal.compiler.parser.ParserBasicInformation</font> needs to be updated with the content of the file <font color="#3366FF">javadef.java</font>. Don't copy the |
| 184 |
interface name. Simply copy the field declarations. The actual source of this class will guide you.</li> |
interface name. Simply copy the field declarations. The actual source of this class will guide you.</li> |
| 185 |
<li>This is the contents of the class org.eclipse.jdt.internal.compiler.parser.TerminalSymbols. You need to replace:<br> |
<li>This is the contents of the class org.eclipse.jdt.internal.compiler.parser.TerminalTokens. You need to replace:<br> |
| 186 |
<ul> |
<ul> |
| 187 |
<li><font color="#3366FF">TokenName$eof</font> with <font color="#3366FF">TokenNameEOF</font></li> |
<li><font color="#3366FF">TokenName$eof</font> with <font color="#3366FF">TokenNameEOF</font></li> |
| 188 |
<li><font color="#3366FF">TokenName$error</font> with <font color="#3366FF">TokenNameERROR</font></li> |
<li><font color="#3366FF">TokenName$error</font> with <font color="#3366FF">TokenNameERROR</font></li> |
| 192 |
Copy the jdtcore.jar file in d:\temp. Compile this <A HREF="UpdateParserFiles.java">source</A> inside d:\temp. You will have a file UpdateParserFiles.class. |
Copy the jdtcore.jar file in d:\temp. Compile this <A HREF="UpdateParserFiles.java">source</A> inside d:\temp. You will have a file UpdateParserFiles.class. |
| 193 |
Then run the following command-line: |
Then run the following command-line: |
| 194 |
<PRE> |
<PRE> |
| 195 |
D:\temp>java -classpath jdtcore.jar;. UpdateParserFiles javadcl.java |
D:\temp>java -classpath jdtcore.jar:. UpdateParserFiles javadcl.java |
| 196 |
</PRE> |
</PRE> |
| 197 |
Once this done, you will end up with 5 new files inside d:\temp. They are called parser<n>.rsc, with n equals to 1..5. |
Once this done, you will end up with 16 new files inside d:\temp. They are called parser<n>.rsc, with n equals to 1..16. |
| 198 |
All these files need to be moved to the org\eclipse\jdt\internal\compiler\parser folder. Now you are ready to execute and test |
All these files need to be moved to the org\eclipse\jdt\internal\compiler\parser folder. Now you are ready to execute and test |
| 199 |
the new parser. |
the new parser. |
| 200 |
</li> |
</li> |