|
GUIDOLib
1.7.7
Guido Engine Internal Documentation
|
Functions | |
| GuidoParser * | GuidoOpenParser () |
| Creates a new parser. More... | |
| GuidoErrCode | GuidoCloseParser (GuidoParser *p) |
| Close a guido parser and releases all the associated ressources. More... | |
| const char * | GuidoGetStream (const GuidoStream *gStream) |
| returns the string of the GuidoStream More... | |
| void | GuidoFreeStreamString (const char *str) |
| free a string previously returned by GuidoGetStream More... | |
| ARHandler | GuidoFile2AR (GuidoParser *p, const char *file) |
| Parse a file and create the corresponding AR. More... | |
| ARHandler | GuidoString2AR (GuidoParser *p, const char *str) |
| Parse a string and create the corresponding AR. More... | |
| ARHandler | GuidoStream2AR (GuidoParser *p, GuidoStream *stream) |
| Parse a GuidoStream and create the corresponding AR. More... | |
| const char * | GuidoStream2GuidoString (GuidoStream *stream) |
| Finalize a GuidoStream and create the corresponding clean GuidoString. More... | |
| GuidoErrCode | GuidoParserGetErrorCode (GuidoParser *p, int &line, int &col, const char **msg) |
| Get the error syntax line/column. More... | |
| GuidoStream * | GuidoOpenStream () |
| Open a guido stream. More... | |
| GuidoErrCode | GuidoCloseStream (GuidoStream *s) |
| Close a guido stream. More... | |
| GuidoErrCode | GuidoWriteStream (GuidoStream *s, const char *str) |
| Write data to the stream. More... | |
| GuidoErrCode | GuidoResetStream (GuidoStream *s) |
| Erase all stream content in order to reuse it. More... | |
| GuidoErrCode GuidoCloseParser | ( | GuidoParser * | p | ) |
Close a guido parser and releases all the associated ressources.
| p | a parser previously opened with GuidoOpenParser |
| GuidoErrCode GuidoCloseStream | ( | GuidoStream * | s | ) |
| 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. |
| void GuidoFreeStreamString | ( | const char * | str | ) |
free a string previously returned by GuidoGetStream
| str | a pointer to the string |
| const char* GuidoGetStream | ( | const GuidoStream * | gStream | ) |
returns the string of the GuidoStream
| gStream | a GuidoStream |
| GuidoParser* GuidoOpenParser | ( | ) |
Creates a new parser.
| 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 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 |
| GuidoErrCode GuidoResetStream | ( | GuidoStream * | s | ) |
Erase all stream content in order to reuse it.
| s | a GuidoStream previoulsy opened with GuidoOpenStream |
| 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. |
| const char* GuidoStream2GuidoString | ( | GuidoStream * | stream | ) |
Finalize a GuidoStream and create the corresponding clean GuidoString.
| stream | the GuidoStream to clean |
| 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. |
| 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 |