Commit Graph

439 Commits

Author SHA1 Message Date
Daniel Zaoui 0d6fadcab9 Eolian/Generator: fix for virtual pure implementations 2014-03-11 15:20:54 +02:00
Yossi Kantor b070981f8f Eolian: Support of unsigned short as int in va_arg 2014-03-11 07:37:47 +02:00
Daniel Zaoui d96c429179 Eolian/Generator: support NULL pointers for return values.
When an Eo operation returns a value, this one is stored in the last
parameter as an out parameter.
In case the caller doesn't set a pointer there, the storing will be done
in a NULL pointer and will bring to a segfault.

The generator has been modified to handle this case. Now, if the ret
pointer is NULL, the value will not be returned.
2014-03-10 15:07:05 +02:00
Daniel Zaoui 4e33fd16e2 Eolian: add support of eo_prefix and data.
You can add in the .eo file the eo_prefix:... and data:... in case
you want to override respectively the Eo prefix and the data type.
If "data: null" is used, no data type will be added.
2014-03-10 15:07:05 +02:00
Daniel Zaoui a04e80e7f6 Eolian/Generator: fix for legacy function name overriding.
When legacy is specified in the .eo file, the generator was adding the
property/method name after the legacy name.
So if you have 'legacy evas_object_textblock_clear_all' for clear method,
it was adding the function evas_object_textblock_clear_all_clear.
2014-03-10 13:28:03 +02:00
Daniel Zaoui 4be9526cc2 Eolian/Generator: more fixes related to stars to add to params. 2014-03-09 13:19:30 +02:00
Daniel Zaoui a78f779486 Eolian: Fixes into generated files.
- Added Doxygen description to parameters and return
- Added default description for parameters
- Return type needs to be after all the other parameters
- Better handling of stars for pointers: try to figure if a space is
needed between the type and the variable (e.g int *a / int a)
2014-03-07 17:42:41 +02:00
Daniel Zaoui bb8af681f9 Eolian: Coverity fixes 2014-03-07 17:42:41 +02:00
Tom Hacohen 426e95b214 Eolian gen: Have a more useful error message when failing to write file. 2014-03-07 12:01:52 +00:00
Daniel Zaoui 7aebf671bf Eolian/Generator: Switch set/get functions generation.
We want to generate first set properties and then get properties to be
in accordance with the current op ids order.
2014-03-06 15:12:51 +02:00
Daniel Zaoui 232a3cf5fc Eolian/Generator: Fix comments generation in headers.
Trailing whitespaces were added in description empty lines.
2014-03-06 15:12:51 +02:00
Daniel Zaoui fe682d9760 Eolian: Valgrind fixes 2014-03-03 18:14:14 +02:00
Daniel Zaoui 49822ec28d Eolian: remove Ecore_File dependency 2014-03-03 18:14:14 +02:00
Daniel Zaoui e8ee7ae24b Eolian: fix warnings.
Don't want Stefan to be angry ;-)
2014-03-03 14:28:30 +02:00
Yossi Kantor 1287177ac2 Eolian: New features/bugs fixes
1) Include files now have include guards
  2) --gh option generates legacy header with --legacy flag and eo header
  without --legacy flag
  3) EOLIAN keyword is introduced to mark functions used by generated
  file.
  4) * for comments when comment text is empty
2014-03-03 14:09:57 +02:00
Yossi Kantor 67dd5ef497 Eolian: New generation feature tested and bugs fixed
1) Underscore for static global names
  2) Escape special characters for in-code descriptions
  3) Proper spaces for generated lines
