Commit Graph

608 Commits

Author SHA1 Message Date
Daniel Kolesa 423629f817 eolian: get rid of the PARSE_SECTION macro nonsense 2014-11-21 13:59:42 +00:00
Daniel Kolesa 6448803ab0 eolian: forgot to add prototype to header 2014-11-20 17:13:12 +00:00
Daniel Kolesa d26152391f eolian: add support for @optional ctor tag
This implements task T1804.
@feature
2014-11-20 15:21:55 +00:00
Daniel Zaoui af513b6af3 Eolian: add support for property descriptions.
For properties, set and get descriptions were supported but common
comment was not.
2014-10-19 13:25:06 +03:00
Daniel Kolesa df0b8e3d2f eolian: free a buffer properly (fixes CID 1243233) 2014-10-03 09:26:27 +01:00
Daniel Kolesa a2bde0bf96 eolian: new API: eolian_class_c_get_function_name_get
This allows bindings to easily retrieve name of the C function used to
retrieve the Eo_Class. Also, update the Lua Eolian bindings and generator.
2014-10-02 11:00:06 +01:00
Daniel Kolesa 7cbac89ec3 eolian: fix a nasty segfault (forgot to update some old code during refactoring) 2014-10-01 14:34:33 +01:00
Daniel Kolesa 8631212e45 eolian: remove the need to pass prefix to eolian_function_full_c_name_get 2014-09-25 15:37:18 +01:00
Daniel Kolesa 13a9650491 eolian: properly replace commas in event_c_name_get and cleanup generator 2014-09-25 15:09:36 +01:00
Daniel Kolesa a1552fe6a9 eolian: new API: eolian_event_c_name_get 2014-09-25 14:58:53 +01:00
Mike Blumenkrantz 5375e154fe fix config.h inclusion across the tree 2014-09-23 15:56:46 -04:00
Daniel Kolesa 99c56369f2 eolian: stringshare del note in 2 more functions 2014-09-22 13:19:50 +01:00
Daniel Kolesa 4ffc6d92c0 eolian: update docs 2014-09-22 13:16:57 +01:00
Daniel Kolesa 0be3aefdc7 eolian: remove some unused funcs 2014-09-22 12:47:30 +01:00
Stefan Schmidt eebeca2900 docs/eolian: Add main landing page for Eolian documentation 2014-09-19 15:27:33 +02:00
Daniel Kolesa bcff50fb72 eolian: initialize property type correctly 2014-09-16 17:12:52 +03:00
Kai Huuhko d0ee1bd142 Eolian: Fix a c&p mistake in doc 2014-09-15 14:38:12 +03:00
Kai Huuhko 09d6592260 Eolian: Fix a few warnings
"function declaration isn't a prototype"

   void was forgotten from empty params list
2014-09-15 14:34:33 +03:00
Savio Sena 2d39b359fb eolian: Added eolian_function_is_constructor().
This patch adds a list of strings called 'ctor_of' to
_Eolian_Function. This list will contain all classes in which this
function is a constructing function.

ctor_of is filled in two moments:

* When filling the constructors of a class, class->full_name is inserted
  in the 'ctor_of' of each constructor's function.

* When filling the implements of a class, if the function is a
  constructor of its superclass it also becomes a constructor of the
  current class, so class->full_name is also inserted in the 'ctor_of'
  of each implement's function.

