Ask Question
7 October, 22:52

3) Write code in a language of your choice that checks a source file (input file in plain text format) that separates lexemes by white space and special characters. This lexical analyzer will only have tokens for special characters and alphanumeric strings. Ie: 2345 6tgbsauhd9sa67*I{OPKDSl; jaklhl Would be 2345 6tgbsauhd9sa67 * I { OPKDSl; jaklhl

+2
Answers (1)
  1. 7 October, 23:56
    0
    CODE:

    import java. io.*;

    class Test

    {

    public static void main (String[] args) {

    File file = new File ("input. txt");

    try{

    BufferedReader b = new BufferedReader (new FileReader (file));

    String line;

    while ((line = b. readLine ()) ! = null)

    {

    for (int i=0; i
    (c>='a' && c<='z')

    }

    }

    catch (Exception e)

    {

    System. out. println (e);

    }

    }

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “3) Write code in a language of your choice that checks a source file (input file in plain text format) that separates lexemes by white ...” in 📘 Business if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers