2

Anyone can explain how to get for instance the sample running?

I downloaded the ometa-js rep from github and opened index.htm, which results in an error. The hosted version at http://www.tinlizzie.org/ometa-js displays errors inside the sourcecode whenever I do anything.

// a simple recognizer, produces no useful value

ometa L { number = digit+, addExpr = addExpr '+' mulExpr | addExpr '-' mulExpr | mulExpr, mulExpr = mulExpr '*' primExpr | mulExpr '/' primExpr | primExpr, primExpr = '(' expr ')' | number, expr = addExpr }

L.matchAll('6*(4+3)', 'expr')

citykid
  • 9,916
  • 10
  • 55
  • 91

1 Answers1

1

I just cloned the repository with

  git clone https://github.com/alexwarth/ometa-js.git

and opened index.html without any problems. I was also able to evaluate the code you included in your question.

(In order to evaluate code in the workspace, you have to highlight the text that you want to evaluate, then click "do it" or "print it" -- which is like a "do it" that also prints the results.)

If this is still not working for you, please let me know what error message you're seeing, the browser you're using, etc. and I'll be happy to look into it.

Alex Warth
  • 36
  • 2