#
# Regular Definitions
#
rl rl_ws /[.+ \t\n\r\v]+/
rl rl_id /[a-zA-Z_][a-zA-Z0-9_]*/
#
# Tokens
#
lex
literal `= `< `> `/
# Ignore whitespace.
ignore /rl_ws/
# Open and close id
token id /rl_id/
end
#
# Productions
#
def attr [id `= id]
def attr_list
[attr_list attr]
| []
def open_tag
[`< id attr_list `>]
def close_tag
[`< `/ id `>]
def tag
[open_tag item_list close_tag]
def item_list
[item_list tag]
| []
parse Attrs: attr_list[ stdin ]
print( Attrs )
construct IL: item_list
["\n"]
print( IL )
##### IN #####
+ foo = asdf +
##### EXP #####
+ foo = asdf +