[antlr-interest] Bug with HTML output

Ric Klaren klaren at cs.utwente.nl
Wed Jun 16 04:45:08 PDT 2004


On Thu, Jun 10, 2004 at 02:55:23PM -0400, Jon Schewe wrote:
> I just tried out the -html flag to ANTLR in version 2.7.4 and I think
> that's pretty cool.  One problem I do have is that it puts a txt
> extension on the output file created for the Lexer when the Lexer and
> Recognizer are in the same input file.

Thanks for the report! Apply the following to fix it:

==== //depot/code/org.antlr/main/main/antlr/HTMLCodeGenerator.java#14 - /home/fmg/klaren/Antlr/code/org.antlr/main/main/antlr/HTMLCodeGenerator.java ====
--- /tmp/tmp.28401.0    2004-06-16 13:44:31.000000000 +0200
+++ /home/fmg/klaren/Antlr/code/org.antlr/main/main/antlr/HTMLCodeGenerator.java2004-06-16 13:43:24.000000000 +0200
@@ -135,8 +135,8 @@ public class HTMLCodeGenerator extends C
     /** Generate the lexer HTML file */
     public void gen(LexerGrammar g) throws IOException {
         setGrammar(g);
-        antlrTool.reportProgress("Generating " + grammar.getClassName() + TokenTypesFileExt);
-        currentOutput = antlrTool.openOutputFile(grammar.getClassName() + TokenTypesFileExt);
+        antlrTool.reportProgress("Generating " + grammar.getClassName() + ".html");
+        currentOutput = antlrTool.openOutputFile(grammar.getClassName() + ".html");
         //SAS: changed for proper text file io
 
         tabs = 0;

Cheers,

Ric
-- 
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- j.klaren at utwente.nl ----- +31 53 4893755  ----
-----+++++*****************************************************+++++++++-------
  Chaos always defeats order because it is better organized.
  --- Terry Pratchet



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list