Ask Question
5 October, 23:30

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

+4
Answers (1)
  1. 5 October, 23:57
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers