Skip to main content

module examples::fixedMembers::Syntax

rascal-0.40.16
typepal-0.14.8

Usage

import examples::fixedMembers::Syntax;

Source code

http://github.com/usethesource/typepal/src/examples/fixedMembers/Syntax.rsc

Dependencies

extend examples::CommonLex;

syntax Program

start syntax Program = Module*;

syntax Module

syntax Module
= "module" Id name Import* imports "{" Function* funs Stmt* stmts "}"
;

syntax Import

syntax Import = "import" Id id ";";

syntax Function

syntax Function = "fun" Id functionId "{" "}";

syntax Stmt

syntax Stmt = 
Id moduleId "." Id funId "(" ")" ";"
;

syntax Keywords

keyword Keywords = "module" | "import" ;