Ass.2: Grammar of the WHILE language

Moderator: Secure Coding Lab

LordHoto
BASIC-Programmierer
BASIC-Programmierer
Beiträge: 135
Registriert: 14. Dez 2009 17:00

Ass.2: Grammar of the WHILE language

Beitrag von LordHoto » 27. Apr 2012 19:57

Hi,

I have a question about the grammar rules. The given grammar rules allow v (i.e. variable names) to be true, false, and, or, not, skip etc.. Is this intentional or would it be fine, when we don't accept these kind of keywords as variable names?

// Johannes
Compiler 1 Tutor WS 12/13

aderhold
Moderator
Moderator
Beiträge: 212
Registriert: 21. Okt 2005 10:50

Re: Ass.2: Grammar of the WHILE language

Beitrag von aderhold » 30. Apr 2012 10:09

Keywords like the ones you mentioned need not be accepted as names for variables. (This should make programs more readable for a human being, while syntactically there shouldn't be any ambiguities.)

Markus

Antworten

Zurück zu „Secure Coding Lab“