<commit_before>/*
 * checker.c
 *
 *  Created on: 03/03/2015
 *      Author: NADIAGARCIA
 */

#include "pilas.h"
#include <stdio.h>

int main() {

	char operacion[100];
	int i = 0, error = 0;
	printf("Dame la operacion a revisar\n");

	gets(operacion);

	PILA *stack = NULL;

	while (operacion[i] && !error) {
		if (operacion[i] == '(' || operacion[i] == '[' || operacion[i] == '{') {
			push(&stack,operacion[i]);
		}else if(operacion[i] == ')' || operacion[i] == ']' || operacion[i] == '}'){
			char par = top(stack);
			if(par == '(' && operacion[i] == ')')
				error = 0;
			else if(par == '[' && operacion[i] == ']')
				error = 0;
			else if (par == '{' && operacion[i] == '}')
				error = 0;
			else
				error = 1;
		}
	}

	if(error){
		printf("La operacion esta mal formada\n");
	}else{
		if(!isEmtpy(stack))
			printf("La operacion esta mal formada\n");
	}

	return 0;
}<commit_msg>correccion en typo de isEmpty<commit_after>/*
 * checker.c
 *
 *  Created on: 03/03/2015
 *      Author: NADIAGARCIA
 */

#include "pilas.h"
#include <stdio.h>

int main() {

	char operacion[100];
	int i = 0, error = 0;
	printf("Dame la operacion a revisar\n");

	scanf("%s",operacion);

	PILA *stack = NULL;

	while (operacion[i] && !error) {
		if (operacion[i] == '(' || operacion[i] == '[' || operacion[i] == '{') {
			push(&stack,operacion[i]);
		}else if(operacion[i] == ')' || operacion[i] == ']' || operacion[i] == '}'){
			char par = top(stack);
			if(par == '(' && operacion[i] == ')')
				error = 0;
			else if(par == '[' && operacion[i] == ']')
				error = 0;
			else if (par == '{' && operacion[i] == '}')
				error = 0;
			else
				error = 1;
		}
	}

	if(error){
		printf("La operacion esta mal formada\n");
	}else{
		if(!isEmpty(stack))
			printf("La operacion esta mal formada\n");
	}

	return 0;
}
{'fraction_non_alphanumeric': 0.229490022172949, 'fraction_numerical': 0.019955654101995565, 'mean_word_length': 3.1494252873563218, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4599969', 'n_tokens_mistral': 850, 'n_tokens_neox': 732, 'n_words': 158}