Commit Graph

174 Commits

Author SHA1 Message Date
Daniel Kolesa dbf48c0ecc eolian: remove the remaining superfluous database_ functions 2014-08-21 09:26:05 +01:00
Daniel Kolesa 97d9bf37fa eolian: first batch of database_ functions removal (simplifies code) 2014-08-21 09:26:05 +01:00
Daniel Kolesa 913e0f09fa eolian: get rid of the data hash in Eolian_Function 2014-08-21 09:26:05 +01:00
Daniel Kolesa 24f618947e eolian: don't need this one 2014-08-21 09:26:05 +01:00
Daniel Kolesa 1688749ce9 eolian: add support for opaque struct types (+ tests) 2014-08-21 09:26:05 +01:00
Daniel Kolesa ad3dbe834b eolian: API refactoring
Remove eolian_implement_information_get. Also, fix some nasty lookup problems.
2014-08-21 09:26:04 +01:00
Daniel Kolesa ffbf149da1 eolian: new API: eolian_class_event_scope_get 2014-08-21 09:26:04 +01:00
Daniel Kolesa 18c2b5082e eolian: allow usage of stack Eina_Value in expr API 2014-08-21 09:26:04 +01:00
Daniel Kolesa abca650617 eolian: new APIs
This adds eolian_show_enum, eolian_show_global, eolian_show_constant.
2014-08-21 09:26:04 +01:00
Daniel Kolesa d2205e58f8 eolian: order fields in structs and enums properly
I don't know what I was thinking, struct and enum fields need to be ordered
so now we keep a separate list around containing the field names in correct order.
2014-08-21 09:26:04 +01:00
Daniel Kolesa be68f9e1fa eolian: initial parsing code and API declarations for enums 2014-08-21 09:26:04 +01:00
Daniel Kolesa 65332eb3ca eolian: var parsing (global and constant)
This makes the API effectively functional. Also, I added new API
eolian_variable_is_extern to match structs and typedefs.
2014-08-21 09:26:04 +01:00
Daniel Kolesa 70bf1eac24 eolian: add infrastructure for globals and constants
Nothing parses yet, and no API is exposed. Also, move the remaining instances of file
inside of existing structures to Eolian_Object and parse basename only once.
2014-08-21 09:26:04 +01:00
Daniel Kolesa 8c1b9ed3e2 eolian: initial API for expression evaluation
This commit also does several side (related) changes. Particularly, it updates
the Eolian C generator to use the new API, it adds missing expr types (null, char)
and masks, updates the API dealing with default return values to use expressions
instead of strings and does several fixes (mainly in lexer) around the place.
It also disallows single quoted strings as those are reserved for characters.
2014-08-21 09:26:03 +01:00
Daniel Kolesa 90e17acd15 eolian: initial eval function with Eina_Value return 2014-08-21 09:26:03 +01:00
Daniel Kolesa d7ca6dc1c3 eolian: initial support for expression evaluation
There are now functions that let you evaluate Eolian_Expression. They're not exposed
yet. Further improvements will come as well as public API.
2014-08-21 09:26:03 +01:00
Daniel Kolesa 436a37f0b9 eolian: initial support for expression parsing 2014-08-21 09:26:03 +01:00
Daniel Kolesa e3192796b6 eolian: actually fill in the line/column info in the handles 2014-08-21 09:26:03 +01:00
Daniel Kolesa 2aa4cbc89c eolian: provide line info structure in each eolian handle 2014-08-21 09:26:03 +01:00
Daniel Kolesa 0e4860f215 eolian: add support for referencing classes as types
For this purpose, several other changes were made. There can now only be 1 class per file
and the class name has to match the file name. Also, I replaced the list of classes with
a hash, allowing for fast indexing (crucial for parser performance - otherwise it was
very slow).

