This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## arith.l | |
| /* lex program*/ | |
| %{ | |
| /* Definition section */ | |
| #include<stdio.h> | |
| #include "y.tab.h" | |
| //extern int yylval; | |
| %} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## input.txt | |
| #define PI 3.14 | |
| #define p(y) y+y | |
| void main(){ | |
| int a ; | |
| int PI ; | |
| a= PI ; | |
| int b; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## input.txt | |
| if id == id then id = id + 1 | |
| ## RecPars.java | |
| //S-> if exp then stm | |
| //exp-> true | false | id op id | |
| //op-> < | > | == | |
| //stm-> id = id + 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Input.txt | |
| int main() { | |
| cout << "Hello" << endl; | |
| return 0; | |
| } | |
| ## wordcount.l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## input.txt | |
| int main() { | |
| cout << "Hello" << endl; | |
| return 0; | |
| } | |
| ## tokenidentifier.l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Checks for aa+b* | |
| ## Code for String_rec.java | |
| import java.util.*; | |
| //aa+b* | |
| public class String_rec { | |
| String str; | |
| int state=0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Input File (input.txt) | |
| int main() { | |
| int a=20,65b=10; | |
| cout << "Hello" << endl; | |
| return 0; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Input file (input.cpp) | |
| /* Program to add two numbers using cpp | |
| Take three variables a, b, c | |
| Input a, b from user | |
| add a and b to c | |
| print c | |
| */ | |
| #include <bits/stdc++.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Input file (input.cpp) | |
| /* Program to add two numbers using cpp | |
| Take three variables a, b, c | |
| Input a, b from user | |
| add a and b to c | |
| print c | |
| */ | |
| #include <bits/stdc++.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Input.cpp //for input to the numberAdder | |
| /* Program to add two numbers using cpp | |
| Take three variables a, b, c | |
| Input a, b from user | |
| add a and b to c | |
| print c | |
| */ | |
| #include <bits/stdc++.h> |