2014-03-03 14:09:57 +02:00
Daniel Zaoui 87f661e08e Eolian: support non null parameters.
The generation is only needed in legacy headers.
2014-03-03 14:09:57 +02:00
Daniel Zaoui 210051ebb3 Eolian/Generator: fix data type for implement function 2014-03-03 14:09:57 +02:00
Daniel Zaoui 10d7bffc4a Eolian: support warn_unused variables. 2014-03-03 14:09:56 +02:00
Daniel Zaoui 2db3cdb5e3 Eolian: Valgrind cleaning 2014-03-03 14:09:56 +02:00
Daniel Zaoui 21533a0079 Eolian/Generator: errors handling improvement.
Errors occuring during generation are now propagated to the main (i.e
exit code).
Logs have been ported to EINA_LOG instead of printf.
2014-03-03 14:09:56 +02:00
Daniel Zaoui baaf92c93a Eolian/Generator: implementation prototype change
Since we know the type of the private data given as parameter of the
implemented function, we can set it instead of void *.
2014-03-03 14:09:56 +02:00
Daniel Zaoui 60919ecbe6 Eolian/Generator: improve command line arguments and logging.
Now --gh/--gc don't require an additional argument.
If eolian_gen is called with --gc and some file.eo, the tool will
generate file.eo.c.
You can force another filename by using the -o with an argument.

Moreover, logging has been added to the generator.
2014-03-03 14:09:56 +02:00
Yossi Kantor 521701ff70 Eolian: naming convention for implemented functions
The format is now _<current_class>_<inherited_class>_function_name.
2014-03-03 14:09:56 +02:00
Daniel Zaoui 02f4c112ca Eolian/Generator: add private data to the prototypes of implementations 2014-03-03 14:09:56 +02:00
Yossi Kantor c7beca12ec Eolian: Class type and class constructor/destructor generation added 2014-03-03 14:09:56 +02:00
Daniel Zaoui 920c035c57 Eolian: Support of virtual pure functions.
Virtual pure can be defined in Eolian format by adding in the section
implements virtual::class_name::func_name[::func_type].
2014-03-03 14:09:55 +02:00
Daniel Zaoui f7dce9c8c9 Eolian/Generator: update options and return value from main.
-v is used instead of -V
returns 1 when an error occurred
useless print removed when scanning include directories
2014-03-03 14:09:55 +02:00
Daniel Zaoui 5ae7cc962f Eolian: Format changes
- Support keys/values for properties instead of params
- Direction for parameters syntax changed from in to @in...
- obj:const changed to const in .eo
2014-03-03 14:09:55 +02:00
Daniel Zaoui a8661af73e Eolian: update .gitignore 2014-03-03 14:09:55 +02:00
Daniel Zaoui 61b180448a Eolian/Generator: improve the files management.
Now, the .eo file given as parameter doesn't have to be into the given
include paths.
2014-03-03 14:09:55 +02:00
Daniel Zaoui 9add4c695c Eolian: remove --class option.
Now, the .eo file needs to be supplied instead of the class.
2014-03-03 14:09:54 +02:00
Yossi Kantor 17abdbdd43 Eolian: Code review fixes
1) API defined under EFL_BETA_API_SUPPORT
2) Init counters for init and shutdown
3) void for no-parameters functions
2014-03-03 14:09:54 +02:00
Daniel Zaoui 7a114b18af Eolian/Generator: oups, didn't mean to push that. 2014-03-03 14:09:54 +02:00
Daniel Zaoui 8de58b9757 Eolian/Lexer: rename signals to events. 2014-03-03 14:09:54 +02:00
Daniel Zaoui a934780714 Eolian-generator: fix crash during generation
It happens when no description is supplied for an event.
2014-03-03 14:09:54 +02:00
Daniel Zaoui ab8d877150 Eolian/Generator: support legacy as option.
For the moment, the option works for C files. Have to add support for H
files.
2014-03-03 14:09:54 +02:00
Daniel Zaoui 327202ef37 Eolian/Generator: port options to getopt
Even if we want to remove the appending options, we still support them.
We will remove them later.
2014-03-03 14:09:54 +02:00
Daniel Zaoui 5dea8ee0a8 Eolian: first import.
Imported by Tom, from the eolian repo which was written by:
Daniel Zaoui <daniel.zaoui@samsung.com>
Yakov Goldberg <yakov.g@samsung.com>
Yossi Kantor <yossi.kantor@samsung.com>
Savio Sena <savio@expertisesolutions.com.br>
Jérémy Zurcher <jeremy@asynk.ch>

Signed-off-by: Tom Hacohen <tom@stosb.com>
2014-03-03 14:09:53 +02:00