pegjs is an actively used grammar language created in 2010.

9Years Old 4,035Users 0Jobs
  • pegjs does not currently rank in our top 50% of languages
  • the pegjs website
  • pegjs on github
  • pegjs first appeared in 2010
  • the pegjs team is on twitter
  • I have 31 facts about pegjs. what would you like to know? email me and let me know how I can help.

Example code from the web:

start
 = additive

additive
  = left:multiplicative "+" right:additive { return left + right; }
  / multiplicative

multiplicative
  = left:primary "*" right:multiplicative { return left * right; }
  / primary

primary
  = integer
  / "(" additive:additive ")" { return additive; }

integer "integer"
  = digits:[0-9]+ { return parseInt(digits.join(""), 10); }

Last updated July 22nd, 2019