3

How to write For 1 data type, integer, and the only identifiers are single letter (i.e. there are only 26 possible identifiers).

not case sensitive have white space (blank characters, tab characters, and end of line characters) between every lexeme.see this

Vidya
  • 145
  • 1
  • 1
  • 9
  • 1
    I've read the question, have read the link text and still can't understand what you mean. By the way, what have you tried so far? – Luiggi Mendoza Feb 29 '12 at 06:01
  • 3
    typically with a lexical analyzer you read 1 character from the source file at a time then classify it, identifier, number, keyword, etc... Also have you tried anything? Just because you have grammar doesn't really prove you've done any work – Hunter McMillen Feb 29 '12 at 06:05
  • writing program with switch cases for operators @LuiggiMendoza – Vidya Feb 29 '12 at 06:05
  • 1
    Write a program to read file . Here is a good example http://stackoverflow.com/questions/811851/how-do-i-read-input-character-by-character-in-java then have a hasmap of what integer value you want to assign to to your char. – Shahzeb Feb 29 '12 at 06:28

1 Answers1

2

There's a great NLP engine called OpenNLP written in Java.

Take a look over there code, you'll learn a lot.

A T
  • 13,008
  • 21
  • 97
  • 158