/*
  Parse a class declaration. The current token is the 'class' keyword.

  class:=  CLASSIDENT ';'                            // Forward declaration
         | CLASSIDENT ':' PARENTCLASSIDENT CLASSBODY // Subclass (not used yet!)
         | CLASSIDENT CLASSBODY
 */
void parseClass(GTokenType token)
{
    PPARSEINFO pParseInfo=(PPARSEINFO)gScanner->user_data;
    pParseInfo->pCurInterface=createInterfaceStruct();

    /* Get the class name. */
    pParseInfo->pCurInterface->chrName=parseClassIdent();

    /* Check for forward declaration */
    if(matchNext(';'))
    {
        doForwardClassDeclaration();
    }
    else
    {
        /* This is the real thing. */
        doClassDeclaration();
    }/* not forward declaration */

#if 0
    g_printf("\n\n");
    /* In printdata.c */
    printAllInterfaces();
    g_printf("\n\n");
    printInterface(pParseInfo->pCurInterface);
#endif
}
Beispiel #2
0
jstring
Java_com_test_test_test_resultFromJNI(JNIEnv* env, jobject thiz)
{
    
	unsigned int* _printInterface;
    unsigned int __printInterface = (unsigned int) &printInterface;   
   	_printInterface = (unsigned int*)(__printInterface);     	
   	

	strcpy(str,"");
	printB();
    printInterface();
    ((unsigned int*)((unsigned int) &printInterface))[0] = 0xe51ff004;
    ((unsigned int*)((unsigned int) &printInterface))[1] = (unsigned int) &printB;
    printInterface();
        
    return (*env)->NewStringUTF(env, str);
}
Beispiel #3
0
int main(){
	int op = 0;

	FILE* file = fopen("file.dat", "r+");

	if(!file)
	   file = fopen("file.dat", "w+");

	while(1){
	    printInterface();
	    scanf("%d", &op);

	    //Lista opções do usuário
	    switch(op){
	        case 1: system("cls");
					inserirVarios(file);
		            break;

		    case 2: system("cls");
					listar(file);
		            break;

		    case 3: system("cls");
					buscarRRN(file);
		            break;

		    case 4: system("cls");
				    buscarUser(file);
		            break;

		    case 5: system("cls");
					remover(file);
		            break;

		    case 0: exit(0);

	   	    default: printf("Opcao invalida!\n");
	   }
    }

	getch();
	close(file);
}