On the Analyzer in the C language,On the Analyzer in the C language,
1. if we find the ';', which is the prototype. // return 0
2. if we find the '{', which is the code block. // return 1
so, the function lootin is like the below.
int prototypeorcodeblock ( FILE *fp, int file_index, int file_end ); int prototypeorcodeblock ( FILE *fp, int file_index, int file_end ) { int i; char c; for ( i = file_index; i<file_end; i++ ) { c = getchar(fp); switch (c) { case ';' return 0; case '{' return 1; } } return -1; }
1. called "semi-colon".
2. called "curly brace".