This also adds a new API, eolian_type_class_get.
2014-08-21 09:26:02 +01:00
Daniel Kolesa a5ad792780 eolian: add support for class functions 2014-07-24 12:05:12 +01:00
Daniel Kolesa f487d44011 eolian: structs and aliases now contain line/column info for better error messages 2014-07-22 14:48:08 +01:00
Daniel Kolesa 89ca97aceb eolian: new API: eolian_type_structs/aliases_get_by_file 2014-07-22 13:14:44 +01:00
Daniel Kolesa ccf157aa57 eolian: prevent freeing of full named structures that are inside of typedefs and fix a memory leak 2014-07-22 10:39:54 +01:00
Daniel Kolesa 058a3c314c eolian: rename _types to _aliases 2014-07-21 16:58:12 +01:00
Daniel Kolesa e797e40478 eolian: remove Eolian_Typedef, use Eolian_Type instead; allow eolian_type_base_type_get on aliases 2014-07-21 16:53:25 +01:00
Daniel Kolesa 460cfd9e34 eolian: type_struct_description, type_struct_file -> type_description, type_file 2014-07-21 14:39:14 +01:00
Daniel Kolesa 7117aad879 eolian: new APIs: eolian_type_full_name_get, eolian_type_naespaces_list_get 2014-07-21 14:27:23 +01:00
Daniel Kolesa 6f9c8779c0 eolian: initial code and struct layout for revamped alias API 2014-07-21 14:10:42 +01:00
Daniel Kolesa c4fd68f08a eolian: add API to retrieve filename for each typedef and struct 2014-07-21 12:26:44 +01:00
Daniel Kolesa 0d0f6e3743 eolian: support for extern structs and typedefs (including API) 2014-07-15 15:33:22 +01:00
Daniel Kolesa 5d4cc031f9 eolian: s/dflt/default/g 2014-07-11 14:30:22 +01:00
Daniel Kolesa 35ada5afff eolian: update print code (it made some obsolete assumptions before) 2014-07-11 12:22:36 +01:00
Daniel Kolesa 883c4ca7df eolian: events now use Eolian_Type* instead of stringshare 2014-07-11 11:47:37 +01:00
Daniel Kolesa 239e7524dc eolian: refactoring: get rid of Eo_Implement_Def 2014-07-10 15:23:06 +01:00
Daniel Kolesa 7b9438e76e eolian: refactoring: remove Eo_Type_Def 2014-07-10 15:10:24 +01:00
Daniel Kolesa 7cff1fda3e eolian: refactoring: refactor eolian_database.h 2014-07-10 14:30:34 +01:00
Daniel Kolesa 441455259e eolian: refactoring: more consistent naming 2014-07-10 14:19:06 +01:00
Daniel Kolesa 1293dce967 eolian: API refactoring 2014-07-10 14:04:13 +01:00
Daniel Kolesa 1772ab8a1c eolian: separate database API and internals into different source files 2014-07-10 13:13:46 +01:00
Daniel Kolesa 37bc20298c eolian: refactoring: split up eolian_database into individual files 2014-07-10 12:15:29 +01:00
Daniel Kolesa 580aea04cd eolian: refactoring step six
Move Eolian_Function as well, plus fix const correctness of several API funcs.
2014-07-09 20:59:31 +01:00
Daniel Kolesa accdd50f50 eolian: refactoring step five
Move from all instances of Eolian_Type to Eolian_Type*.
2014-07-09 17:18:02 +01:00
Daniel Kolesa 1a4f87d365 eolian: refactoring step four
Move from all isntances of Eolian_Function_Parameter to Eolian_Function_Parameter* plus const fixes.
2014-07-09 17:01:19 +01:00
Daniel Kolesa c9119b0c88 eolian: refactoring step three
Move from all instances of Eolian_Event and Eolian_Implement to Eolian_Event* and Eolian_Implement*.
2014-07-09 16:45:58 +01:00
Daniel Kolesa 96eaaaf074 eolian: refactoring step two
Move from all instances of Eolian_Class to Eolian_Class*.
2014-07-09 16:33:19 +01:00
Daniel Kolesa 60bf9fcaef eolian: reduce code duplication 2014-07-09 13:26:20 +01:00
Daniel Kolesa 6bd0e0ab7f eolian: better struct support including an API for by-name lookup 2014-07-08 16:42:33 +01:00
Daniel Kolesa 5168297fdb eolian: new API: eolian_system_directory_scan, use it 2014-07-07 16:48:54 +01:00
Daniel Kolesa 7b54a0101c eolian: new type API
This new API supports function pointer types, multiple type subtypes, const attribute without parsing
the name string, own attribute for any partial type and more. This commit also updates the C and C++
generators so that they compile and generate correct code.

