stason.org logo lotus


previous page: L22) What is the exact semantics of leave P and restart P, when P is the name of a pattern?page up: BETA Programming Language FAQnext page: L24) What is the maximum length of a BETA identifier?

L23) What is the BETA lexem syntax?

 Books
 TULARC
















Description

This article is from the FAQ, by with numerous contributions by others.

L23) What is the BETA lexem syntax?

The different lexems in the BETA language grammar (names, strings, and
numbers) are not precisely defined in any of the available documents. We
will therefore here give the definition:

<NameAppl> =    <NameDecl>
<NameDecl> =    (<letter>|"_")+(<digit>|<letter>|"_")*

<String>   =    "'"<char>*"'"
           where <char> can be any char except "'" and newline.
                        "'" are allowed in <String>, iff preceeded with "\".
                        "\n", "\t", etc. are allowed in <String> to
                        represent non-printable chars - see Compiler
                        manual (mia91-02) for details.

<Const>   =     (<int>|<based>|<real>) where
        <int>      = <digit>+
        <based>    = <int>("X"|"x")<basedNum>
        <basedNum> = (<digit>|<letter>)+
        <real>     = <int>["."<int>][("E"|"e")[("+"|"-")]<int>]

<letter>  =     "a"|"b"|...|"z"|"A"|"B"|...|"Z"
<digit>   =     "1"|"2"|...|"9"|"0"

The usage of |, +, *, (...), and [...] conform to standard regular
expressions syntax.

 

Continue to:


Share and Enjoy

Bookmark this story so others can enjoy it:
  • digg
  • Reddit
  • del.icio.us
  • Furl
  • Wists

Tags

programming







TOP
previous page: L22) What is the exact semantics of leave P and restart P, when P is the name of a pattern?page up: BETA Programming Language FAQnext page: L24) What is the maximum length of a BETA identifier?