Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specification sections #1

Closed
judofyr opened this issue Aug 5, 2019 · 1 comment
Closed

Specification sections #1

judofyr opened this issue Aug 5, 2019 · 1 comment
Assignees
Milestone

Comments

@judofyr
Copy link
Contributor

judofyr commented Aug 5, 2019

Let's try to figure out the best way to structure the specification into sections.

Some thoughts/inspirations:

  • Go spec, C++ spec (PDF), ES2019 spec
  • We want a canonical naming scheme for sections (like C++ does). E.g. the + operator could be defined under operator.plus with variants under operator.plus.string and operator.plus.int.
  • I think it's cleaner to describe the syntax of each expression in their section together with their semantic (instead of having duplicated sections under "Syntax"). This means that "Syntax" will just about the common syntax.

Proposed table of contents:

  • General - general
  • Syntax - syntax
    • Introduction - syntax.intro
    • White space - syntax.whitespace
    • Comments - syntax.comments
    • Precedence - syntax.precedence
  • Data types
    • Basic data types
      • Boolean type - type.boolean
      • String type - type.string
      • Number type - type.number
      • Null type - type.number
      • DateTime type - type.datetime
    • Composite data types
      • Array type - type.array
      • Object type - type.object
      • Pair type - type.pair
      • Range type - type.range
    • Subtypes
      • Document type - type.document
      • Reference type - type.reference
  • Simple expressions
    • This expression - expr.this
    • Local attribute expression - expr.local_attr
    • Everything expression - expr.everything
    • Parent expression - expr.parent
    • Parameter expression - expr.parameter
  • Compound expressions
    • Grouping expression - expr.group
    • Attribute expression - expr.attr
    • Filter expression - expr.filter
    • Projection expression - expr.projection
    • Pipe function call expression - expr.pipecall
    • Function call expression - expr.call
  • Operators
    • Unary plus operator - operator.uplus
    • Unary minus operator - operator.uminus
    • Logical operators - operator.logical
    • Relational operators - operator.relational
    • In operator - operator.in
    • Multiplicative operators - operator.multiplicative
    • Additive operators - operator.additive
    • Exponential operator - operator.exponential
    • Ordering operators - operator.ordering
    • Dereference operator - operator.dereference
    • Projection operator - operator.projection
@judofyr judofyr self-assigned this Aug 5, 2019
@judofyr
Copy link
Contributor Author

judofyr commented Aug 29, 2019

I've started incorporating this overall structure and it seems to work nicely. Some additional changes for v0.1:

  • Add a section for "Functions"
  • Add a section called "Execution model"
  • Ignore array traversal for now
  • Remove these types: Reference, Document, DateTime (until we can add them properly)

@judofyr judofyr closed this as completed Aug 29, 2019
@judofyr judofyr added this to the v0.1 milestone Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant