————————————————————-
definition
module Main
exports
context-free start-symbols Exp

sorts Exp Id
context-free syntax
Id -> Exp
“(” Exp “)” -> Exp {bracket}
Exp “*” Exp -> Exp {cons(“Mul”)}
Exp “+” Exp -> Exp {cons(“Plus”)}
Exp “<” Exp -> Exp {cons(“Lt”)}

context-free priorities
Exp “*” Exp -> Exp
> Exp “+” Exp -> Exp
> Exp “<” Exp -> Exp

lexical syntax
[a-z] -> Id
[
] -> LAYOUT

lexical restrictions
Id -/- [a-zA-Z0-9_]

context-free restrictions
LAYOUT? -/- [
]
————————————————————-

Normalized:
————————————————————-
syntax
[60] -> “<”
[43] -> “+”
[42] -> “*”
[41] -> “)”
[40] -> “(”
-> <LAYOUT?-CF>
-> <LAYOUT?-CF>
<LAYOUT?-CF> “<” <LAYOUT?-CF> -> {appl(uqlit(“cons”),[fun(qlit(""Lt""))])}
<LAYOUT?-CF> “+” <LAYOUT?-CF> -> {appl(uqlit(“cons”),[fun(qlit(""Plus""))])}
<LAYOUT?-CF> “*” <LAYOUT?-CF> -> {appl(uqlit(“cons”),[fun(qlit(""Mul""))])}
“(” <LAYOUT?-CF> <LAYOUT?-CF> “)” -> {bracket}
->
->
[9-1032] ->
->
[97-122] ->
<LAYOUT?-CF> <LAYOUT?-CF> ->
-> {left}
[256] ->

restrictions
-/- [48-5765-909597-122]
<LAYOUT?-CF> -/- [9-1032]

priorities
<LAYOUT?-CF> “*” <LAYOUT?-CF> -> >
<LAYOUT?-CF> “+” <LAYOUT?-CF> ->
<LAYOUT?-CF> “+” <LAYOUT?-CF> -> >
<LAYOUT?-CF> “<” <LAYOUT?-CF> ->
-> {left} left ->
{left}
————————————————————-

Submitted on 25 July 2004 at 09:58

Log in to post comments