# code reuse
include 'constants.bnf'

# return non-strings
$NUMBER: <% $* = 10 %>;

# ends up mulitplying the number
MULTIPLY: $NUMBER{10,1000};

$CLASS:
    <%
    class Crazy:
        def __init__(self):
            self.member = 'Hello'

    $* = Crazy
    %>
    ;

$MEMBER: $CLASS <% $* = $$().member %>;

// This is also a comment
EXAMPLE(start): %str(MULTIPLY) ' ' $MEMBER ' @ ' %time.strftime('%Y-%m-%d %H:%M:%S') ' (' %str($NOW) ')';

<%post
    print $$
%>
