Implement the lexical analyzer using JLex, flex or other lexical analyzer generating tools

LOGIC: Read the input string. Check whether the string is identifier/ keyword /symbol by using the rules of identifier and keywords using LEX ToolPROCEDURE: Go to terminal .Open vi editor ,Lex lex.l  ,…

Continue ReadingImplement the lexical analyzer using JLex, flex or other lexical analyzer generating tools

Java program on datagram socket for client/server to display the message on client side, typed at the server side

import java.util.*; import java.net.*; import java.io.*; public class udpserver { public static void main(String args[]) { DatagramSocket aSocket=null; Scanner scan=new Scanner(System.in); int ServerPort=999; System.out.println("Server ready n Waiting for connectionn"); try…

Continue ReadingJava program on datagram socket for client/server to display the message on client side, typed at the server side

Using TCP/IP sockets, write a client-server java program to make the client send the file name and to make the server send back the contents of the requested file if present and Implement the above program using as message queues or FIFOs as IPC channels

import java.util.*; import java.net.*; import java.io.*; public class tcpserver { public static void main(String[] args) { try { ServerSocket s=new ServerSocket(998); System.out.println("Server Readynwaiting for connection ....."); Socket s1=s.accept(); DataOutputStream dos=…

Continue ReadingUsing TCP/IP sockets, write a client-server java program to make the client send the file name and to make the server send back the contents of the requested file if present and Implement the above program using as message queues or FIFOs as IPC channels