[Bio] / smc / stripper.cc Repository:
ViewVC logotype

View of /smc/stripper.cc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (download) (as text) (annotate) (vendor branch)
Thu Aug 21 17:00:03 2003 UTC (16 years, 3 months ago) by efrank
Branch: MAIN, oma-04Jun1993
CVS Tags: anl000, HEAD
Changes since 1.1: +0 -0 lines
State machine compiler from Bob Marting (R. C. Martin) at Object Mentor Associates.
Has a few small compilation fixes.

We have this code without explicit permission.  We ar evaluating extensions.
Do not distribute..but I think we're consistent with its usage requirements

// $Id: stripper.cc,v 1.1.1.1 2003/08/21 17:00:03 efrank Exp $
//
// This program implements a C++ comment stripper
// using the State Map Parser.
//
#include <iostream.h>
#include <stdlib.h>
#include "stripFSM.h"

main()
{
	StripFSM myStripper;
	myStripper.SetStreams(cin,cout);

	while (cin)
		switch(myStripper.ReadChar())
		{
		    case EOF: exit(0); break;
			case '/': myStripper.Slash(); break;
			case '*': myStripper.Star(); break;
			case '\n': myStripper.EOL(); break;
			default: myStripper.Other(); break;
		}
}


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3