Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@eterps
Created May 31, 2019 07:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eterps/4091eec3d2366782da58a589a7da711c to your computer and use it in GitHub Desktop.
Save eterps/4091eec3d2366782da58a589a7da711c to your computer and use it in GitHub Desktop.
Fragment of Oberon0 for https://ohmlang.github.io/editor/
Oberon0 {
Module = "MODULE" ident ";" "BEGIN" StatSeq "END" ident "."
StatSeq = statement (";" statement)*
statement = procedureCall?
procedureCall = ident (actualParameters | "*")?
actualParameters = "(" integer ("," integer)* ")"
integer = digit+
ident = letter alnum*
}
- Input:
MODULE B;
BEGIN
WriteInt(5,0);
WriteLn
END B.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment