Hello. The last post on this list was months ago, and that was just a guy
asking, "Is anybody there?".
nossogrupo@[EMAIL PROTECTED]
wrote:
> I have to do a work for Formal Languages at my university and I have to
> create a lexical analyzer for modula 3 using lex (flex), but I never
> programmed in Modula3.
>
> First I am having a little trouble whith the identifiers because in the
> grammar I have it seems that " __some_variable " is not a valid
> identifiers, more precisely, that I cant initiate a identifires (e.g. a
> variable name) whith the char _ . Is it true or can I use _ to
> initialize identifiers names?
You need the compiler; last time I looked, it was on www.elegosoft.com.
Perhaps you could get by with a few pages from that site.
In file doc/reference/syntax.html:
Id = Letter {Letter | Digit | "_"}.
That is, a name must start with a letter, but any combination of letters,
digits, underscores may follow.
>
> Second, in my grammar all keywords and resercated identifiers are UPPER
> CASE, and it says that Modula3 is case sensitive. So, is realy Modula3
> case sensitive and do I have to type all the keywords in UPPER CASE or
> can I type it in both lower an UPPER case?
>
Yes, M3 is case-sensitive. IF THEN ELSE END are keywords; if,then,else,end
are available as names for variables. Is your ****ft-key broken?
HTH


|