GOLD parser is a historical grammar language created in 2012. GOLD is a free parsing system that is designed to support multiple programming languages. . Read more on Wikipedia...

7Years Old 25Users 0Jobs

Example code from the web:

<Statement> ::= if <Expression> then <Statements> end
            |  while <Expression> do <Statements> end
            |  for Id = <Range> do <Statements> end

Example code from Wikipedia:

<Statements>  ::= <Statements> <Statement>
               |  <Statement>

<Statement>   ::= display <Expression>
               |  display <Expression> read ID
               |  assign ID '=' <Expression>
               |  while <Expression> do <Statements> end
               |  if <Expression> then <Statements> end
               |  if <Expression> then <Statements> else <Statements> end
               
<Expression>  ::= <Expression> '>'  <Add Exp>
               |  <Expression> '<'  <Add Exp>
               |  <Expression> '<=' <Add Exp>
               |  <Expression> '>=' <Add Exp>
               |  <Expression> '==' <Add Exp>
               |  <Expression> '<>' <Add Exp>
               |  <Add Exp>

<Add Exp>     ::= <Add Exp> '+' <Mult Exp>
               |  <Add Exp> '-' <Mult Exp>
               |  <Add Exp> '&' <Mult Exp>
               |  <Mult Exp>

<Mult Exp>    ::= <Mult Exp> '*' <Negate Exp>
               |  <Mult Exp> '/' <Negate Exp>
               |  <Negate Exp>

<Negate Exp>  ::= '-' <Value>
               |  <Value>

<Value>       ::= Identifier
               |  StringLiteral
               |  NumberLiteral
               |  '(' <Expression> ')'

Last updated December 4th, 2019

Edit GOLD parser