Functions | |
| GuidoParser * | GuidoOpenParser () | 
| Creates a new parser.   | |
| GuidoErrCode | GuidoCloseParser (GuidoParser *p) | 
| Close a guido parser and releases all the associated ressources.   | |
| const char * | GuidoGetStream (GuidoStream *gStream) | 
| returns the string of the GuidoStream   | |
| ARHandler | GuidoFile2AR (GuidoParser *p, const char *file) | 
| Parse a file and create the corresponding AR.   | |
| ARHandler | GuidoString2AR (GuidoParser *p, const char *str) | 
| Parse a string and create the corresponding AR.   | |
| ARHandler | GuidoStream2AR (GuidoParser *p, GuidoStream *stream) | 
| Parse a GuidoStream and create the corresponding AR.   | |
| GuidoErrCode | GuidoParserGetErrorCode (GuidoParser *p, int &line, int &col, const char **msg) | 
| Get the error syntax line/column.   | |
| GuidoStream * | GuidoOpenStream () | 
| Open a guido stream.   | |
| GuidoErrCode | GuidoCloseStream (GuidoStream *s) | 
| Close a guido stream.   | |
| GuidoErrCode | GuidoWriteStream (GuidoStream *s, const char *str) | 
| Write data to the stream.   | |
| GuidoErrCode | GuidoResetStream (GuidoStream *s) | 
| Erase all stream content in order to reuse it.   | |
| GuidoParser* GuidoOpenParser | ( | ) | 
Creates a new parser.
| GuidoErrCode GuidoCloseParser | ( | GuidoParser * | p ) | 
Close a guido parser and releases all the associated ressources.
| p | a parser previously opened with GuidoOpenParser | 
| const char* GuidoGetStream | ( | GuidoStream * | gStream ) | 
returns the string of the GuidoStream
| gStream | a GuidoStream | 
| ARHandler GuidoFile2AR | ( | GuidoParser * | p, | 
| const char * | file | ||
| ) | 
Parse a file and create the corresponding AR.
| p | a parser previously opened with GuidoOpenParser | 
| file | the file to parse. | 
| ARHandler GuidoString2AR | ( | GuidoParser * | p, | 
| const char * | str | ||
| ) | 
Parse a string and create the corresponding AR.
| p | a parser previously opened with GuidoOpenParser | 
| str | the string to parse. | 
| ARHandler GuidoStream2AR | ( | GuidoParser * | p, | 
| GuidoStream * | stream | ||
| ) | 
Parse a GuidoStream and create the corresponding AR.
| p | a parser previously opened with GuidoOpenParser | 
| stream | the GuidoStream to parse. | 
| GuidoErrCode GuidoParserGetErrorCode | ( | GuidoParser * | p, | 
| int & | line, | ||
| int & | col, | ||
| const char ** | msg | ||
| ) | 
Get the error syntax line/column.
| p | a parser previously opened with GuidoOpenParser | 
| line | a reference that will contain a line number in case of syntax error | 
| col | a reference that will contain a column number in case of syntax error | 
| msg | a string that will contain the error message | 
| GuidoStream* GuidoOpenStream | ( | ) | 
Open a guido stream.
Guido streams are intended to implement real-time input to the parser. In particular, streams allow to retrieve an AR in while the stream is still opened.
| GuidoErrCode GuidoCloseStream | ( | GuidoStream * | s ) | 
Close a guido stream.
| s | a GuidoStream | 
| GuidoErrCode GuidoWriteStream | ( | GuidoStream * | s, | 
| const char * | str | ||
| ) | 
Write data to the stream.
Writing data to a stream may be viewed as writing gmn code by portion. Syntax errors concerning music/voice/tag/event/parameter non-closure won't be declared as such (GuidoWriteStream uses an automatic-closure mechanism). When a syntax error (other than a non-closure) occurs when writting data to the stream, the stream becomes invalid and should be closed. Further attempts to write data will always result in a syntax error.
Regarding syntax errors, allowed incomplete constructs are :
| s | a GuidoStream previoulsy opened with GuidoOpenStream | 
| str | a string containing a portion of gmn code | 
| GuidoErrCode GuidoResetStream | ( | GuidoStream * | s ) | 
Erase all stream content in order to reuse it.
| s | a GuidoStream previoulsy opened with GuidoOpenStream | 
 1.7.2 - © Grame Research Lab.