Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this is tokens.h please use c language // keywords #define K_FOREACH 200 #define K PRINT 201 #define K WHILE 202 #define K REPEAT 203 #define

image text in transcribedthis is tokens.h
image text in transcribed
please use c language
// keywords #define K_FOREACH 200 #define K PRINT 201 #define K WHILE 202 #define K REPEAT 203 #define K_UNTIL 204 #define K BEGIN 205 #define K END 206 #define K_DECLARE 209 #define K IF 210 #define K THEN 211 #define K_MAIN 212 #define K_INTEGER 213 #define K_FLOAT 214 1/ operators #define OP ASSIGN 220 #define OP_ADD 221 #define OP SUB 222 #define OPMUL 223 #define OP DIV 224 #define OP_LT 225 #define OP GT 226 #define OP_LEQ 227 #define OPGEQ 228 #define OP_EQ 229 // OP DIFF is #define OP_DIFF 230 // OP_PLUSPLUS is ++ #define OP_PLUSPLUS 231 // OPADDINC 1st #define OP ADDINC 232 #define CAR A 400 #define CAR B 401 #define CAR_C 402 #define CAR AB 403 // literals #define T_ID 240 #define L INTEGER 241 ndefine L FLOAT 242 #define TEOF 280 1. (1.5pt) Add the necessary rules to recognize the arithmetic operators: +, -, * /.+=++,>===,. See the file tokens.h to determine the constants to be used (they start with the prefix 'OP-'). // keywords #define K_FOREACH 200 #define K PRINT 201 #define K WHILE 202 #define K REPEAT 203 #define K_UNTIL 204 #define K BEGIN 205 #define K END 206 #define K_DECLARE 209 #define K IF 210 #define K THEN 211 #define K_MAIN 212 #define K_INTEGER 213 #define K_FLOAT 214 1/ operators #define OP ASSIGN 220 #define OP_ADD 221 #define OP SUB 222 #define OPMUL 223 #define OP DIV 224 #define OP_LT 225 #define OP GT 226 #define OP_LEQ 227 #define OPGEQ 228 #define OP_EQ 229 // OP DIFF is #define OP_DIFF 230 // OP_PLUSPLUS is ++ #define OP_PLUSPLUS 231 // OPADDINC 1st #define OP ADDINC 232 #define CAR A 400 #define CAR B 401 #define CAR_C 402 #define CAR AB 403 // literals #define T_ID 240 #define L INTEGER 241 ndefine L FLOAT 242 #define TEOF 280 1. (1.5pt) Add the necessary rules to recognize the arithmetic operators: +, -, * /.+=++,>===,. See the file tokens.h to determine the constants to be used (they start with the prefix 'OP-')

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

1 The difference between a command system and a market system.

Answered: 1 week ago

Question

4 How the market system adjusts to change and promotes progress.

Answered: 1 week ago