[phc-general] wrong xml
ml
ml at dasir.net
Mon Oct 8 13:16:32 CEST 2007
-r750 doesn't compile:
g++ -Wextra -Wno-unused-parameter -g -O2 -o src/phc getopt1.o getopt.o
Check_lowering.o Check_uppering.o Compile_C.o fresh.o Generate_C.o
Goto_uppering.o Lift_functions_and_classes.o Lower_control_flow.o
Lower_expr.o Lower_expr_flow.o Note_top_level_declarations.o
Prune_symbol_table.o Shredder.o embed.o AST.o AST_factory.o
AST_transform.o AST_visitor.o HIR.o HIR_factory.o HIR_transform.o
HIR_visitor.o cmdline.o lex.yy.o php_parser.tab.o AttrMap.o base64.o
Boolean.o demangle.o error.o Integer.o Object.o String.o parse.o
PHP_context.o XML_parser.o phc.o Consistency_check.o DOT_unparser.o
Invalid_check.o Pass_manager.o PHP_unparser.o Process_includes.o
Remove_concat_null.o Remove_parser_temporaries.o Strip_comments.o
Token_conversion.o XML_unparser.o -Wl,--export-dynamic
./libltdl/.libs/libltdlc.a -ldl -lxerces-c
Generate_C.o: In function `get_hash(String*)':
src/codegen/Generate_C.cpp:106: undefined reference to
`PHP::get_hash(String*)'
collect2: ld returned 1 exit status
$ g++ -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --enable-checking=release
i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)
same problem with -rHEAD
David
Paul Biggar napsal(a):
> Hi David,
>
>
> On 10/7/07, ml <ml at dasir.net> wrote:
>> I have PHC v1.7.2rc and I realized that the XML input/output is broken.
>
> Yes, this is true. We fixed it a while ago, but havent realeased since.
>
>> See? Everything is completly shuffled. What's wrong?
>
> We used to treat class and function definitions specially, and print
> them first. We no longer do that, so they print in the correct order
> now.
>
> We changed the grammar so that function and class definitions were
> normal statements, which fixed this. It is fixed in the our latest
> revision, which is available at http://code.google.com/p/phc/source.
>
> I tested your code in the latest revision in the repository. It seems
> that we broke XML output with a few recent changes, so you should try
> an earlier version. I tested revision 750, which seems fine. To check
> this out, the command is
>
> svn checkout http://phc.googlecode.com/svn/trunk/ phc -r 750
>
>
>> phc --dump-ast-xml < x.php | phc --read-ast-xml --dump-php --tab=" "
>
> Also, the commands have changed. To repeat the test, run
> src/phc --xdump=ast < a.php | src/phc --read-ast-xml --pretty-print --tab=" "
>
> Thanks for the bug report. Please let us know if you have any problems.
> Paul
>
>> and output is
>>
>> <?php
>> class C
>> {
>> }
>>
>> function f()
>> {
>> }
>>
>> define('X', 3);
>> ?>
>>
>
>> Thanks.
>>
>> David
>> _______________________________________________
>> phc-general mailing list
>> phc-general at phpcompiler.org
>> https://nova.villiros.com/cgi-bin/mailman/listinfo/phc-general
>>
>
>
More information about the phc-general
mailing list