Question

I'm trying to add a new keyword in PHP (just learning the core), so what I did was: added a new token to zend_language_parser.y, used it in an unticket_statement, compiled PHP, but it didn't work out. It seems like I need to add that new keyword in zend_language_scanner.l (I assumed it by another definitions in this file) and regenerate zend_language_scanner.c with the help of re2c.

But here's what re2c gave me:

$ re2c -isgf Zend/zend_language_scanner.l
re2c: error: line 1004, column 6: can't find symbol

Line 1004 contains this definition:

LNUM    [0-9]+

This error will pop even on unchanged zend_language_scanner.l file.

Here's re2c -v output: re2c 0.13.5

Does anybody knows how can I regenerate this scanner or what am I doing wrong?

Était-ce utile?

La solution

you should try it like this:

re2c --no-generation-date --case-inverted -cbdF -o a.c  zend_language_scanner.l

I have the same problem, until i found the source cmd from file Makefile.frag:

$(RE2C) $(RE2C_FLAGS) --case-inverted -cbdFt Zend/zend_language_scanner_defs.h -oZend/zend_language_scanner.c Zend/     zend_language_scanner.l)
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top