0

The descriptions of lexical analysis & syntax use a modified BNF grammar notation.This uses the following style of definition

name ::= lc_letter (lc_letter | "_")* lc_letter ::= "a"..."z" I couldn't get it.

4th Jun 2021, 4:46 PM
lisa
4 odpowiedzi
+ 1
this operator "do" nothing... at left there's the token name, at right the token description basic token have simple description, more complexe token could chain tokens: that's a kind of dictionary of vocabulary/grammar used in a (programing) language... it's used to build parser/analyzer of languages ;)
5th Jun 2021, 4:09 AM
visph
visph - avatar
0
you should read it from bottom to top: lc_letter := "a"..."z" lc_letter represent range of "a" to "z" char name := lc_letter (lc_letter | "_")* name represent one lc_letter folliowed by any number (*) of lc_letter or "_" char...
4th Jun 2021, 6:36 PM
visph
visph - avatar
0
"abc_def" is a valid 'name' token "_abc" is not a valid 'name' token
4th Jun 2021, 6:38 PM
visph
visph - avatar
0
::= or := what does this operator do ? that's why I am not getting.
5th Jun 2021, 4:01 AM
lisa