Contact: michael at supermarinesoftware dot com
Github: https://github.com/lyncmi07
   _____ __  ________       ______ 
  / ___//  |/  / ___/____  / __/ /_
  \__ \/ /|_/ /\__ \/ __ \/ /_/ __/
 ___/ / /  / /___/ / /_/ / __/ /_  
/____/_/  /_//____/\____/_/  \__/  
                                   

Supermare Software

                   
   ____  __________
  / __ \/ ___/ ___/
 / / / (__  ) /__  
/_/ /_/____/\___/  
                   

nsc

nsc on Github

NoSyn Backus Naur Form

1 Terminals

string ::= `"`[.]*`"`
integer ::= [0-9]+
double ::= [0-9]+\.[0-9]+
char ::= `'`[.]`'`

2 Keywords

alias
prefix
postfix
infix
bracketop
native
import

3 NonTerminals

<Program> ::= Ø
  | <ProgramStatament> ';' <Program>

<FunctionDefinition> ::= ident ident '(' <Parameters ')' '{' <BlockStatement> '}'
  | ident <OperatorType> '_' operator '_' '(' <Parameters> ')' '{' <BlockStatement> '}'
  | native ident ident '(' <Parameters ')'
  | ident backetop '_' <BracketType '_' '(' <Parameters> ')' '{' <BlockStatement> '}'

<ExpressionList> ::= Ø
  | <FilledExpressionList>

<Expression> ::= <Constant>
  | '(' <Expression> ')'
  | ident '(' <ExpressionList ')'
  | operator <Expression>
  | <Expression> operator
  | <Expression> operator <Expression

<Constant> ::= string
  | intenger
  | double
  | char

<FilledExpressionList> ::= <Expression> ',' <FilledExpressionList>
  | <Expression>

<VariableDeclaration> ::= ident ident

<Statement> ::= <Expression>
  | <VariableDeclaration>

<Parameter> ::= ident ident
  | ident operator ident

<FilledParameters> ::= <Parameters> ',' <FilledParameters>

<Parameters> ::= Ø
  | <FilledParameters>

<FilledBlock> ::= <Statement> ';' <FilledBlock>
  | Statement ';'

<BlockStatement> ::= Ø
  | <FilledBlock>

<OperatorType> ::= prefix | postfix | infix
<BacketType> ::= '(' Ø ')'
  | '[' Ø ']'
  | '{' Ø '}'

<AliasDefinition> ::= alias ident operator ident

<ProgramStatement> ::= <VariableDeclaration>
  | <FunctionDefinition>
  | <AliasDefinition>
  | <ImportStatement>

<ImportStatement> ::= import <ModuleName>
  | native import <ModuleName>

<ModuleName> ::= ident
  | ident operator <ModuleName>

Author: Michael Lynch

Created: 2019-07-02 Tue 20:50

Validate

/nsc/BackusNaur.html