fri.patterns.interpreter.parsergenerator.lexer.examples
Class CStyleCommentStrip

java.lang.Object
  |
  +--fri.patterns.interpreter.parsergenerator.lexer.examples.CStyleCommentStrip

public class CStyleCommentStrip
extends java.lang.Object

Sample for a Lexer built from blocks of StandardLexerRules. Removes comments from Java/C source.

Author:
(c) 2002, Fritz Ritzberger

Constructor Summary
CStyleCommentStrip(java.io.Reader in, java.io.Writer out)
          Stripping C-style comments from an input reader and writing to output writer.
 
Method Summary
static void main(java.lang.String[] args)
          Example implementation: Stripping C-style comments from Java files, passed as arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CStyleCommentStrip

public CStyleCommentStrip(java.io.Reader in,
                          java.io.Writer out)
                   throws LexerException,
                          java.io.IOException
Stripping C-style comments from an input reader and writing to output writer. Both in and out get closed when finished.

Method Detail

main

public static void main(java.lang.String[] args)
Example implementation: Stripping C-style comments from Java files, passed as arguments.