eolian_function_is_constructor gets a func and klass arguments. It goes
through ctor_of of func and returns EINA_TRUE if klass->full_name is
found, otherwise it returns EINA_FALSE.
2014-09-12 16:51:37 -03:00
Daniel Kolesa 3d8069f226 eolian: remove str_items from temps 2014-09-12 15:04:18 +01:00
Daniel Kolesa 87559458f2 eolian: get rid of a list 2014-09-12 15:01:10 +01:00
Daniel Kolesa f8cef784a8 eolian: less messy initialization checks 2014-09-12 14:20:52 +01:00
Daniel Kolesa a1646ff61d eolian: remove eo_definitions 2014-09-12 13:42:53 +01:00
Daniel Kolesa dd6f167795 eolian: more temp cleanups 2014-09-12 13:35:48 +01:00
Daniel Kolesa 212d500016 eolian: remove some more temps 2014-09-12 13:30:24 +01:00
Daniel Kolesa 25d57a4b44 eolian: remove some unnecessary temps 2014-09-12 13:25:26 +01:00
Daniel Kolesa 6fc1b18e1b eolian: more helpful error reporting 2014-09-11 13:55:42 +01:00
Daniel Kolesa 44cecb6a87 eolian: simplify more fill code 2014-09-11 11:48:46 +01:00
Daniel Kolesa 2358e63d60 eolian: remove most of class fill 2014-09-11 11:29:54 +01:00
Daniel Kolesa 9915b0da55 eolian: remove more parts of fill 2014-09-11 11:21:04 +01:00
Daniel Kolesa d85a3f6015 eolian: cleanup class fill 2014-09-11 11:02:51 +01:00
Daniel Kolesa f55572d79e eolian: remove Eo_Class_Def (fill bits still remaining) 2014-09-11 10:50:48 +01:00
Daniel Kolesa 88327c1d9d eolian: remove leftover code 2014-09-11 10:37:41 +01:00
Daniel Kolesa 12ce49db01 eolian: remove Eo_Method_Def 2014-09-11 10:29:48 +01:00
Daniel Kolesa 2219c0329d eolian: remove Eo_Property_Def 2014-09-10 17:15:31 +01:00
Daniel Kolesa 588f2dd9db eolian: property cleanup 2014-09-10 16:46:34 +01:00
Daniel Kolesa 10843dc0e2 eolian: remove Eo_Ret_Def 2014-09-10 16:41:02 +01:00
Daniel Kolesa ffb8e79034 eolian: remove accessor structures 2014-09-10 15:53:38 +01:00
Daniel Kolesa faa24705c8 eolian: we can only have 2 accessors 2014-09-10 15:22:04 +01:00
Daniel Kolesa f86c2d4e5a eolian: remove accessor params feature
Temporarily replace it with @const_get and @const_set tags in values section.
2014-09-10 15:06:43 +01:00
Daniel Kolesa 9aff324457 eolian: remove Eo_Param_Def, reduce allocations, simplify code 2014-09-10 14:24:41 +01:00
Daniel Kolesa 7786b96359 eolian: builtin complex types
From now on, there are 5 builtin complex types, particularly accessor, array,
iterator, hash and list. All other types are simple - they can't have a complex
part. Also, the <> now binds to the type itself, not the pointer. More builtin
complex types will be added as needed.
2014-09-08 14:53:13 +01:00
Daniel Kolesa d74eb93580 eolian: remove bool returns from some cases that cannot fail 2014-09-05 16:30:56 +01:00
Daniel Kolesa b7c55642fa eolian: cleanup 2014-09-05 16:21:39 +01:00
Daniel Kolesa 7ba2dbe238 eolian: remove some ifs in database_fill 2014-09-05 16:19:56 +01:00
Daniel Kolesa 70469cb44d eolian: some minor refactoring 2014-09-05 16:18:47 +01:00
Daniel Kolesa 977d4fe1a6 eolian: better handling of @virtual implements
Now they're registered correctly. Also, add new API, eolian_implement_is_virtual.
Also, deal with get/set properly (when filling in additional implements)
2014-09-05 16:05:04 +01:00
Daniel Kolesa 00192bd15e eolian: update docs on implements 2014-09-05 12:01:37 +01:00
Daniel Kolesa dff8d56475 eolian: use implements only to retrieve functions list
This also changes the implements list so that it also includes virtual functions.
2014-09-05 11:54:29 +01:00
Daniel Kolesa 99b03d4f3c eolian: skip UTF-8 BOM if present 2014-09-05 10:04:11 +01:00
Daniel Kolesa 0c0d639693 eolian: cache function in implements where possible to get O(1) lookup 2014-09-04 15:15:38 +01:00
Daniel Kolesa 8d9bae1172 eolian: generate implements for every method/property 2014-09-04 15:03:00 +01:00
Daniel Kolesa e75ded5e3f eolian: prepare for implements list expansion
As the implements list will soon contain all methods and properties,
do some preparations. The Eolian library now fills in class field in
implements early on when the implement is local. The Eolian C generator
now checks for local implements and skips them (so that things don't break).
2014-09-04 15:03:00 +01:00
Daniel Kolesa e67b52c514 eolian: fix auto/empty parsing/fill and add tests 2014-09-04 11:07:00 +01:00
Daniel Kolesa 0d6b4fad8f eolian: wrong condition fix 2014-09-03 14:44:23 +01:00
Daniel Kolesa 5827486c3d eolian: APIs to check auto/empty on a function 2014-09-03 14:26:09 +01:00
Daniel Zaoui 12b0550301 Eolian/Parser: fix wrong type allocation.
fix CID 1234600
2014-09-03 11:28:05 +03:00
Daniel Kolesa 0998f2af5c eolian: new APIs for expression analysis
This adds a few new APIs to retrieve the type of an expression, operators
for binary and unary expressions, lhs/rhs for binary expressions, expr for
unary expressions and value for other expressions.
2014-09-02 13:33:04 +01:00
Daniel Kolesa 9ffe700aac eolian: simplify expr serialize and fix null/bool case 2014-09-02 13:07:16 +01:00
Daniel Kolesa 231b2f3044 eolian: enum validation fix 2014-09-02 12:39:58 +01:00
Daniel Kolesa b13bafabba eolian: support for default param values where applicable + API 2014-09-02 10:47:55 +01:00
Daniel Kolesa d2702a4fad eolian: remove @constructor syntax 2014-09-01 16:02:40 +01:00
Daniel Kolesa 46715c3574 eolian: move efl eo files over to the new ctor syntax 2014-09-01 15:53:35 +01:00
Daniel Kolesa 21530bd5d8 eolian: preliminary support for new constructors section 2014-09-01 15:35:50 +01:00
Daniel Kolesa 4785353baf eolian: APIs to check if an implement references get/set 2014-08-29 15:30:51 +01:00
Daniel Kolesa b05f738675 eolian: APIs to check for @empty/@auto on implements 2014-08-29 15:22:14 +01:00
Daniel Kolesa 42446e1461 eolian: remove the silly appending of .get/.set in implements 2014-08-29 15:06:48 +01:00
Daniel Kolesa 9f232da400 eolian: parsing for @auto and @empty 2014-08-29 14:33:56 +01:00
Daniel Kolesa 616b58dd39 eolian: prepare for more tags in implements 2014-08-29 14:14:21 +01:00
Daniel Kolesa 84a6b654f6 eolian: shouldn't have gotten in 2014-08-29 11:41:19 +01:00
Daniel Kolesa 3e5da03f7d eolian: update virtual to the new syntax (as per wiki) 2014-08-29 11:40:29 +01:00
Daniel Kolesa 6c7e5b0a86 eolian: require both set and get to be specified when whole property is in impls 2014-08-29 10:18:26 +01:00
Daniel Kolesa b69b90832f eolian: remove constructors section cruft 2014-08-27 15:43:47 +01:00
Carsten Haitzler 875bf96d19 eolian - fix parser with missing break in hanling open bracket
fixes CID 1232732
2014-08-27 11:32:17 +09:00
Daniel Kolesa 1bf49ea8e7 eolian: no need to expose _deplist_free 2014-08-26 15:12:09 +01:00
Daniel Kolesa 49e5d4ffb9 eolian: flatten dependencies of a file before parsing them (remove cycles) 2014-08-26 11:06:54 +01:00
Cedric BAIL 2889a6f4c5 eolian: if the if was not taken random value would end up in exp. 2014-08-25 15:25:58 +02:00
Daniel Kolesa 230758a858 eolian: do not free insides of field_list
After field_list was migrated from stringshare to struct,
I forgot to change this.
2014-08-24 14:22:42 +01:00
Daniel Kolesa b75014a024 eolian: refactor the struct/enum field APIs 2014-08-22 16:56:41 +01:00
Daniel Kolesa 894c9a42db eolian: field_names is now field_list (prepare for API changes) 2014-08-22 16:17:50 +01:00
Daniel Kolesa 19d8209266 eolian: clean up type generation + fix function pointers 2014-08-22 14:04:22 +01:00
Daniel Kolesa 4fa161fffa eolian: yet another validator fix (expression validation) 2014-08-22 13:54:24 +01:00
Daniel Kolesa 189bc4512d eolian: fix type generation for function pointers 2014-08-22 13:45:20 +01:00
Daniel Kolesa 8b6eadcb3c eolian: fix segfault in validator + fill in line info properly 2014-08-22 13:28:29 +01:00
Daniel Kolesa 8f7d325b30 eolian: mark function types as function types 2014-08-22 13:18:17 +01:00
Daniel Kolesa 26e1ec3e32 eolian: fully working database validation 2014-08-22 13:10:29 +01:00
Daniel Kolesa d043c84492 eolian: more validation code (alias/struct/enum/constant/global) 2014-08-22 11:17:31 +01:00
Jérémy Zurcher 68020daf19 Eolian: fix typo 2014-08-22 09:20:53 +02:00
Daniel Kolesa e99f7876a6 eolian: some initial validation traversal 2014-08-21 16:53:41 +01:00
Daniel Kolesa cdd4860520 eolian: turn db validation into separate API 2014-08-21 16:35:59 +01:00
Daniel Kolesa c1afa1b6b5 eolian: add entry point for database validation stage 2014-08-21 16:23:37 +01:00
Daniel Kolesa fce1e61ff5 eolian: fix shadow warnings 2014-08-21 09:26:06 +01:00
Daniel Kolesa 4103f3daaf eolian: NULL the hashes after shutdown 2014-08-21 09:26:05 +01:00
Daniel Kolesa 58a2025c25 eolian: new API: eolian_function_is_constructing 2014-08-21 09:26:05 +01:00
Daniel Kolesa 7372ac3ffb eolian: prevent potential on-error memory leaks 2014-08-21 09:26:05 +01:00
Daniel Kolesa ef380c56b6 eolian: support for setting a free function to values in eo files 2014-08-21 09:26:05 +01:00
Daniel Kolesa d788986fd8 eolian: reduce code duplication 2014-08-21 09:26:05 +01:00
Daniel Kolesa 452497eac5 eolian: remove a bunch of pointless stringshare refs + fix in lua 2014-08-21 09:26:05 +01:00
Daniel Kolesa 33c39282b1 eolian: support "eo: null;" for legacy only functions/properties 2014-08-21 09:26:05 +01:00
Daniel Kolesa e6954d143d eolian: drop Eina_Value
Because of Eina_Value being less than optimal in our usage, we're dropping it in Eolian.
This simplifies the code and makes it easier to bind to other languages, which
will aid new generators. Also, we're dropping long double support from eo files
and expressions as it causes an ABI breakage in gcc 4.4.
2014-08-21 09:26:05 +01:00
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 60f0450bac eolian: prevent potential memory leakage on error 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 93726c86a3 eolian: get rid of eolian_parameter_information_get 2014-08-21 09:26:04 +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 057e01d67f eolian: API refactoring
Start getting rid of the terrible _information_get APIs, starting with events.
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 a5964f0252 eolian: add comments containing original expressions to generated enum fields
This required a new API, eolian_expression_serialize.
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 732e3f417e eolian: new API: eolian_type_enum_legacy_prefix_set + generator changes
This change adds a new API to retrieve the legacy prefix for enum members
and also adds support for generating enums into the C generator. Besides that,
it prevents generation of entire struct contents when the .eo file declares
a named struct inside of a typedef - as the struct itself gets generated later on.
2014-08-21 09:26:04 +01:00
Daniel Kolesa 2e3887b994 eolian: struct/enum fixes and initial test for enums 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 cf8da3790e eolian: add missing pieces of minor infra for enum 2014-08-21 09:26:04 +01:00
Daniel Kolesa e2fb43b7b5 eolian: enum API implementation
This implements the previously declared APIs to manipulate enum types. Also,
it implements the appropriate lookups in expression evaluation so that you
can refer to constants and enums inside constant expressions.
2014-08-21 09:26:04 +01:00
Daniel Kolesa 75ee3b031d eolian: allow namespaces when referring to constants in exprs 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 d4031a21bf eolian: test for constants/globals
Also added API to retrieve value of a variable (forgot about that one)
and made it impossible to create extern constants (doesn't make sense)
as well as made it impossible to give extern globals values.
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 cc1988fddd eolian: expose new variable API 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 a57c729b10 eolian: consume private/protected modifier on events 2014-08-21 09:26:04 +01:00
Daniel Kolesa 1cb8318991 eolian: support for single-line doc comments 2014-08-21 09:26:04 +01:00
Daniel Kolesa 1be7656af6 eolian: expression mode for lexer
This way we can only lex expr related tokens (operators etc.) when actually
about to parse an expression. That allows stuff like nested complex types
without the lexer treating the endings as right shift.
2014-08-21 09:26:03 +01:00
Tom Hacohen a0c419aa4a Eolian parser: Allow tagging properties with @constructor.
Thanks to Quaker for the exact directions.
2014-08-21 09:26:03 +01:00
Daniel Kolesa d3aedb5506 eolian: consume the comment token in properties
This is to add syntax for later combined get/set property docs functionality.
2014-08-21 09:26:03 +01:00
Daniel Kolesa 459638c2b9 eolian: more consistent syntax
"legacy foo" is now "legacy: foo" and "return foo" is now "return: foo".
2014-08-21 09:26:03 +01:00
Daniel Kolesa 7ef5c78792 eolian: fix null serialization 2014-08-21 09:26:03 +01:00
Daniel Kolesa bcf5f1b1dd eolian: better doc 2014-08-21 09:26:03 +01:00
Daniel Kolesa 788386c86c eolian: eolian_type_name_get now returns the eo name, not c name
so instead of "unsigned int" you get "uint". This is important for handling of
expressions and cross-language interoperability. You can use c_type_get on the
base type to get the C name. Also, append the appropriate suffix to number literals
when calling eolian_expression_value_to_literal.
2014-08-21 09:26:03 +01:00
Daniel Kolesa eab668bb0f eolian: expression improvements
Character literals now allow escape sequences. Strings created by
eolian_expression_value_to_literal are now fully escaped.
2014-08-21 09:26:03 +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 96f360a7d1 eolian: lexing of multichar binary operators 2014-08-21 09:26:03 +01:00
Daniel Kolesa 62541ce484 eolian: rename public enum members to a namespaced form 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 bb24b60638 eolian: generate implicit typedef for each class
And use these typedefs instead of just Eo in API.
2014-08-21 09:26:03 +01:00
Daniel Kolesa 8d74261a30 eolian: fix a bug that caused wrong comparisons of class and file name
This also renames ecore_poll files to ecore_poller so that the class name matches.
2014-08-21 09:26:03 +01:00
Daniel Kolesa 5da69ddbf7 eolian: support for class type in c_type_get 2014-08-21 09:26:02 +01:00
Daniel Kolesa 6aa99c0026 eolian: better error information + fix tests
This provides better location info when failing to resolve EOLIAN_TYPE_CLASS.
Also fixes tests I forgot to push before.
2014-08-21 09:26:02 +01:00
Daniel Kolesa c88c0d9347 eolian: fix tests and fix class name comparison in parser
This fixes the Eolian testsuite as well as adds a better way to compare where a class
comes from, allowing us to guess EOLIAN_TYPE_CLASS correctly.
2014-08-21 09:26:02 +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 444b62c51c eolian: fix: remove unused function 2014-07-30 13:33:52 +01:00
Daniel Kolesa 5a603c00b6 eolian: remove irrelevant comments
This functionality was already done previously.
2014-07-29 10:05:06 +01:00
Daniel Kolesa 5cc18bfd5a eolian: fix: remove leftover keywords 2014-07-28 11:57:37 +01:00
Daniel Kolesa ae1ff34dd6 eolian: fix type parsing
I reorganized what's allowed and what is not a bit, particularly, strictened the
rules for named structs and loosened the rules for anonymous structs, and refined
them for void types. It should be all correct now.
2014-07-25 14:51:13 +01:00
Daniel Kolesa 5bdbf4dbb5 eolian: doc typo fix 2014-07-25 14:31:39 +01:00
Daniel Kolesa bb7f657f90 eolian: clarify documentation 2014-07-25 14:25:45 +01:00
Daniel Kolesa e2c51100c7 eolian: add test for class methods/properties
This also fixes a bug in the Eolian parser that handles class properties.
2014-07-24 14:02:46 +01:00
Daniel Kolesa 94404b403c eolian: parser support for constructor qualifier
This will be needed when the constructors {} section goes away.
2014-07-24 13:01:47 +01:00
Daniel Kolesa 214cfac378 eolian: protected ctors 2014-07-24 12:58:29 +01:00
Daniel Kolesa a5ad792780 eolian: add support for class functions 2014-07-24 12:05:12 +01:00
Daniel Kolesa a3182948ad eolian: use libgen.h basename 2014-07-23 19:37:03 +01:00
Daniel Kolesa 315d5de11d eolian: use just filename (not path) for eolian_class_get_by_file 2014-07-23 17:15:00 +01:00
Daniel Kolesa 572b7aa92f eolian: eolian_function_parameter_get -> eolian_function_parameter_get_by_name 2014-07-23 14:22:25 +01:00
Daniel Kolesa 88cc1167e9 eolian: eolian_parameters_get -> eolian_function_parameters_get 2014-07-23 14:17:19 +01:00
Daniel Kolesa fd0210f30e eolian: list_get -> get, find_by -> get_by 2014-07-23 14:13:21 +01:00
Daniel Kolesa e26be1aca6 eolian: fix NULL checks in APIs that return iterators + fix tests 2014-07-23 13:45:25 +01:00
Daniel Zaoui 0efeeaf1c0 Eolian: modify APIs to return iterators instead of lists.
The change affects the C and the C++ generators.
2014-07-23 13:45:25 +01:00
Daniel Kolesa a8c0504ce2 eolian: add comment parsing for typedefs 2014-07-23 10:57:23 +01:00
Daniel Kolesa 77ad5e3297 eolian: fix coverity defects
Fixes CID 1228630 and 1228631.
2014-07-23 00:48:27 +01:00
Daniel Kolesa d8e54e2636 eolian: use new syntax for const methods as per wiki 2014-07-22 17:13:24 +01:00
Daniel Kolesa ab8fe63afa eolian: use @protected syntax as per wiki 2014-07-22 16:35:54 +01:00
Daniel Kolesa 4f1f182a89 eolian: lexer line context push/pop/restore/clear 2014-07-22 15:44:23 +01:00
Daniel Kolesa cbd54f4de0 eolian: include file info in redef errors when different file 2014-07-22 15:01:09 +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 b0788a546b eolian: support for typedefs in c_type_get 2014-07-22 12:11:45 +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 71ae2f2c2e eolian: another leak fix 2014-07-22 10:22:21 +01:00
Daniel Kolesa c03a0a2a39 eolian: memory leak fix 2014-07-22 10:15:56 +01:00
Daniel Kolesa b81e05def5 eolian: new API: eolian_type_alias_find_by_name, remove the old APIs that take an alias name, update tests 2014-07-21 17:12:35 +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 6079270c96 eolian: database_type_to_str now respects namespaces (and thus the to-C-type conversion API does too) 2014-07-21 16:08:06 +01:00
Daniel Kolesa ac7f5d0f79 eolian: fill in full_name and namespaces properly, and allow parsing dots in type names 2014-07-21 15:17:59 +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 197034bfd7 eolian: type_struct_is_extern -> type_is_extern 2014-07-21 14:14:22 +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 d4a0e41724 eolian: typo fix 2014-07-21 12:28:25 +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 6caf41e288 eolian: only check redef on actual named structs 2014-07-21 11:47:35 +01:00
Daniel Kolesa 5d1cd61c92 eolian: put structs and typedefs right in the respective hashmaps without going through nodes 2014-07-21 11:42:05 +01:00
Daniel Kolesa 6f805a9998 eolian: check redefinitions in the parser instead (provides line info) 2014-07-21 11:34:14 +01:00
Daniel Kolesa 9262a82ed3 eolian: check for typedef and struct redefinitions 2014-07-21 11:22:49 +01:00
q66 9f0bcdf707 eolian: ouch... fix a major bug, *spanks self* 2014-07-19 13:00:44 +01:00
Daniel Kolesa fa3e433f6e eolian: disallow the data field in interfaces; it's always null 2014-07-18 17:29:35 +01:00
Daniel Kolesa 6c268d98e5 eolian: lexing of string literals (including support for escape sequences etc.) 2014-07-17 14:17:19 +01:00
Daniel Kolesa e9e38b553b eolian: lexing of number literals (integer and floating point, decimal and hex, no octal) 2014-07-17 13:07:39 +01:00
Daniel Kolesa 80165034ed eolian: preliminary number constant stuff in eo_lexer 2014-07-16 16:18:13 +01:00
Daniel Kolesa c636882158 eolian: remove TOK_EOF, replace with -1 2014-07-16 16:06:04 +01:00
Daniel Kolesa 226f417005 eolian: remove eo_lexer_get_until and allow just single-word value in the data: field of a class 2014-07-16 15:33:11 +01:00
Daniel Kolesa 9b2680ad6f eolian: simplify the lexer (remove custom ident chars) 2014-07-16 14:46:38 +01:00
Daniel Kolesa e2bab9ed2c eolian: parse events without get_ident 2014-07-16 14:43:40 +01:00
Daniel Kolesa 198a61c37d eolian: fix memory leak 2014-07-16 00:30:48 +01:00
Daniel Kolesa ae3eb2b942 eolian: make event type syntax consistent 2014-07-15 23:50:34 +01:00
Daniel Kolesa 8716112a43 eolian: warning fix 2014-07-15 20:00:59 +01:00
Daniel Kolesa d0e0576f0b eolian: parser cleanup - structs no longer have to lookahead, making our grammar effectively LL(1) 2014-07-15 17:06:47 +01:00
Daniel Kolesa 0d0f6e3743 eolian: support for extern structs and typedefs (including API) 2014-07-15 15:33:22 +01:00
Daniel Kolesa 5c3cc82bdd eolian: comment eo_lexer.h 2014-07-15 10:10:12 +01:00
Daniel Kolesa 831ade54fa eolian: also make time_t a builtin 2014-07-14 17:02:58 +01:00
Daniel Kolesa 3be0dce99d eolian: builtin types size, ssize, intptr, uintptr, ptrdiff 2014-07-14 16:51:38 +01:00
Daniel Kolesa f510b6de72 eolian: schar and uchar are now called byte and ubyte, char stays
Here, 'char' represents an actual character and is meant to be treated as so by generators.
The byte types represent a numerical value and should be treated numerically.
2014-07-14 16:25:26 +01:00
Daniel Kolesa 17a6bb122b eolian: add tests for struct types plus fix a double free and name storage on the way 2014-07-14 12:11:48 +01:00
Daniel Kolesa c9744596de eolian: builtin bool type, and change the eo files to use that 2014-07-11 14:40:49 +01:00
Daniel Kolesa 5d4cc031f9 eolian: s/dflt/default/g 2014-07-11 14:30:22 +01:00
Daniel Kolesa 888dc3b6fe eolian: remove eolian_show and replace it with variants for class/struct/typedef/all. 2014-07-11 13:10:04 +01:00
Daniel Kolesa 9e3417aad8 eolian: fix type print 2014-07-11 12:26:33 +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 a13d8a6020 eolian: fix a segfault 2014-07-11 12:02:02 +01:00
Daniel Kolesa 883c4ca7df eolian: events now use Eolian_Type* instead of stringshare 2014-07-11 11:47:37 +01:00
Daniel Kolesa a9171a89f9 eolian: remove parser dump for now (doesn't include all info, when it's needed again it can be re-added) 2014-07-11 11:33:26 +01:00
Daniel Kolesa d7ce4332fe eolian: separate database fill stuff from the parser 2014-07-11 11:31:48 +01:00
Daniel Kolesa 8bbd79badc eolian: split db fill func into multiple funcs 2014-07-11 10:57:28 +01:00
Daniel Kolesa 4b427d6c16 eolian: remove redundant enum 2014-07-10 15:40:58 +01:00
Daniel Kolesa 78bc58813e eolian: remove unused enum and field 2014-07-10 15:36:18 +01:00
Daniel Kolesa 144fd1e2ae eolian: refactoring: get rid of Eo_Event_Def 2014-07-10 15:31:01 +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 a03bef4734 eolian: get rid of Eo_Type_Def 2014-07-10 14:44:17 +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 2ababe8a89 eolian: const fixes 2014-07-10 11:06:20 +01:00
Daniel Kolesa a26546bc6b eolian: the entire API is now const correct 2014-07-09 21:31:03 +01:00
Daniel Kolesa 133607936d eolian: const correctness 2014-07-09 21:07:15 +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 ca82befa8a eolian: refactoring step one
Rename the public Eolian types to use a consistent naing scheme.
2014-07-09 16:33:19 +01:00
Daniel Kolesa 8f14930d68 eolian: function dump now uses the actual syntax 2014-07-09 13:49:21 +01:00
Daniel Kolesa 60bf9fcaef eolian: reduce code duplication 2014-07-09 13:26:20 +01:00
Daniel Kolesa 7b4f4af873 eolian: support for structs in eolian_show 2014-07-09 13:06:46 +01:00
Daniel Kolesa 3bffb5fa1d eolian: support for structs in eo_parser_dump 2014-07-09 13:01:53 +01:00
Daniel Kolesa 881a8754ab eolian: new API: eolian_type_struct_description_get 2014-07-09 12:48:16 +01:00
Daniel Kolesa 295f1f4847 eolian: new API: eolian_type_struct_field_description_get 2014-07-09 12:05:56 +01:00
Daniel Kolesa dda93f467e eolian: proper resource management for types/structs
Because types can have other types in each other, we need a stack of a sort to keep track of
the types for error handling. Doing it otherwise would result in potential resource leaks.
2014-07-09 11:18:21 +01:00
Daniel Kolesa cc387bd621 eolian: add EOLIAN_TYPE_REGULAR_STRUCT rather than including the struct keyword in name field 2014-07-09 10:49:52 +01:00
Daniel Kolesa 892c5cba5f eolian: fix coverity defects 2014-07-09 10:19:42 +01:00