@feature
2014-06-30 17:20:39 +01:00
Daniel Kolesa 74d0cbf29b eolian: allow multiple subtypes by reorganizing the type structure - preparation for new API 2014-06-30 17:20:39 +01:00
Daniel Zaoui 8e4700ce65 Eolian: add support of namespaces.
It is now possible to define a class in a .eo file as e.g:
Elm::Widgets::Button.
Elm and Widgets will be the namespaces of the class Button.

@feature
2014-05-26 13:56:06 +03:00
Daniel Zaoui 62082548bc Eolian: modify API to allow future scalability
Until now, the functions giving access to class information were taking
the class name as parameter.
Except the fact that we needed to search into a hash table for the internal
class structure, no flexibility is possible.

This change consists in modifying most of the APIs using the class name
with a new Eolian_Class type and adapt the code of the C and C++
generators accordingly.
2014-05-26 13:56:06 +03:00
Daniel Zaoui e4444d2518 Eolian: add support for typedefs.
It includes parser updates, database fill and tests on basic and complex
types.

One can define types in this way:
type Evas_Coord: int; /* Simple type definition */
type List_Objects: Eina_List * <Eo *>;

@feature
2014-05-26 13:56:05 +03:00
Daniel Zaoui 64e947512a Eolian: Remove support of legacy into implement section.
It has been decided that this support is not needed.
2014-04-24 16:51:04 +03:00
Daniel Zaoui a046f34590 Eolian/Lexer: Fix coverity issues.
Fix CID 1203411
Fix CID 1203412
2014-04-18 09:21:35 +03:00
Daniel Zaoui 7aab226a81 Eolian/Lexer: support of complex types
Complex types are now supported in .eo files:
Eina_List * @own <Eo *>

The parser is in charge of creating a list of formatted basic types.
2014-04-17 15:15:17 +03:00
Daniel Zaoui 87776ff0fa Eolian: add support for functions scope.
This patch adds support for protected functions.

In the .eo file, the scope (public by default) has to be added before
the function name e.g:
protected foo ...

To access the protected APIs, #define (CLASS)_PROTECTED is needed e.g:
 #define ELM_BUTTON_PROTECTED
2014-04-10 05:55:16 +03:00
Daniel Zaoui 1d89978c5b Eolian: clean API.
defines used as keys for internal hash tables are now replaced by
functions giving access to the internal data.
2014-04-08 04:27:01 +03:00
Daniel Zaoui 0eb092d157 Eolian/Lexer: support data type for events. 2014-04-02 14:27:12 +03:00
Daniel Zaoui fd25b44cab Eolian: extend const attributes for parameters to 'set' properties.
When const is used for parameters into 'set' properties, the generator
doesn't prepend 'const'.
This fixes this bad behavior.
2014-03-27 15:19:22 +02:00
Daniel Zaoui c863154a79 Eolian: fix virtual pure support.
When a property needs be defined as virtual pure, its type could not be
given.
It means that, even it was explicit that e.g only the get property if
virtual pure, both (set and get) were considered as virtual pure.

@fix
2014-03-27 08:52:53 +02:00
Daniel Zaoui c203df0b5d Eolian: Support default return values from .eo file.
Now, it is possible to assign a default return value for a
method/property.
It will be used in case the function invocation makes issues, e.g eo_do
failing to find the function...
2014-03-16 08:37:23 +02:00
Daniel Zaoui 66e1cc29bc Eolian/Lexer: support of @own tag on parameter and return values.
This tag indicates that the ownership of the parameter/return
value changes.
It is needed by generators (C++/LUA...) to determine if it has to be
freed or not, if it can be used as is or need to be copied...
2014-03-14 13:21:51 +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 87f661e08e Eolian: support non null parameters.
The generation is only needed in legacy headers.
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 748a01c47f Eolian/Library: add log domain and NULL checks 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 4d7e908e49 Eolian/Lexer: support class::constructor/destructor 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 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 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