php-to-c-extension icon indicating copy to clipboard operation
php-to-c-extension copied to clipboard

Parser Error

Open azcpavel opened this issue 8 years ago • 7 comments

Error: PHP Parser Error: Syntax error, unexpected '<', expecting T_STRING on line 3

File Name# Dummy.php

Code#

azcpavel avatar Oct 20 '15 04:10 azcpavel

I have the same issue. BTW looking at the build_extension.php, I would suggest to rewrite the file using standard Symfony console and Filesystem components. This way it will be testable. The utility does not work on ubuntu either. I have downloaded the lastest version of Zephir and it does not contain any "install-json" utility!!!

blendsdk avatar Feb 14 '16 10:02 blendsdk

not working on windows !

iraniamir avatar Oct 21 '16 20:10 iraniamir

I tested this exclusively on linux box so I did not try windows...

jimthunderbird avatar Jan 17 '17 00:01 jimthunderbird

@jimthunderbird You can use http://appveyor.com/

sergeyklay avatar Jan 17 '17 06:01 sergeyklay

I'm hitting the same issue on Ubuntu, I've cloned json-c to get past that issue but now hitting the initial error above, did anybody resolve it?

Stevehans avatar Oct 29 '17 18:10 Stevehans

Issue looks to be with src/PHPtoCExt/Converter/CodeReformatConverter.php

I'll pick this up and post any solution here

Stevehans avatar Oct 29 '17 20:10 Stevehans

The issue is that the code is assuming the contents of the lines in the ASTXMLLines array rather than parsing it as XML,

Converter.c needs + 11 changed to + 17 to cater for extends and implements (presumably new since the version of php that this was originally written for)

Guessing we'll probably see other similar issues, hope this helps someone.

Stevehans avatar Oct 29 '17 21:10 Stevehans