2 SuperCollider real time audio synthesis system
3 Copyright (c) 2002 James McCartney. All rights reserved.
4 http://www.audiosynth.com
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 #include "PyrSymbol.h"
26 #include "SC_Export.h"
29 extern int charno
, lineno
, linepos
;
30 extern int *linestarts
;
33 struct ClassExtFile
*next
;
35 int startPos
, endPos
, lineOffset
;
38 typedef struct classdep
{
39 struct classdep
*next
;
40 struct classdep
*superClassDep
;
41 struct classdep
*subclasses
;
43 PyrSymbol
*superClassName
;
45 int startPos
, endPos
, lineOffset
;
48 extern PyrSymbol
*gCompilingFileSym
;
50 ClassDependancy
* newClassDependancy(PyrSymbol
*className
, PyrSymbol
*superClassName
,
51 PyrSymbol
*fileSym
, int startPos
, int endPos
, int lineOffset
);
52 bool parseOneClass(PyrSymbol
*fileSym
);
57 void traverseFullDepTree();
58 void traverseDepTree(ClassDependancy
*classdep
, int level
);
59 void traverseFullDepTree2();
60 void traverseDepTree2(ClassDependancy
*classdep
, int level
);
61 void compileClassExtensions();
62 void compileClass(PyrSymbol
*fileSym
, int startPos
, int endPos
, int lineOffset
);
64 SC_DLLEXPORT_C
void runLibrary(PyrSymbol
* selector
);
66 void interpretCmdLine(const char *textbuf
, int textlen
, char *methodname
);
75 bool startLexer(char* filename
) ;
76 void startLexerCmdLine(char *textbuf
, int textbuflen
);
78 void yyerror(const char *s
) ;
80 bool isValidSourceFileName(char *filename
);
81 bool passOne_ProcessOneFile(const char *filename
, int level
);
83 extern void asRelativePath(char *inPath
,char *outPath
);
86 void init_SuperCollider();
88 int processbinop(char *token
);
89 int processident(char *token
);
90 int processfloat(char *token
, int sawpi
);
91 int processint(char *token
);
92 int processchar(int c
);
93 int processintradix(char *s
, int n
, int radix
);
94 int processfloatradix(char *s
, int n
, int radix
);
95 int processhex(char *s
);
96 int processsymbol(char *token
);
97 int processstring(char *token
);
98 int processkeywordbinop(char *token
);
100 void postErrorLine(int linenum
, int start
, int charpos
);
101 bool scanForClosingBracket();
104 extern int parseFailed
;
105 extern bool compilingCmdLine
;
106 extern bool compilingCmdLineErrorWindow
;
107 extern bool compiledOK
;
109 #define MAXYYLEN 8192
111 extern int gNumCompiledFiles
;
112 extern int gClassCompileOrderNum
;
113 extern ClassDependancy
**gClassCompileOrder
;
114 extern char curfilename
[PATH_MAX
];
118 extern const char *binopchars
;
119 extern char yytext
[MAXYYLEN
];
120 extern char curfilename
[PATH_MAX
];
123 extern int lexCmdLine
;
124 extern bool compilingCmdLine
;
125 extern bool compilingCmdLineErrorWindow
;
128 extern int lineno
, charno
, linepos
;
129 extern int *linestarts
;
130 extern int maxlinestarts
;
135 extern int parseFailed
;
136 extern bool compiledOK
;
137 extern int radixcharpos
, decptpos
;
139 int rtf2txt(char* txt
);
140 int html2txt(char* txt
);