Permalink
Browse files

fixed stuff, where is my money ?

  • Loading branch information...
2 parents 40bccca + 6f14016 commit d612ecdd904019cd881e4107a0469dcebeb33d12 @crazysaem crazysaem committed Apr 17, 2012
Showing with 61 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. 0 .gitignore~
  3. +54 −0 bin/parser.c
  4. +6 −0 src/parser.y
View
@@ -0,0 +1 @@
+#
View
No changes.
View
@@ -501,13 +501,23 @@ static const yytype_int8 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
+<<<<<<< HEAD
0, 74, 74, 84, 85, 94, 95, 96, 97, 106,
107, 111, 112, 123, 124, 132, 133, 137, 138, 142,
143, 147, 150, 152, 156, 157, 158, 159, 160, 161,
162, 163, 167, 171, 172, 176, 177, 181, 182, 183,
184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
194, 195, 196, 197, 198, 202, 203, 207, 208, 212,
213
+=======
+ 0, 69, 69, 79, 80, 89, 90, 91, 92, 101,
+ 102, 106, 107, 118, 119, 127, 128, 132, 133, 137,
+ 138, 142, 145, 147, 151, 152, 153, 154, 155, 156,
+ 157, 158, 162, 166, 167, 171, 172, 176, 177, 178,
+ 179, 180, 181, 182, 183, 184, 185, 186, 187, 188,
+ 189, 190, 191, 192, 193, 197, 198, 202, 203, 207,
+ 208
+>>>>>>> 6f140168e6eef42100922a7891110aebe3760305
};
#endif
@@ -1556,15 +1566,32 @@ yyparse ()
{
case 9:
+<<<<<<< HEAD
/* Line 1455 of yacc.c */
#line 106 "src/parser.y"
{(yyval.num)=1;}
break;
case 10:
+=======
+/* Line 1806 of yacc.c */
+#line 101 "src/parser.y"
+ {(yyval.id)=1;}
+ break;
+
+ case 10:
+
+/* Line 1806 of yacc.c */
+#line 102 "src/parser.y"
+ {(yyval.id)=0;}
+ break;
+
+ case 12:
+>>>>>>> 6f140168e6eef42100922a7891110aebe3760305
/* Line 1455 of yacc.c */
#line 107 "src/parser.y"
+<<<<<<< HEAD
{(yyval.num)=0;}
break;
@@ -1582,26 +1609,48 @@ yyparse ()
/* Line 1455 of yacc.c */
#line 124 "src/parser.y"
{addinsert_v((yyvsp[(1) - (1)].id), -1);;}
+=======
+ { if ((yyvsp[(1) - (2)].id) == 0)
+ {printf("Error in Variabledefinition! -> Variable cannot declared as void!\n");}
+ else {printf("variable declaration %s %s \n",(yyvsp[(1) - (2)].id), (yyvsp[(2) - (2)].id));} }
+>>>>>>> 6f140168e6eef42100922a7891110aebe3760305
break;
case 15:
+<<<<<<< HEAD
/* Line 1455 of yacc.c */
#line 132 "src/parser.y"
{printf("function_def %s %s\n", (yyvsp[(1) - (7)].num), (yyvsp[(2) - (7)].id));;}
+=======
+/* Line 1806 of yacc.c */
+#line 127 "src/parser.y"
+ {printf("function_def %s %s\n", (yyvsp[(1) - (7)].id), (yyvsp[(2) - (7)].id));}
+>>>>>>> 6f140168e6eef42100922a7891110aebe3760305
break;
case 17:
+<<<<<<< HEAD
/* Line 1455 of yacc.c */
#line 137 "src/parser.y"
{printf("function_dec %s %s\n", (yyvsp[(1) - (4)].num), (yyvsp[(2) - (4)].id));;}
+=======
+/* Line 1806 of yacc.c */
+#line 132 "src/parser.y"
+ {printf("function_dec %s %s\n", (yyvsp[(1) - (4)].id), (yyvsp[(2) - (4)].id));}
+>>>>>>> 6f140168e6eef42100922a7891110aebe3760305
break;
+<<<<<<< HEAD
/* Line 1455 of yacc.c */
#line 1605 "bin/parser.c"
+=======
+/* Line 1806 of yacc.c */
+#line 1632 "bin/parser.c"
+>>>>>>> 6f140168e6eef42100922a7891110aebe3760305
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -1819,8 +1868,13 @@ yyparse ()
+<<<<<<< HEAD
/* Line 1675 of yacc.c */
#line 216 "src/parser.y"
+=======
+/* Line 2067 of yacc.c */
+#line 211 "src/parser.y"
+>>>>>>> 6f140168e6eef42100922a7891110aebe3760305
void yyerror (const char *msg)
View
@@ -109,9 +109,15 @@ type //typdefs for typechecking
variable_declaration
: variable_declaration COMMA identifier_declaration
+<<<<<<< HEAD
| type identifier_declaration { if ($1 == 0)
{printf("Error in Variabledefinition! -> Variable cannot declared as void!\n");}
else {printf("variable declaration %d \n",$1/*,$2->varname TODO: fix that sh!t*/);}}
+=======
+ | type identifier_declaration { if ($1 == 0)
+ {printf("Error in Variabledefinition! -> Variable cannot declared as void!\n");}
+ else {printf("variable declaration %s %s \n",$1, $2);} }
+>>>>>>> 6f140168e6eef42100922a7891110aebe3760305
;
/*

0 comments on commit d612ecd

Please sign in to comment.