Posts

Showing posts with the label System Programming and Compiler Construction

Intermediate Code Generation > C Program

Intermediate Code Generation > C Program System Programming and Compiler Construction Program: #include<stdio.h> #include<conio.h> #include<string.h> char op[2],arg1[5],arg2[5],result[5]; void main() {   FILE *fp1,*fp2;   fp1=fopen("input.txt","r");   fp2=fopen("output.txt","w");   while(!feof(fp1))   {

To create and use program Libraries in Linux > C Program

To create and use program Libraries in Linux > C Program System Programming and Compiler Construction main.c #include<stdio.h> #include<math.h> #include "shared.h" int main() { double result=5.0; result=factorial(result); printf("\n The factorial is [%g] \n",result); return 0; }

Program to design and implement Macro > Assembly Program

Image
Program to design and implement Macro  > Assembly Program System Programming and Compiler Construction Program 1: macro.c #include<stdio.h> #include<conio.h> #include<string.h> struct mnt { int sr; char mn[30]; int mdtc; int p; }ntab[10];

To implement Shift Reduce Parser > C Program

Image
To Implement Shift Reduce Parser > C Program System Programming and Compiler Construction  Program:

To implement Recursive Descent Parser > C Program

Image
To implement Recursive Descent Parser > C Program System Programming and Compiler Construction  Program: #include"stdio.h" #include"conio.h" #include"string.h" #include"stdlib.h" #include"ctype.h"

Program to design and implement Pass 1 of 2 Pass Assembler > C and Assembly Program

Image
Program to design and implement Pass 1 of 2 Pass Assembler > C and Assembly Program System programming and Compiler Construction .asm code: PG1              START 1000                     USING *, 15                      L                    1, FOUR                      A                    1, ='5'                      ST                  1, TEMP                      A                    1, ='4' FOUR         DC   ...

Program To Calculate Mathematical Expressions > Lex and Yacc Program

Program To Calculate Mathematical Expressions > Lex and Yacc Program  System Programming and Compiler Construction Programs: pratspcc3.l: %{   #include "y.tab.h"   extern int yylval; %}

To validate characters using Lex > Lex and Yacc Program

To validate characters using Lex > Lex and Yacc Program  System Programming and Compiler Construction Program: %{ /* To validate characters using lex*/ %} %% [\t]+                                    ;

To copy text from one file to another file > C Program

To copy text from one file to another file > C Program System Programming and Compiler Construction #include<stdio.h> #include<conio.h> void main() { FILE *fp1, *fp2; char ch, fname1[20], fname2[20];