Programming Tutorials

Comment on Tutorial - Using StringTokenizer in Java By Emiley J



Comment Added by : lucky

Comment Added at : 2011-05-06 23:01:43

Comment on Tutorial : Using StringTokenizer in Java By Emiley J
Create a lexical analyzer of the C- programming language using Java program. The following statements available in C- are as follows:

Variable Declarations:
1. Variable must start with a letter and can be followed by a number.
2. Special characters are invalid variable name.
3. Variable must be declared before the corresponding data type.
Data types:
int char
float double
Sample variable declarations:
int A, B, C1.
Operators:
Mathematical Operators
1. Addition (+)
2. Subtraction (-)
3. Multiplication (X)
4. Division (/)
Logical Operators
1. Not (!)
2. AND (&)
3. OR (| )
Relational Operators
1. Greater than (>)
2. Less than (<)
3. Equal (==)
4. Less than equal (<=)
5. Greater than equal (>=)
6. Not equal (!>)
Assignment operator (:)
RESERVED WORDS
PRINT
INPUT
START
END
IF
ELSE
FOR
WHILE
DO WHILE
NOTE: All statements are terminated by period!


View Tutorial