antlr / antlr-php-runtime

PHP Runtime for ANTLR4
BSD 3-Clause "New" or "Revised" License
81 stars 19 forks source link

No ::json() method in Parser class (not library or generated) #13

Closed stepanchvatik closed 3 years ago

stepanchvatik commented 3 years ago

Hello, I tried to go step by step through your tutorial and I created my grammar, ran command in terminal and put some code in php file. But to get $tree (ParseTreeWalker arg) I need to do $parser::json(), which is undefined... any ideas?

mtouellette commented 3 years ago

@stepanchvatik the json method is generated for the JSON grammer. Your grammar will produce a different method.