summaryrefslogtreecommitdiff
path: root/giscanner/scannerparser.y
Commit message (Collapse)AuthorAgeFilesLines
* [scanner] Make sure private enums are filteredJohan Dahlin2010-09-261-0/+2
| | | | This is a follow-up to 60a8c75 which wasn't properly fixed.
* Remove trailing whitespaceJohan Dahlin2010-09-261-7/+7
|
* [scanner] Mark enum members as private in transformerJohan Dahlin2010-09-261-8/+2
| | | | | | | Remove enum members which follows /* <private> */ comments inside the transformer instead of the sourcescanner itself. Fixes a crash when creating the gir for GstBase.
* [scanner] Support private/public directivesJohan Dahlin2010-09-201-3/+17
| | | | Fixes https://bugzilla.gnome.org/show_bug.cgi?id=594125
* [sourcescanner] Rewrite linemarks parserJohan Dahlin2010-09-191-0/+1
| | | | | Rewrite the pre-processor linemark parser so we end up with accurate filenames and linenumbers.
* [sourcescanner] Support for line numbers on SymbolAlan Knowles2010-05-251-52/+52
| | | | | Add line numbers to symbols, which can be useful in later stages of the scanner.
* __extension__ can be put in front of expressionsDamien Lespiau2009-12-311-0/+1
| | | | | | | | | | | | glib uses __extension__ in macros dealing with 64 bits integer such as GUINT64_SWAP_LE_BE(). To quote the GCC manual: `-pedantic' and other options cause warnings for many GNU C extensions. You can prevent such warnings within one expression by writing `__extension__' before the expression. https://bugzilla.gnome.org/show_bug.cgi?id=605779
* scanner: more verbose parser error messagesStefan Kost2009-12-051-2/+3
| | | | | Keep track of the current line (the first 2000 chars of it) and include that in syntax error messages. Also print that failed token in the error message.
* Bug 555964 - Parse floating-point #definesColin Walters2009-02-251-2/+5
| | | | | | Previously we just supported int and string, add double to this. Technically we should probably differentiate between float and double, but it's not likely to be very useful in practice to do so.
* Disable a UTF-8 warning per defaultJohan Dahlin2009-02-201-0/+2
|
* Misc warning fixesDan Winship2009-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | * giscanner/scannerparser.y: Fix the "Ignoring non-UTF-8 constant string" error to print the right value. * tests/scanner/annotation.c (backslash_parsing_tester) (backslash_parsing_tester_2): make these non-static to avoid a warning. (annotation_object_string_out) (annotation_string_zero_terminated): fix return values * tests/scanner/annotation.h (annotation_object_with_voidp): prototype this * tests/scanner/gtkfrob.c: * tests/scanner/gtkfrob.h (gtk_frob_language_manager_get_default): fix prototype. (s/()/(void)/). * tools/compiler.c (format_output): fix signed/unsigned warning. Output a prototype for register_typelib() to avoid warnings later. svn path=/trunk/; revision=1071
* Bug 563591 – Flags not recognized when there is no introspection dataJohan Dahlin2009-01-121-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | 2009-01-12 Johan Dahlin <jdahlin@async.com.br> Bug 563591 – Flags not recognized when there is no introspection data * giscanner/ast.py: * giscanner/girwriter.py: * giscanner/giscannermodule.c (type_get_is_bitfield): * giscanner/glibast.py: * giscanner/glibtransformer.py: * giscanner/scannerparser.y: * giscanner/sourcescanner.c (gi_source_type_copy): * giscanner/sourcescanner.h: * giscanner/sourcescanner.py: * giscanner/transformer.py: * tests/scanner/foo-1.0-expected.gir: * tests/scanner/foo-1.0-expected.tgir: * tests/scanner/foo.h: Large parts of this patch was done by Jürg Billeter. svn path=/trunk/; revision=1025
* Bug 557786 - support fixed size arraysColin Walters2008-10-251-6/+6
| | | | svn path=/trunk/; revision=814
* Check against division by zero for the modula operator. This fixes headerJohan Dahlin2008-10-241-1/+3
| | | | | | | | | | | | 2008-10-24 Johan Dahlin <johan@gnome.org> * giscanner/scannerparser.y: Check against division by zero for the modula operator. This fixes header parsing of OSX system headers included by libsoup. svn path=/trunk/; revision=804
* Bug 556543 – reduce compiler warningsTommi Komulainen2008-10-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi> Bug 556543 – reduce compiler warnings * girepository/ginfo.c: * girepository/girepository.c (register_internal, count_interfaces, find_interface, find_namespace_version, parse_version, g_irepository_require): * girepository/girmodule.c (g_ir_module_build_typelib): * girepository/girnode.c (init_stats, dump_stats, _g_irnode_init_stats, _g_irnode_dump_stats, g_ir_node_can_have_member): * girepository/girparser.c (firstpass_end_element_handler, locate_gir, parse_basic, parse_type_internal, resolve_aliases, start_alias, start_type, end_type_top, parse_include, cleanup, post_filter): * girepository/gtypelib.c (validate_function_blob, validate_enum_blob): * giscanner/giscannermodule.c (directive_get_options, type_get_child_list): * giscanner/scannerlexer.l (parse_gtkdoc): * giscanner/scannerparser.y (ctype_free): * giscanner/sourcescanner.c: * giscanner/sourcescanner.h (gi_source_scanner_parse_macros): * tests/types/gitesttypes.c: * tools/compiler.c (main): * tools/generate.c (write_repository): Remove unused variables and code, add missing includes, declarations and case statements. svn path=/trunk/; revision=730
* ignore non-UTF-8 string constantsJohan Bilien2008-10-111-0/+185
| | | | | | | | | | | | | | | | | | | | | | 2008-10-11 Johan Bilien <jobi@litl.com> * giscanner/scannerparser.y: ignore non-UTF-8 string constants 2008-10-11 Johan Bilien <jobi@litl.com> Bug 552347: Parse #defines constants * girepository/gtypelib.c: update the list of value_size with recently defined type tags * giscanner/scannerparser.y: brought back parsing of #defined, as present in older version * giscanner/giscannermodule.c: bind gi_source_scanner_append_filename * giscanner/girwriter.py: write out constant tags in the gir * giscanner/sourcescanner.py: add accessor for const_string * giscanner/transformer.py, giscanner/glibtransformer.py: handle constant svn path=/trunk/; revision=673
* Bug 555712: Struct and union issuesAndreas Rottmann2008-10-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | 2008-10-09 Andreas Rottmann <a.rottmann@gmx.at> Bug 555712: Struct and union issues * giscanner/scannerparser.y (struct_declarator): Use information provided about the bit width of a field. * giscanner/transformer.py (Transformer._create_member): Pass the symbol's const_int member to the created field (it represents the bit width). * giscanner/girwriter.py (GIRWriter._write_field): Output 'bits' field attribute, if present. * giscanner/ast.py (Field): Add 'bits' member, specifying the width in bits of the field (only relevant for bitfields). * tests/*: Updated. * giscanner/transformer.py (Transformer._create_typedef_struct) (Transformer._create_typedef_union): Add calls to _create_struct() and _create_union(), respectively. This causes the scanner to generate output for fields of struct and union typedefs. * tests/*: Updated. svn path=/trunk/; revision=667
* Bug 552370: unsigned not scanned properlyJürg Billeter2008-10-111-1/+9
| | | | | | | | | | | | | | 2008-10-11 Jürg Billeter <j@bitron.ch> Bug 552370: unsigned not scanned properly * giscanner/scannerparser.y: combine basic types such as unsigned int and long long when scanning * tests/scanner/foo-expected.gir: * tests/scanner/foo.c: (foo_test_unsigned): * tests/scanner/foo.h: test that svn path=/trunk/; revision=666
* Merge branch 'bug552393-varargs'Colin Walters2008-10-021-9/+7
| | | | svn path=/trunk/; revision=643
* Parse GCC extensions in the parser instead of just undeffing them in theJohan Dahlin2008-08-311-3/+7
| | | | | | | | | | | | | | 2008-08-31 Johan Dahlin <johan@gnome.org> * giscanner/scannerlexer.l: * giscanner/scannerparser.y: * giscanner/sourcescanner.h: * giscanner/sourcescanner.py: Parse GCC extensions in the parser instead of just undeffing them in the pre-processor. svn path=/trunk/; revision=553
* Add a new source type enum for member. Use __repr__ for improved debuggingJohan Dahlin2008-05-311-11/+13
| | | | | | | | | | | | | | | | | | | 2008-05-31 Johan Dahlin <jdahlin@async.com.br> * giscanner/scannerparser.y: * giscanner/sourcescanner.h: * giscanner/sourcescanner.py: Add a new source type enum for member. Use __repr__ for improved debugging * giscanner/girparser.py: Ignore some more * giscanner/transformer.py: Improve parsing of struct members. * tests/parser/foo-object.h: Add a new testcase svn path=/trunk/; revision=281
* Move the scanner to a separate library.Johan Dahlin2008-03-251-0/+1268
2008-03-25 Johan Dahlin <johan@gnome.org> * Makefile.am: * configure.ac: * giscanner/Makefile.am: * giscanner/sourcescanner.c: * giscanner/sourcescanner.h: * tools/Makefile.am: * tools/grealpath.h: * tools/sourcescanner.c: * tools/sourcescanner.h: Move the scanner to a separate library. svn path=/trunk/; revision=164