A polymorphic record calculus
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test
.gitignore
.travis.yml
LICENSE
Makefile
OCamlMakefile
README.md
opam

README.md

poly-record-ml

Build Status

requirements

  • menhir
  • ounit (for testing)

BNF

<program> ::= <term> ";;"

<term> ::= <variable>
         | <integer>
         | <boolean>
         | "()"
         | <term> <op> <term>
         | "if" <term> "then" <term> "else" <term>
         | "fun" (<variable>+ | "()") "->" <term>
         | <term> <term>
         | "let" <variable> (<variable>+ | "()")? "=" <term> "in" <term>
         | "{" <record> "}"
         | <term> "." <label>
         | "modify" "(" <term> "," <label> "," <term> ")"
         | <term> ";" <term>
         | "ref" <term>
         | "!" <term>
<variable> ::= <small> | <alphanum>+
<alphanum> ::= <alphabet> | <number> | ['_' '\'']
<integer> ::= '-'? <number>
<number> ::= <digit>+
<alphabet> ::= <small> | <capital>
<small> ::= ['a' - 'z']
<capital> ::= ['A' - 'Z']
<digit> ::= ['0' - '9']
<boolean> ::= "true" | "false"
<op> ::= "+" | "*" | "<" | ":="
<record_body> ::= <record_field> ("," <record_field>)*
<field> ::= <label> "=" <term>
<label> ::= <variable>

References