Skip to content

Commit

Permalink
Merge pull request #850 from junichi11/fix-php.editor-build-xml
Browse files Browse the repository at this point in the history
Fix generated lexers of php.editor automatically via ant task
  • Loading branch information
geertjanw committed Sep 7, 2018
2 parents 4e827af + 1bd4e51 commit acd11c8
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions php/php.editor/build.xml
Expand Up @@ -44,13 +44,57 @@
<jflex file="tools/Php5ColoringScanner.flex"
destdir="src"
skel="tools/skeleton.netbeans"/>
<replace file="src/org/netbeans/modules/php/editor/lexer/PHP5ColoringLexer.java">
<replacetoken> yychar+= zzMarkedPosL-zzStartRead;&#xA;&#xA;</replacetoken>
<replacevalue></replacevalue>
</replace>
<replace file="src/org/netbeans/modules/php/editor/lexer/PHP5ColoringLexer.java">
<replacetoken><![CDATA[
if (zzCurrentPosL < zzEndReadL)
zzInput = zzBufferL[zzCurrentPosL++];
else if (zzAtEOF) {
zzInput = YYEOF;
break zzForAction;
}
else {
// store back cached positions
zzCurrentPos = zzCurrentPosL;
zzMarkedPos = zzMarkedPosL;
boolean eof = zzRefill();
// get translated positions and possibly new buffer
zzCurrentPosL = zzCurrentPos;
zzMarkedPosL = zzMarkedPos;
zzBufferL = zzBuffer;
zzEndReadL = zzEndRead;
if (eof) {
zzInput = YYEOF;
break zzForAction;
}
else {
zzInput = zzBufferL[zzCurrentPosL++];
}
}]]></replacetoken>
<replacevalue></replacevalue>
</replace>
<replaceregexp file="src/org/netbeans/modules/php/editor/lexer/PHP5ColoringLexer.java"
match="[ ]+$"
replace=""
byline="true" />
</target-->

<!-- for ast scanner, jflex 1.4 must be used! -->
<!--target name="gen-astscanner">
<jflex file="tools/ASTPHP5Scanner.flex"
destdir="src"
skel="tools/skeletonParser.netbeans"/>
<replace file="src/org/netbeans/modules/php/editor/parser/ASTPHP5Scanner.java">
<replacetoken>if (!zzEOFDone) {&#xA; zzEOFDone = true;&#xA; yyclose();&#xA; }</replacetoken>
<replacevalue>/*if (!zzEOFDone) {&#xA; zzEOFDone = true;&#xA; yyclose();&#xA; }*/</replacevalue>
</replace>
<replaceregexp file="src/org/netbeans/modules/php/editor/parser/ASTPHP5Scanner.java"
match="[ ]+$"
replace=""
byline="true" />
</target-->

<!--target name="gen-docscanner">
Expand Down

0 comments on commit acd11c8

Please sign in to comment.