mirror of
https://github.com/fluencelabs/lalrpop
synced 2025-03-27 05:31:04 +00:00
23 lines
300 B
Plaintext
23 lines
300 B
Plaintext
grammar Foo {
|
|
use tok::Tok;
|
|
|
|
token Tok where {
|
|
"(" => "LParen";
|
|
")" => "RParen";
|
|
"-" => "Minus";
|
|
};
|
|
|
|
pub S: () =
|
|
E => ();
|
|
|
|
E: () = {
|
|
E "-" T => ();
|
|
T => ();
|
|
};
|
|
|
|
T: () = {
|
|
"N" => ();
|
|
"(" E ")" => ();
|
|
};
|
|
}
|