1324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver//
2324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver//  ANTLRRuntimeException.h
3324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver//  ANTLR
4324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver//
5324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver//  Created by Alan Condit on 6/5/10.
6324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver// [The "BSD licence"]
7324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver// Copyright (c) 2010 Alan Condit
8324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver// All rights reserved.
9324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver//
10324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver// Redistribution and use in source and binary forms, with or without
11324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver// modification, are permitted provided that the following conditions
12324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver// are met:
13324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver// 1. Redistributions of source code must retain the above copyright
14324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver//    notice, this list of conditions and the following disclaimer.
15324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver// 2. Redistributions in binary form must reproduce the above copyright
16324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver//    notice, this list of conditions and the following disclaimer in the
17324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver//    documentation and/or other materials provided with the distribution.
18324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver// 3. The name of the author may not be used to endorse or promote products
19324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver//    derived from this software without specific prior written permission.
20324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver//
21324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
32324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver#import <Cocoa/Cocoa.h>
33324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
34324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver@interface ANTLRRuntimeException : NSException {
35324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver}
36324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
37324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver+ (ANTLRRuntimeException *) newException;
38324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver+ (ANTLRRuntimeException *) newException:(NSString *)aReason;
39324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver+ (ANTLRRuntimeException *) newException:(NSString *)aReason userInfo:(NSDictionary *)aUserInfo;
40324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
41324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver+ (ANTLRRuntimeException *) newException:(NSString *)aName reason:(NSString *)aReason;
42324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver+ (ANTLRRuntimeException *) newException:(NSString *)aName reason:(NSString *)aReason userInfo:(NSDictionary *)aUserInfo;
43324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
44324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver- (id) init;
45324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver- (id) init:(NSString *)aReason;
46324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver- (id) init:(NSString *)aReason userInfo:(NSDictionary *)aUserInfo;
47324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver- (id) initWithName:(NSString *)aName reason:(NSString *)aReason;
48324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver- (id) initWithName:(NSString *)aName reason:(NSString *)aReason userInfo:(NSDictionary *)aUserInfo;
49324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
50324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver- (NSString *) Description;
51324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver- (id) stackTrace:(NSException *)e;
52324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
53324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver@end
54324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
55324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver@interface ANTLRIllegalArgumentException : ANTLRRuntimeException {
56324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver}
57324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
58324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver+ (id) newException;
59324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver+ (id) newException:(NSString *)aReason;
60324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver+ (id) newException:(NSString *)aReason userInfo:(NSDictionary *)aUserInfo;
61324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
62324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver- (id) init;
63324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver- (id)init:(NSString *)aReason;
64324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver- (id)init:(NSString *)aReason userInfo:(NSDictionary *)aUserInfo;
65324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
66324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver@end
67324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
68324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver@interface ANTLRIllegalStateException : ANTLRRuntimeException {
69324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver}
70324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
71324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver+ (id) newException;
72324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver+ (id) newException:(NSString *)aReason;
73324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver+ (id) newException:(NSString *)aReason userInfo:(NSDictionary *)aUserInfo;
74324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
75324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver- (id) init;
76324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver- (id)init:(NSString *)aReason;
77324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver- (id)init:(NSString *)aReason userInfo:(NSDictionary *)aUserInfo;
78324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
79324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver@end
80324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
81324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver@interface ANTLRNoSuchElementException : ANTLRRuntimeException {
82324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver}
83324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
84324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver+ (id) newException;
85324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver+ (id) newException:(NSString *)aReason;
86324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver+ (id) newException:(NSString *)aReason userInfo:(NSDictionary *)aUserInfo;
87324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
88324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver- (id) init;
89324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver- (id) init:(NSString *)aReason;
90324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver- (id) init:(NSString *)aReason userInfo:(NSDictionary *)aUserInfo;
91324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
92324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver@end
93324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
94324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver@interface ANTLRRewriteEarlyExitException : ANTLRRuntimeException {
95324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver}
96324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
97324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver+ (id) newException;
98324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver- (id) initWithName:(NSString *)aName reason:(NSString *)aReason userInfo:(NSDictionary *)aUserInfo;
99324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
100324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver@end
101324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
102324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver@interface ANTLRUnsupportedOperationException : ANTLRRuntimeException {
103324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver}
104324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
105324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver+ (id) newException:(NSString *)aReason;
106324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
107324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver- (id) initWithName:(NSString *)aName reason:(NSString *)aReason;
108324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver- (id) initWithName:(NSString *)aMsg reason:(NSString *)aCause userInfo:(NSDictionary *)userInfo;
109324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
110324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver@end
111324c4644fee44b9898524c09511bd33c3f12e2dfBen Gruver
112