Skip to content

Instantly share code, notes, and snippets.

View bd76075-oss's full-sized avatar

bd76075-oss

  • Joined Oct 9, 2025
View GitHub Profile
%{
#include <stdio.h>
%}
%%
^00.* { printf("Accepted: %s\n", yytext); }
.*01$ { printf("Accepted: %s\n", yytext); }
.* { printf("Rejected: %s\n", yytext); }
%{
#include <stdio.h>
#include <stdlib.h>
#include "y.tab.h"
extern int yylval;
%}
%%
[0-9]+ { yylval = atoi(yytext); return NUMBER; }
#include<stdio.h>
#include<string.h>
int k=0,z=0,i=0,j=0,c=0;
char a[16],ac[20],stk[15],act[10];
void check();
int main()
{
puts("GRAMMAR is E->E+E \n E->E*E \n E->(E) \n E->id");
puts("enter input string ");
#include<stdio.h>
#include<string.h>
char input[10];
int i=0,error=0;
void E();
void T();
void Eprime();
void Tprime();
void F();
void main()
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#define MAX_STATES 100
#define MAX_SYMBOLS 10
int n_states, n_symbols;
int dfa[MAX_STATES][MAX_SYMBOLS];
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
char tac[100][100];
int n;
void generate8086(char *line) {
char lhs[10], op1[10], op2[10], oper;