#import <Foundation/Foundation.h>

@class Tune;
@class TuneParser;

@protocol TuneParserDelegate<NSObject>

@required

- (void) parsedTune:(TuneParser *)parser tune:(Tune *)tune;

@end

@interface TuneParser : NSObject
{
  id<TuneParserDelegate> delegate;
  Tune *tune;
  NSMutableString *dots;
  BOOL bodyStarted;
  BOOL lastWasBR;
  BOOL isHTML;
  BOOL firstCall;
  BOOL finished;
}

- (void) parseLine:(NSString *)line;  // Parse a single line of an ABC file
- (void) parseString:(NSString *)data;    // Parse a whole ABC file
- (void) parseData:(NSData *)data;    // Parse a whole ABC file

@property(retain,readwrite) id<TuneParserDelegate> delegate;

@end
