[Issue 228] New - Wrong line ending in @suppresswarnings annotation

View: New views
5 Messages — Rating Filter:   Alert me  

[Issue 228] New - Wrong line ending in @suppresswarnings annotation

by janosch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://javacc.dev.java.net/issues/show_bug.cgi?id=228
                 Issue #|228
                 Summary|Wrong line ending in @suppresswarnings annotation
               Component|javacc
                 Version|4.2
                Platform|All
              OS/Version|All
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|parser generator
             Assigned to|sreeni
             Reported by|janosch






------- Additional comments from janosch@... Mon Jul 27 13:48:59 +0000 2009 -------
javacc now automatically adds a @SuppressWarnings("all") annotation to the
classes it generates, but sadly, it does not respect the OS default line ending
style (as it does everywhere else) and simply uses \n, which leads to
uncommitable classes (SVN checks for consistent line endings).

In the end, i have to fix the line breaks by hand, which undermines the
hashcodes of course.

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 228] Wrong line ending in @suppresswarnings annotation

by paulcager :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://javacc.dev.java.net/issues/show_bug.cgi?id=228






------- Additional comments from paulcager@... Wed Sep  9 18:27:32 +0000 2009 -------
Could you just clarify which file you mean, please? If I remember coirrectly we
no longer produce that annotation.

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 228] Wrong line ending in ParserTokenManager

by janosch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://javacc.dev.java.net/issues/show_bug.cgi?id=228



User janosch changed the following:

                What    |Old value                 |New value
================================================================================
                 Summary|Wrong line ending in @supp|Wrong line ending in Parse
                        |resswarnings annotation   |rTokenManager
--------------------------------------------------------------------------------




------- Additional comments from janosch@... Tue Sep 22 07:49:52 +0000 2009 -------
you are right,@SuppressWarnings annotations are not generated anymore.

Still some line-endings are wrong, the following is an excerpt of my generated
ParserTokenManager, i marked line-endings by <CR> and <LF>, note the line of the
first method declaration and the line with the switch statement:

/* Generated By:JavaCC: Do not edit this line. ParserTokenManager.java */<CR><LF>
package cion.utils.cdml.parser;<CR><LF>
import cion.utils.cdml.ast.*;<CR><LF>
import java.util.Vector;<CR><LF>
import java.io.File;<CR><LF>
<CR><LF>
/** Token Manager. */<CR><LF>
public class ParserTokenManager implements ParserConstants<CR><LF>
{<CR><LF>
<CR><LF>
  /** Debug output. */<CR><LF>
  public  java.io.PrintStream debugStream = System.out;<CR><LF>
  /** Set debug output. */<CR><LF>
  public  void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }<CR><LF>
private final int jjStopStringLiteralDfa_0(int pos, long active0)<LF>
{<CR><LF>
   switch (pos)<LF>
   {<CR><LF>
      case 0:<CR><LF>
         if ((active0 & 0x400000L) != 0L)<CR><LF>
            return 14;<CR><LF>
         if ((active0 & 0x7f00000000L) != 0L)<CR><LF>
         {<CR><LF>

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 228] Wrong line ending in ParserTokenManager

by paulcager :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://javacc.dev.java.net/issues/show_bug.cgi?id=228



User paulcager changed the following:

                What    |Old value                 |New value
================================================================================
             Assigned to|sreeni                    |paulcager
--------------------------------------------------------------------------------




------- Additional comments from paulcager@... Tue Sep 22 12:39:08 +0000 2009 -------
Thanks for the update - I'll fix it for the next release.

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...


[Issue 228] Wrong line ending in ParserTokenManager

by paulcager :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

https://javacc.dev.java.net/issues/show_bug.cgi?id=228



User paulcager changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|NEW                       |STARTED
--------------------------------------------------------------------------------




------- Additional comments from paulcager@... Tue Sep 22 16:09:39 +0000 2009 -------
There are 3 embedded '\n's in RStringLiteral.java that need to be changed:

     ostr.println("long active" + i + ")\n{");
     ostr.println("   switch (pos)\n   {");
     ostr.println("long active" + i + ")\n{");

It looks like the following files have the same problem:

src/org/javacc/jjdoc/BNFGenerator.java
src/org/javacc/jjdoc/HTMLGenerator.java
src/org/javacc/jjdoc/JJDoc.java
src/org/javacc/jjdoc/TextGenerator.java
src/org/javacc/jjtree/JJTree.jjt
src/org/javacc/jjtree/JJTreeNode.java
src/org/javacc/jjtree/TokenUtils.java
src/org/javacc/parser/Expansion.java
src/org/javacc/parser/JavaCC.jj
src/org/javacc/parser/JavaCCGlobals.java
src/org/javacc/parser/JavaCCParserInternals.java
src/org/javacc/parser/LexGen.java
src/org/javacc/parser/NfaState.java
src/org/javacc/parser/NormalProduction.java
src/org/javacc/parser/ParseEngine.java
src/org/javacc/parser/RStringLiteral.java
src/org/javacc/parser/test/NfaStateTest.java


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@...
For additional commands, e-mail: issues-help@...