Commit Graph

872 Commits

Author SHA1 Message Date
Daniel Kolesa ee8cdc5411 elua: group messages with the same contents together, generate grouped line info 2014-06-10 15:48:52 +01:00
Daniel Kolesa 7cf6a8abb0 elua: line information in the generated output 2014-06-10 15:48:52 +01:00
Daniel Kolesa a0b8f72ae9 elua: respect msgstr prefix and suffix in xgettext 2014-06-10 15:48:52 +01:00
Daniel Kolesa b638f4d034 elua: respect comment tags in the lexer 2014-06-10 15:48:52 +01:00
Daniel Kolesa b2af5ff97e elua: pass opts, flags around 2014-06-10 15:48:52 +01:00
Daniel Kolesa 0e5f9bc151 elua: change xgettext lexer to never include delimiters and also expand \n escape sequence in short strings to actual newline (no other escapes get this treatment) 2014-06-10 15:48:52 +01:00
Daniel Kolesa 297f9a821a elua: almost functional xgettext generator 2014-06-10 15:48:52 +01:00
Daniel Kolesa d8010702e8 elua: initial stuff for the xgettext generator, check existence of all input files beforehand in the app, and other fixes 2014-06-10 15:48:52 +01:00
Daniel Kolesa a98b916a74 elua: get_cmdline_from_argv cleanup + use _popen on windows 2014-06-10 15:48:52 +01:00
Daniel Kolesa 4311dc0439 elua: fclose before realpath 2014-06-10 15:48:52 +01:00
Daniel Kolesa 489b5fac11 elua: do not use fork in our "array popen" impl; instead serialize args in a platform specific way 2014-06-10 15:48:52 +01:00
Daniel Kolesa 6558d1ccc9 elua: reformat C source to EFL style 2014-06-10 15:48:52 +01:00
Daniel Kolesa 5f1e08bddf elua: remove prefix stripping from lualian 2014-06-10 15:48:52 +01:00
Daniel Kolesa 6614d02a69 elua: update lualian against latest eolian API 2014-06-10 15:48:52 +01:00
Daniel Kolesa 6896f2949e elua: xgettext parser: proper keyword parsing 2014-06-10 15:48:51 +01:00
Daniel Kolesa a47dc77a8a elua: xgettext parser argument parsing 2014-06-10 15:48:51 +01:00
Daniel Kolesa 812a601548 elua: extend the xgettext parser a bit 2014-06-10 15:48:51 +01:00
Daniel Kolesa 839ce0f651 elua: xgettext keyword fix 2014-06-10 15:48:51 +01:00
Daniel Kolesa b168a515e2 elua: sanitize keywords and extract info in xgettext (include default keywords for lua), dgettext and dngettext compatibility calls 2014-06-10 15:48:51 +01:00
Daniel Kolesa 00bec70b69 elua: initial work on parser part of the extractor 2014-06-10 15:48:51 +01:00
Daniel Kolesa 3f4fd784c2 elua: file search function 2014-06-10 15:48:51 +01:00
Daniel Kolesa 7c449a14e1 elua: make xgettext use excluded_files, do some re-mappings, and have a default search dir 2014-06-10 15:48:51 +01:00
Daniel Kolesa 02ef160621 evil: add fork, adjust elua to use that 2014-06-10 15:48:51 +01:00
Daniel Kolesa 9c42595225 elua: popenv fix (read proper stack items as args), getopt fix (fixed array append), xgettext: use cutil.popenv 2014-06-10 15:48:51 +01:00
Daniel Kolesa e9b555c57b elua: popenv function 2014-06-10 15:48:51 +01:00
Daniel Kolesa a04948c02f elua: fork_win cleanup 2014-06-10 15:48:51 +01:00
Daniel Kolesa 420f7a869a elua: include fork_win.c in compilation 2014-06-10 15:48:51 +01:00
Daniel Kolesa 88ca0dbf3f elua: custom non-shell popen implementation 2014-06-10 15:48:51 +01:00
Daniel Kolesa 30415f9261 elua: fork impl for windows 2014-06-10 15:48:51 +01:00
Daniel Kolesa fd6c1f6888 elua: comment is a valid token in xgettext 2014-06-10 15:48:51 +01:00
Daniel Kolesa 5b7f44ea5b elua: add build_args function to core cutil library, for building normalized args string in a platform independent way 2014-06-10 15:48:51 +01:00
Daniel Kolesa 9bb3667e2b elua: xgettext is again at least partially functional 2014-06-10 15:48:51 +01:00
Daniel Kolesa 139502dc76 elua: handle all xgettext args correctly 2014-06-10 15:48:51 +01:00
Daniel Kolesa b1bfd90d40 elua: xgettext progress, currently broken 2014-06-10 15:48:51 +01:00
Daniel Kolesa 708aaeeb12 elua: pass opts to callback 2014-06-10 15:48:51 +01:00
Daniel Kolesa 6d739a8746 elua: ngettext support 2014-06-10 15:48:51 +01:00
Daniel Kolesa 63ccaee7fd elua: ability to specify custom opts table for each desc in getopt 2014-06-10 15:48:51 +01:00
Daniel Kolesa bc2b6b503f elua: simplified getopt (allocates fewer tables) 2014-06-10 15:48:51 +01:00
Daniel Kolesa 01a4fd89d2 elua: do not include the : in arg[0] 2014-06-10 15:48:51 +01:00
Daniel Kolesa ab05d47d7c elua: free format buffers immediately 2014-06-10 15:48:51 +01:00
Daniel Kolesa e8b356858b elua: never pcall in format, instead keep track of the types properly 2014-06-10 15:48:51 +01:00
Daniel Kolesa ebbce82403 elua: perform conversion beforehand 2014-06-10 15:48:51 +01:00
Daniel Kolesa 654653bc4a elua: check types manually instead of pcall in one place for format 2014-06-10 15:48:51 +01:00
Daniel Kolesa 5eccfb29b7 elua: some more checking for no value 2014-06-10 15:48:51 +01:00
Daniel Kolesa 0c7b3e5d6b elua: format bug fix 2014-06-10 15:48:51 +01:00
Daniel Kolesa b304316b81 elua: better error handling for format 2014-06-10 15:48:51 +01:00
Daniel Kolesa 3da9de3d41 elua: use string buffer in all places for format plus extra optimizations 2014-06-10 15:48:50 +01:00
Daniel Kolesa a6e50fa9c7 elua: use custom string buffer impl for format (avoids multiple table allocs and calls to string.char) 2014-06-10 15:48:50 +01:00
Daniel Kolesa 8738ca957d elua: slight optimization of format func 2014-06-10 15:48:50 +01:00
Daniel Kolesa 006a49ddda elua: relatively slow but very powerful string formatter with support for positional and named format arguments, invoked via % 2014-06-10 15:48:50 +01:00
Daniel Kolesa e33efdb745 elua: xgettext: support for -X 2014-06-10 15:48:50 +01:00
Daniel Kolesa c0baa15b11 elua: insert input files always after opts 2014-06-10 15:48:50 +01:00
Daniel Kolesa d90bba655f elua: expand the input file lists for xgettext call (we want to leave out lua files) 2014-06-10 15:48:50 +01:00
Daniel Kolesa bebe011676 elua: use the new app loading system 2014-06-10 15:48:50 +01:00
Daniel Kolesa 544bf37c30 elua: a general system for application loading without having to specify explicit path 2014-06-10 15:48:50 +01:00
Daniel Kolesa 85367d35be elua: match file extensions in a case insensitive way 2014-06-10 15:48:50 +01:00
Daniel Kolesa 38ae60f744 elua: more checks 2014-06-10 15:48:50 +01:00
Daniel Kolesa 69a64dd620 elua: a bit more informative getopt plus better arg handling when calling to xgettext 2014-06-10 15:48:50 +01:00
Daniel Kolesa 344c1cbaf1 elua: more informative getopt 2014-06-10 15:48:50 +01:00
Daniel Kolesa 55b7973e56 elua: xgettext lexer enhancements 2014-06-10 15:48:50 +01:00
Daniel Kolesa 23c27f06c5 elua: simplified source 2014-06-10 15:48:50 +01:00
Daniel Kolesa b71231d93d elua: typo fix 2014-06-10 15:48:50 +01:00
Daniel Kolesa 341d8a9168 elua: typo fix 2014-06-10 15:48:50 +01:00
Daniel Kolesa dd8e3b433f elua: use an appropriately sized buffer 2014-06-10 15:48:50 +01:00
Daniel Kolesa 6220dd5968 elua: lexer for xgettext 2014-06-10 15:48:50 +01:00
Daniel Kolesa cbeaf5b58a elua: utility func to exec a process (without spawning a shell like os.execute) 2014-06-10 15:48:50 +01:00
Daniel Kolesa 58409c521a elua: trigger xgettext execution from xgettext.lua, which is executed by xgettext_wrapper 2014-06-10 15:48:50 +01:00
Daniel Kolesa 4dfec82877 elua: support the EFL_RUN_IN_TREE environment variable 2014-06-10 15:48:50 +01:00
Daniel Kolesa 57ebf0e02c elua: initial code for xgettext.lua, a xgettext variant that supports lua
will be used to handle i18n for lua files in EFL (because only gettext 0.18.3+ supports Lua) and it'll be usable standalone too, it will also be able of handling more things than lua support in xgettext does (e.g. concatenated string literals will be considered one string)
2014-06-10 15:48:50 +01:00
Daniel Kolesa 3fd4399c6f elua: allow description of positional arguments in help in getopt (using metavar field without short/long) 2014-06-10 15:48:50 +01:00
Daniel Kolesa c427742634 elua: support for omitting things from help 2014-06-10 15:48:50 +01:00
Daniel Kolesa 3c42301f00 elua: in/out fix 2014-06-10 15:48:50 +01:00
Daniel Kolesa 176e41020d elua: remove leftover 2014-06-10 15:48:50 +01:00
Daniel Kolesa 98192dd8c3 elua: we don't need to include func name in conversion funcs (they're all the same...), also print out the required conversion functions during gen 2014-06-10 15:48:50 +01:00
Daniel Kolesa 13f3c616d5 elua: pass ownership information to converters 2014-06-10 15:48:49 +01:00
Daniel Kolesa e90973e5cb elua: eolian fix (return nil instead of null in type_information_get), generate different names for type conversion funcs 2014-06-10 15:48:49 +01:00
Daniel Kolesa a0838343cb elua: lualian reorg 2014-06-10 15:48:49 +01:00
Daniel Kolesa 5b307c282b elua: support for list appends in elua.getopt 2014-06-10 15:48:49 +01:00
Daniel Kolesa f0330e5692 elua: alignment 2014-06-10 15:48:49 +01:00
Daniel Kolesa 7eff92c055 elua: getopt help alignment 2014-06-10 15:48:49 +01:00
Daniel Kolesa 15dd9dd623 elua: enforce posixly_correct in getopt_long of elua 2014-06-10 15:48:49 +01:00
Daniel Kolesa ae4daa5401 elua: also use hash fields to store resulting optional arguments 2014-06-10 15:48:49 +01:00
Daniel Kolesa 8c5cfce2a4 elua: if script returns true, do not start the main loop 2014-06-10 15:48:49 +01:00
Daniel Kolesa a94c216442 elua: match help categories in a case insensitive way, and add them to lualian 2014-06-10 15:48:49 +01:00
Daniel Kolesa e293536915 elua: getopt: support for categories in help callback, fix newline insertion in help 2014-06-10 15:48:49 +01:00
Daniel Kolesa d3d09f7df6 elua: support for return values in getopt help 2014-06-10 15:48:49 +01:00
Daniel Kolesa bdecee2eca elua: support for help categories in getopt 2014-06-10 15:48:49 +01:00
Daniel Kolesa 310a8ab13b elua: support for "done" callback in getopt 2014-06-10 15:48:49 +01:00
Daniel Kolesa 131826a083 elua: error callback in getopt 2014-06-10 15:48:49 +01:00
Daniel Kolesa c9b1378217 elua: use callbacks more in lualian 2014-06-10 15:48:49 +01:00
Daniel Kolesa 46f07a670e elua: getopt support for callbacks 2014-06-10 15:48:49 +01:00
Daniel Kolesa cde3ce5220 elua: smarter progname replacement in getopt 2014-06-10 15:48:49 +01:00
Daniel Kolesa 1afd1e6f27 elua: getopt api improvement 2014-06-10 15:48:49 +01:00
Daniel Kolesa 3130a0ec20 elua: remove license printing 2014-06-10 15:48:49 +01:00
Daniel Kolesa 8056a85428 elua: support for default domain in gettext module 2014-06-10 15:48:49 +01:00
Daniel Kolesa aaaf103234 elua: gettext cleanups, use ffi for calling into gettext to speed it up 2014-06-10 15:48:49 +01:00
Daniel Kolesa 76b445fb6d elua: i18n/l10n support including gettext module for user apps, bump gettext requirement to 0.18.3 (required for lua support in xgettext) 2014-06-10 15:48:49 +01:00
Daniel Kolesa 7876dd579f elua: lualian: remove out/inout support on keys 2014-06-10 15:48:49 +01:00
Daniel Kolesa 754f0fee79 elua: lualian: with directory scanning in, there is no need to do this anymore 2014-06-10 15:48:49 +01:00
Daniel Kolesa 4f7cdefbee elua: geometry and size parsing support in getopt 2014-06-10 15:48:49 +01:00
Daniel Kolesa 6da958d462 elua: initial support for complex types in lualian plus bug fixes 2014-06-10 15:48:49 +01:00
Daniel Kolesa 6a5057ef0d elua getopt: support for optional values 2014-06-10 15:48:49 +01:00
Daniel Kolesa e2f912aa03 elua: remove getopt-like interface from getopt.lua, use descs directly instead, and add a system of aliases (optional) 2014-06-10 15:48:48 +01:00
Daniel Kolesa e742b758d2 elua: do not use ecore_getopt, getopt.lua improvements and fixes, initial lualian generator script, lualian module changes 2014-06-10 15:48:48 +01:00
Daniel Kolesa 17be497fc2 elua: help support in getopt 2014-06-10 15:48:48 +01:00
Daniel Kolesa 975ca2634f elua: declarative version of the getopt function 2014-06-10 15:48:48 +01:00
Daniel Kolesa 27a5151bd8 elua: getopt module 2014-06-10 15:48:48 +01:00
Daniel Kolesa cefd51b955 elua: adjust module system for injection into loaded table nad preload, lualian can now inject inside of existing modules 2014-06-10 15:48:48 +01:00
Daniel Kolesa 942d684825 elua: register classes in lualian generated code 2014-06-10 15:48:48 +01:00
Daniel Kolesa d301b5bb84 elua: use actual class_get functions instead of placeholder 2014-06-10 15:48:48 +01:00
Daniel Kolesa 10c68c59c8 elua: generate a default constructor if none provided 2014-06-10 15:48:48 +01:00
Daniel Kolesa 3b053abdac elua: lualian support for non-default constructors, and a fix in event generation 2014-06-10 15:48:48 +01:00
Daniel Kolesa ad2aa8e9a9 elua: basic constructor generation in lualian 2014-06-10 15:48:48 +01:00
Daniel Kolesa 2f678f862d elua: make it possible to return values from constructors 2014-06-10 15:48:48 +01:00
Daniel Kolesa 437c2cf68f elua: event fix 2014-06-10 15:48:48 +01:00
Daniel Kolesa c2d581631b elua: functional event generation 2014-06-10 15:48:48 +01:00
Daniel Kolesa 92f6397b96 elua: event ffi generation 2014-06-10 15:48:48 +01:00
Daniel Kolesa fd34396c0e elua: initial code for lualian events and remove default constructor nonsense 2014-06-10 15:48:48 +01:00
Daniel Kolesa b79bd85f8f elua: more refined type conversions in lualian 2014-06-10 15:48:48 +01:00
Daniel Kolesa f415c10f41 elua: specialize Evas_Coord 2014-06-10 15:48:48 +01:00
Daniel Kolesa f9ee9e8673 elua: get rid of a warning 2014-06-10 15:48:48 +01:00
Daniel Kolesa 8b83976295 elua: better lualian type conversions 2014-06-10 15:48:48 +01:00
Daniel Kolesa 097f02bcc7 elua: basic type conversion support in lualian 2014-06-10 15:48:48 +01:00
Daniel Kolesa 5b29cc38e1 elua: check for property/method scope in lualian (don't generate code for protected methods as they're only usable within implementations) 2014-06-10 15:48:48 +01:00
Daniel Kolesa a9d3df6523 elua: class prefix stripping support 2014-06-10 15:48:48 +01:00
Daniel Kolesa 6e119370e9 elua: wrap multiple-return properties 2014-06-10 15:48:48 +01:00
Daniel Kolesa b2aa896932 elua: lualian can now generate methods 2014-06-10 15:48:48 +01:00
Daniel Kolesa 2cb887be13 elua: bindings fixes, lualian can now generate properties correctly (doesn't perform type conversions yet) 2014-06-10 15:48:48 +01:00
Daniel Kolesa 567ff9f0b3 elua: fixes and more lualian stuff 2014-06-10 15:48:47 +01:00
Daniel Kolesa 534818eaba elua: more lualian functionality 2014-06-10 15:48:47 +01:00
Daniel Kolesa aae4567b4d elua: eina bindings fixes, include support in lualian 2014-06-10 15:48:47 +01:00
Daniel Kolesa 7508be9cdb elua: mixin 2014-06-10 15:48:47 +01:00
Daniel Kolesa b930c9c432 elua: property support in object system, lualian progress, initial (incomplete) eo bindings 2014-06-10 15:48:47 +01:00
Daniel Kolesa 2ba2b1f6bf elua: initial code for lualian, a luajit binding generator based on eolian 2014-06-10 15:48:47 +01:00
Daniel Kolesa 08e0fea8ca elua: list and readonly object fixes 2014-06-10 15:48:47 +01:00
Daniel Kolesa 588d06d157 elua: fixes 2014-06-10 15:48:47 +01:00
Daniel Kolesa c12b55696d elua: the -E parameter now works (ignores env vars) 2014-06-10 15:48:47 +01:00
Daniel Kolesa 473549219e elua: overridable core+modules directory paths (via command line argument or environment variables) plus support for extra lib paths via -L 2014-06-10 15:48:47 +01:00
Daniel Kolesa 6c8fc0a87e elua: add Readonly_Object to util.lua (its instances are read only userdata, requires special care, but is not intended for the user), use it in List 2014-06-10 15:48:47 +01:00
Daniel Kolesa 210cfb81e2 elua: use standard error() call instead of returning true/false in module init 2014-06-10 15:48:47 +01:00
Daniel Kolesa bce656b93f elua: benchmark module, plus return values for init/shutdown 2014-06-10 15:48:47 +01:00
Daniel Kolesa da9fbe677f elua: initial eina_file bindings, iterator container retrieval support and cleanup of main.c 2014-06-10 15:48:46 +01:00
Daniel Kolesa b3c36138f9 elua: elm test entry 2014-06-10 15:48:46 +01:00
Daniel Kolesa 68de26604c elua: start binding Eina
Added initial eina logging module, added library handling utility funcs in util.lua, added .gitignores
2014-06-10 15:48:46 +01:00
Daniel Kolesa 137be43b49 elua: util module, object system, organization 2014-06-10 15:48:46 +01:00
Daniel Kolesa 063dd4147e elua: use Eina_File (mmap) 2014-06-10 15:48:46 +01:00
Daniel Kolesa 26dc3505bc elua: 100% compatible module system 2014-06-10 15:48:46 +01:00
Daniel Kolesa dbaa103d1e elua: make the custom module system default 2014-06-10 15:48:46 +01:00
Daniel Kolesa 832f652a5a Elua: initial commit
Elua is a LuaJIT based runtime for the EFL meant to provide facilities for rapid application development. The name is temporary. The EFL bindings will be generated with Eolian. @feature
2014-06-10 15:48:46 +01:00
Daniel Zaoui 2160d0f27a Eolian/Generator: use a specific define for the Eo APIs.
The generation of EOAPI instead of EAPI for the Eo functions is only
needed for code readibility.
2014-06-10 07:57:09 +03:00
Daniel Zaoui 4c1cf87419 Eolian/Generator: Fix comments generation.
This patch:
- removes the @def from Doxygen, as it is not correct for API
functions.
- fixes the generation of class comments. When no class description is
supplied, no comment should be added.
2014-06-09 10:09:15 +03:00
Daniel Zaoui 233650ed9d Eolian/Generator: concentrate the function name calculation to one
place.

Instead of having the calculation (class name + function name + set/get)
in many places in the code, it is now in one place and accessible via a
function environment structure.
2014-06-08 12:41:18 +03:00
Daniel Zaoui fc2a983ab9 Eolian/Generator: remove unused code.
The removed code was needed for Eo1 and is no more necessary.
2014-06-08 12:40:42 +03:00
Daniel Zaoui e7faaf9fc5 Eolian/Generator: Fix Windows issue during string manipulation.
For Windows, it is simpler to replace all the \r\n with \n after having
read the file.
2014-06-05 11:34:44 +03:00
Daniel Zaoui 5c55ce49e6 Eolian: rename internal files.
This files were needed to be renamed a long time ago :-)
2014-06-05 10:11:13 +03:00
Daniel Zaoui 97913753ea Eolian: Fix Coverity issue.
In a certain case, the function was returning without releasing all the
resources.

CID 1220084
2014-06-05 07:40:26 +03:00
Guillaume Friloux 732f1c2a1b Fix gcc warning about uninitialized variable. 2014-06-03 16:37:50 +02:00
Tom Hacohen 26ea65b470 Eolian CXX: Remove unneeded Eo.h include.
Eo.h depends on things that are generated by normal Eolian, and because Eolian C++
is generating code pre-build (WHY THE FUCK???), the dependencies are missing.

This removes the stupid include, but a more proper fix would be to move eolian_cxx
to be part of the build process and not pre-build.
2014-06-03 13:41:38 +01:00
Tom Hacohen 62a3522fcc Eolian cxx: Fix it to use the right class names.
This is following the class name change in normal eolian.
2014-06-03 11:28:01 +01:00
Daniel Zaoui 03647b4279 Eolian: Use class name and not prefix in the class macro.
So for example a class called Eo_Base with prefix: eo, used to be
generated to EO_CLASS instead of EO_BASE_CLASS.
2014-06-03 11:26:58 +01:00
Daniel Zaoui 7a83c9c659 Eolian: Fix bad behavior when the .eo is incorrect
In this case, the section 'implements' contains bad information about the
function to override. If the first (at least) function is correct, it
will never fail but use the last correct information retrieved from the
database.
The patch fixes it by checking the result of the database function
eolian_implement_information_get.

@fix
2014-06-03 08:58:05 +03:00
Daniel Zaoui dc3178404f Eolian: modify 'implement' API parameters.
The function eolian_implement_information_get was returning strings for
the class and the function. It was written in this way at the beginning
because it was not needed to verify the correctness of the class and
the function.
Now that we have the namespace feature, this function must check it,
meaning that the class and the function are now known.
So we can return them instead of returning the strings.

The generators had to find the class from the classname. It is no more
needed.

The C++ generator has been adapted to this new API.
2014-05-29 14:48:05 +03:00
Daniel Zaoui fb6209f083 Eolian: modify generators to use internal variables environment. 2014-05-29 10:04:01 +03:00
Daniel Zaoui d9e177e61b Eolian: add the super invocation for developer code generation.
Now the eo_do_super is invoked for constructors overridding in a
inheriting class.
2014-05-29 10:03:45 +03:00
Daniel Zaoui cb499ab28e Eolian: Add an internal environment for class variables.
To reduce the invocations to strings conversions, we store the
classname, the Eo prefix in upper and lower cases in global variables.
The problem comes when we have to handle overriding functions. A lot of
conflicts between class base and class inheriting can happen.

The chosen solution is to create independent environments storing the
converted strings.
2014-05-29 09:58:27 +03:00
ChunEon Park dc945ccb55 edje/epp - clean up memory allocated. 2014-05-27 22:17:01 +09:00
ChunEon Park b2841c0db6 edje/edje_cc - intensive null check. 2014-05-27 22:00:59 +09:00
Daniel Zaoui b10a1b11f1 Eolian: fix coverity issues.
CID 1216274
CID 1216275
CID 1216276
CID 1216277
CID 1216278
CID 1216279
CID 1216280
2014-05-27 08:22:40 +03:00
Daniel Zaoui 0b33a142b1 Eolian: fix generation when optimization is set.
When using -O2 or -O3, the Eina_Bool legacy_support (unsigned char) was
overriding the int eo_needed.

The result was a failure during options check:
Eo flag is not specified (use --eo). Aborting eo generation.

@fix
2014-05-26 15:37:33 +03:00
Daniel Zaoui a1e72dee0d Eolian/Generator: add support to namespaces.
The C generators now support namespaces generation.
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 04cc813813 Eolian: add test for generator.
The test checks the dev code generator.
2014-05-26 13:56:06 +03:00
Daniel Zaoui a541aecf76 Eolian/Generator: add support for implementation source file.
By using -gi option, the generator appends the functions that are
present into the given eo file and missing into the developer file
(given via -o option as an in/out file).

@feature
2014-05-26 13:56:06 +03:00
Daniel Zaoui 0782e96c36 Eolian/Generator: fix the class description generation.
The class description was not used during the generation of the legacy
and Eo headers.
2014-05-14 14:52:58 +03:00
Mike Blumenkrantz 894c36ff11 de-elipsis edje
the word is "ellipsis". it's bad enough that we have released misspelled api, but we can at least spell things correctly internally.
2014-05-13 16:20:41 -04:00
Mike Blumenkrantz 03edef876f edje_cc now prints helpful warning messages when it compiles broken text parts 2014-05-13 16:05:39 -04:00
Mike Blumenkrantz 800bcde9d7 edje_cc should throw errors when inheriting a part from the same part 2014-05-13 11:15:02 -04:00
Mike Blumenkrantz a84f19beb7 redo lazEDC parsing a bit to fix desc.state omission 2014-05-09 15:58:25 -04:00
Mike Blumenkrantz 6a7b0af847 lazEDC missing keywords for scale/noscale 2014-05-09 12:33:47 -04:00
Mike Blumenkrantz 1d6b9d71e6 fix be9b27ac99 for edje_cc
do_params is set when expecting parameters, not req_params
2014-05-09 12:26:22 -04:00
Mike Blumenkrantz 14fc7d2a36 lazEDC syntax update: imprecise -> noprecise 2014-05-09 12:21:45 -04:00
Felipe Magno de Almeida 78564fac45 eolian-cxx: fix #include directives generation
Summary: Fix eolian_cxx #include directives generation for relative paths

Reviewers: cedric, stefan, stefan_schmidt

CC: cedric, savio

Differential Revision: https://phab.enlightenment.org/D833

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-09 12:39:49 +02:00
Mike Blumenkrantz c911ac2fb9 call edje_cc link combining when popping the group so the last group doesn't not get linked 2014-05-08 21:04:28 -04:00
Savio Sena 95f5c11703 eolian_cxx: fix install-examples and (post-install) compilation.
Summary:
This patch fixes T1226 by adding a Makefile.examples to
examples/eolian_cxx. It also fixes a bug in bin/eolian_cxx: the
include paths were not being correctly generated for directories
outside EFL tree.

Reviewers: cedric, smohanty, stefan_schmidt, stefan

CC: uartie, wayland-efl, felipealmeida, raster, woohyun, cedric

Maniphest Tasks: T1226

Differential Revision: https://phab.enlightenment.org/D824

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-07 23:40:46 +02:00
Daniel Zaoui 935db516b2 Eolian_CXX: Fix generation warnings.
Since there was a bug in Eolian (Spank on you Savio that you didn't tell
me :-)), the cxx generator needed some workaround that is no more
mandatory now.
2014-05-07 09:13:25 +03:00
Savio Sena e61004e30f eolian_cxx: remove warnings from bin and lib.
Reviewers: cedric, smohanty, stefan_schmidt, stefan

CC: felipealmeida, cedric

Differential Revision: https://phab.enlightenment.org/D826

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-07 00:18:43 +02:00
Savio Sena 2fdc88b33a eolian-cxx: Fixed the generation .eo.h path.
Summary: This patch fixes T1225

Reviewers: uartie

CC: uartie, wayland-efl, felipealmeida, cedric, smohanty, raster, stefan_schmidt, stefan, woohyun

Maniphest Tasks: T1225

Differential Revision: https://phab.enlightenment.org/D821
2014-05-05 13:09:28 -07:00
Mike Blumenkrantz caf27c4fc3 eldbus-codegen no longer passes garbage values to error callbacks
@fix
2014-05-04 20:37:27 -04:00
Felipe Magno de Almeida 8149823897 eolian-cxx: fix make distcheck and automake files for Eolian C++
Summary:
Fixed distcheck for Eolian C++. Made the generated files as
nodist so it doesn't get picked up for generation way too
early.

Reviewers: cedric, seoz

CC: cedric

Maniphest Tasks: T1220

Differential Revision: https://phab.enlightenment.org/D820

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-04 12:21:30 +02:00
Daniel Zaoui 9cd038fb36 Eolian: Fix Coverity issue CID1210805.
The list is not used anymore so it can be removed.
2014-05-04 07:41:46 +03:00
Savio Sena 46b6e8a563 eolian_cxx: initial version of the EFL C++ Bindings Generator.
Summary:
This patch adds 'eolian_cxx' -- a C++ bindings generator --
to the EFL tree. Eolian Cxx uses Eolian API to read .eo files and generate
.eo.hh. It relies/depends on Eo Cxx and Eina Cxx (both non-generated
bindings).

src/bin/eolian_cxx: The eolian_cxx program.
src/lib/eolian_cxx: A header-only library that implements the C++ code
generation that binds the .eo classes.

=Examples=

src/examples/eolian_cxx/eolian_cxx_simple_01.cc: The simplest example,
it just uses some "dummy" generated C++ classes.

src/examples/eolian_cxx/eolian_cxx_inherit_01.cc: Illustrates how
pure C++ classes inherit from .eo generated classes.

src/examples/evas/evas_cxx_rectangle.cc: More realistic example using
the generated bindings Evas Cxx. Still a bit shallow because we don't
have full fledged .eo descriptions yet, but will be improved.

=Important=

The generated code is not supported and not a stable API/ABI. It is
here to gather people interest and get review before we set things in
stone for release 1.11.

@feature

Reviewers: cedric, smohanty, raster, stefan_schmidt

CC: felipealmeida, JackDanielZ, cedric, stefan

Differential Revision: https://phab.enlightenment.org/D805

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
2014-05-03 00:56:32 +02:00
Mike Blumenkrantz 7823b187d9 edje_cc now requires quotes for using lazEDC block naming
this was making syntax errors much harder to debug and only served the purpose of further enabling shitty, nonconformant edc creating. removing now before it becomes an api break
2014-04-28 10:17:23 -04:00
Daniel Zaoui 7f90088232 Eolian/Generator: only requests .eo files parsing when needed.
Before this change, all the .eo files of the directories given with -I
option were parsed. Most of this information was not necessary at all,
since only the classes belonging to the inheritance of the class given
as parameter were needed.
Now, during the parsing of the given class, the inherits classes are
searched and parsed.

A condition is needed to make it work well. To find a filename for a
class, we consider the lowercase of the class name as the filename we
have to parse.
e.g, Elm_Button -> elm_button -> elm_button.eo

It considerably reduces the generation time.

A fix in the tests was needed.
2014-04-27 10:03:39 +03:00
Daniel Zaoui e42b68534b Eolian: remove --eo1 support totally 2014-04-27 08:04:00 +03:00
Mike Blumenkrantz f482aeb43f fix edje_cc multiple link usage on same description 2014-04-26 02:16:55 -04:00
Mike Blumenkrantz b35dfc5f05 edje_cc now (more) correctly handles text filter inheriting/resetting 2014-04-25 10:52:15 -04:00
Mike Blumenkrantz 5f376fde36 edje now correctly supports text.source and text.text_source for swallowed parts
fix T1186
2014-04-25 10:52:15 -04:00
Mike Blumenkrantz d498f6f723 edje_cc no longer has "slave" lookups
these appear to have been replaced many centuries ago with copied_X lookups
2014-04-25 10:52:15 -04:00
Mike Blumenkrantz bce864b8dd edc parts.alias documentation is now comprehensible and useful 2014-04-25 10:52:15 -04:00
Mike Blumenkrantz 939f2eea7f edje now has the group.script_recursion flag for permitting unsafe embryo recursion
this is enabled for all scripts within a group, and it should only be used if you:

1) know what you are doing

2) know why this is unsafe (T905)

@feature
2014-04-25 10:52:15 -04:00
Mike Blumenkrantz c5b1598e6e edje_cc now supports part.description.link for single line state changes
@feature
2014-04-25 10:52:15 -04:00
Mike Blumenkrantz 83832d6b1d edje_cc now supports group.program_source for specifying a default source in programs
this allows for program.source to be omitted 99% of the time since most sources in an application/library will be the same within a single group

@feature
2014-04-25 10:52:15 -04:00
Mike Blumenkrantz fd8c9532a1 edje_cc now has the program.groups and X.target_group keywords for target grouping
this allows any number of parts/programs to be added by name into a logical grouping which can then be referenced inside a program.

eg.

before
------

program { signal: XYZ; source: 123;
   action: STATE_SET "default";
   targets: "sup" "dawg" "parts" "up" "in" "dis" "progrizzle";
}

program { signal: ABC; source: 123;
   action: STATE_SET "notdefault";
   targets: "sup" "dawg" "parts" "up" "in" "dis" "progrizzle" "tooizzle";
}

======
after
------

target_group: "default" "sup" "dawg" "parts" "up" "in" "dis" "progrizzle";

program { signal: XYZ; source: 123;
   action: STATE_SET "default";
   group: "default";
}

program { signal: ABC; source: 123;
   action: STATE_SET "notdefault";
   group: "default";
   target: "tooizzle";
}

@feature
2014-04-25 10:52:15 -04:00
Mike Blumenkrantz be9b27ac99 edje_cc now errors immediately on syntax errors triggered by lack of parameters 2014-04-25 10:52:15 -04:00
Mike Blumenkrantz c8cc776fb1 edje_cc now supports targets for SIGNAL_EMIT actions
this is much more intuitive than somehow knowing you're supposed to add a ':' between part:signal

@feature
2014-04-25 10:52:15 -04:00
Mike Blumenkrantz 6b712f6f02 edje_cc now supports the group.inherit_only attribute
use this for flagging a group as a "virtual" group which is only used for inheriting

@feature
2014-04-25 10:52:14 -04:00
Mike Blumenkrantz 7eb703fdde edje_cc now supports "lazEDC", a more concise version of EDC
in today's modern world of fast-paced, HTML5-driven, C++-riddled
development, nobody wants to spend hours typing out long words like
"description" or "mouse_events" or "name". there's no time for it
and certainly nobody is going to allocate budget for this sort of
keyboard-related nonsense.
enter lazEDC: the solution for edje-loving keyboard jockeys everywhere.
by breaking the parser of edje_cc with the strength of 10 frenchmen,
new, shorter keywords such as "nomouse" can be used in place of lengthy,
rambling statements like "mouse_events: 0", and things like

part { name: "clip"; type: RECT; description { state: "default" 0.0; }}

can now be written as

rect { "clip"; }

with the exact same effect.

initial tests show that complex and terrible edc files such as the infamous
"genlist.edc" can be reduced in size by over 15% using these new features.

see edcref for docs, and genlist.edc for examples

@feature

@awesome
2014-04-25 10:52:14 -04:00
bluezery 785cdcf689 edje: Remove build warnning by clang
Summary:
This can fix below warning:
bin/edje/edje_cc_handlers.c:9839:42: warning: equality comparison with
extraneous parentheses [-Wparentheses-equality]

Reviewers: raster, cedric, seoz

Reviewed By: seoz

CC: cedric

Differential Revision: https://phab.enlightenment.org/D792
2014-04-25 14:27:15 +09:00
Daniel Zaoui f36fac8ec6 Eolian: Remove useless functions.
Default ctor/dtor are considered as implemented functions and no more as
special functions.
2014-04-23 16:28:33 +03:00
Mike Blumenkrantz 7355f67c1f revert edje ellipsis doc changes
if we're reverting functional changes, then it's probably a good idea to revert the accompanying documentation
2014-04-23 09:28:23 -04:00
Carsten Haitzler f442c21c04 partly revert mike's ellipsis changes as they break edje
partly revert adcc323291 as the default
ellipsis value was 0 as per the document, and must stay, as changing
this breaks edc descirptions as now text is no longer ellipsised by
default. this ACTUALLY broke titlebars on the default theme - just
have a title that is too long and see how it no longer goes:

This is a title he...

it instead covers the screen for as long as the title is.

if you want -1 for ellipsis... then set it. :)
2014-04-23 19:57:15 +09:00
Yossi Kantor 026d7210c6 Eolian: Space after const missing in function parameters of legacy header 2014-04-23 10:35:04 +03:00
Daniel Zaoui 5ea1ffac5b Eolian/Generator: support --eo.
--eo1 is still supported but it will be removed soon.
2014-04-23 08:55:15 +03:00
Mike Blumenkrantz adcc323291 edje: the ellipsis fuckup preservation commit.
what a huge, colossal cock-up of a clusterfuck. it's a good thing nobody ever uses ellipses or edje. otherwise we'd probably get complaints about this kind of thing.
2014-04-22 20:21:46 -04:00
Jean-Philippe Andre 5ab3bd7b7d ecore_evas_convert: Fix default quality setting
Quality should not default to 100 unless specified in the
command line. In particular, we don't want to save ETC1 at
high quality by default since it can take hours (literally).
2014-04-18 19:07:34 +09:00
Jean-Philippe Andre f6eae69eb2 Edje: Use LOSSY_ETC1 instead of LOSSY
Add a new flag in EDC files to specify ETC1 compression
should be enabled. It follows the same rules as the
current LOSSY flag for JPEG compression.

@feature
2014-04-18 16:50:01 +09:00
Jean-Philippe Andre 7ff410b9f6 Edje: Fix ETC1 encoding with EET and Edje
There were a few critical issues:
- Invalid pointer arithmetics on the input data (char vs. int)
- Invalid logic in the pixel duplication code

All of these due to bad copy and paste :(

Also, use LZ4HC instead of LZ4 when compression is enabled.
ETC1 encoding is so damn slow you won't see the difference between
LZ4 and LZ4HC compression times.
2014-04-18 15:43:07 +09:00
Jean-Philippe Andre d531816b12 Edje: Add support for ETC1 encoding
Edje will compress images as ETC1 provided that they don't
contain any alpha AND the command line includes -etc1.
2014-04-18 15:43:04 +09:00
Daniel Zaoui 60fb57a3e5 Eolian/Generator: Fix coverity issues.
Fix CID 1203409
Fix CID 1203410
2014-04-18 09:05:20 +03:00
Daniel Zaoui 38b993c29b Eolian/Generator: remove Eo1 generation 2014-04-17 15:50:22 +03:00
Daniel Zaoui fc9682bd7f Eolian: fix generation of Eo2 functions definitions.
When keys are used in property, the Eo2 macro was not well chosen.
2014-04-13 11:30:39 +03:00
Mike Blumenkrantz bdb8542e3b eolian no longer generates return statements for void functions 2014-04-11 10:33:20 -04:00
Daniel Zaoui 1a48d11fb9 Eolian: Fix generation of Eo APIs.
When return is forced to void, even if the function contains only
one parameter, the return type will be void.
2014-04-10 11:24:04 +03:00
Tom Hacohen 2b34ab4cf7 Eolian: Generate Eo2. 2014-04-10 04:20:21 +01: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 bbba6a20b4 Eolian: generation of Eo2.
The generation of Eo2 can be enabled by defining EO flag in
common_funcs.h.
2014-04-10 04:20:02 +03:00
Yossi Kantor bff7e65d24 Eolian: Legacy generator generates const return value for legacy header if needed 2014-04-09 04:08:57 +03:00
Yossi Kantor b437457657 Eolian: Legacy generator - no semicolon after EINA_WARN_UNUSED_RESULT 2014-04-09 04:08:57 +03:00
Yossi Kantor 01c1626977 Eolian: Fix legacy generation.
Semicolon was misplaced when function flags are needed.
2014-04-08 09:33:01 +03:00
Daniel Zaoui 912409df3c Eolian: rename enums.
Add the EOLIAN namespace to the function types.
2014-04-08 04:27:01 +03:00
zmike 2373269ad7 reformat edje_player
ffs these tabs
2014-04-07 13:15:40 -04:00
Daniel Zaoui 0eb092d157 Eolian/Lexer: support data type for events. 2014-04-02 14:27:12 +03:00
Daniel Zaoui f2b857dcb3 Eolian: fix warnings. 2014-04-02 10:08:27 +03:00
Daniel Zaoui bddee1554f Eolian/Generator: don't generate legacy if legacy_prefix is "null".
For new classes that don't need legacy, instead of setting legacy null
for all the functions, legacy_prefix can be set to "null" to not
generate legacy.
However, if, for example, only one function among 50 need legacy, you
can specify it by setting for this function the legacy token.
2014-04-02 10:05:37 +03:00
Yossi Kantor 277c3e2ef3 Eolian: Explicit generation of either method or property in implemented functions 2014-04-02 10:05:37 +03:00
Jean-Philippe Andre 5926aadd9e Evil: Add support for mkstemps
This adds filename suffix support for temporary files on Windows.
2014-04-02 12:14:50 +09:00
Daniel Zaoui 9780b403ee Eolian: Proper use of legacy prefix in legacy function definition. 2014-04-01 16:36:59 +03:00
Yossi Kantor dfaa1d5722 Eolian: Legacy generator - dont generate @param[out] ret if return value is specified 2014-04-01 16:32:35 +03:00
Yossi Kantor 5c6a6b586a Eolian: No need for --eo version when generating legacy header 2014-04-01 16:32:35 +03:00
Cedric BAIL a086a4f089 ecore_evas: add a tool that can convert file using Evas internal loaders and savers. 2014-04-01 22:00:13 +09:00
Vorobiov Vitalii 85f8661f45 edje_cc: fix group inheriting with scripts. (group.script and .program.script)
After doing some edje_edit manipulations there was a problem that
after edje_decc of changed EDJ file it wasnt able to compile again, because some of scripts
weren't inherited.
The problem was in Code and Code_Script structure.
There is "shared" ("script") field and "original" field that contained a string with embryo script code.
After inheriting whole group, "original" field wasn't copied, so it wasn't able to write
the script into resulted EDJ file (look at edje_cc_out:1407).
@fix

Reviewers: cedric, seoz, raster

Reviewed By: cedric

CC: reutskiy.v.v, cedric

Differential Revision: https://phab.enlightenment.org/D671

Signed-off-by: Cedric BAIL <cedric.bail@free.fr>
2014-04-01 22:00:13 +09:00
Mike Blumenkrantz c5564213ea edje_cc should probably handle sequenced scripts successfully 2014-03-31 16:45:05 -04:00
Mike Blumenkrantz 01b54c75f1 edje_cc part description state name error clarification 2014-03-31 16:02:41 -04:00
Mike Blumenkrantz 5ffef1e853 edje_cc no longer allows buggy/unexpected behavior when inheriting parts
previously we allowed users to not specify the state names for non-default description states. this guaranteed crazy behavior during inheritance since it was impossible to properly reference such states.
2014-03-31 15:30:48 -04:00
Mike Blumenkrantz 1009e3c234 edje_cc sequence example: now with 50% more sequencing! 2014-03-29 09:57:27 -04:00
Ryuan Choi c2077f4853 edje_cc: Fix the crash when compiled wrong edc file containing empty part
It's regression since cff3ec04b.

@fix
2014-03-29 13:01:03 +09:00
Mike Blumenkrantz 7c018bba0d eolian should use "wb" for file opening to not break windows use 2014-03-28 16:39:52 -04: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 eb65cac12d Eolian/Generator: enable forcing return type as void.
For get properties, if only one parameter is given, the generator sets this one as return type.

There are cases where this parameter must stay a parameter (legacy API).

For example, elm_thumb_compress_get must be like:
void elm_thumb_compress_get(const Eo *obj, int *compress).
Eolian was generating the function as:
int elm_thumb_compress_get(const Eo *obj);

By setting "return void;" in the .eo file, you force the function to
return void.
2014-03-27 13:15:02 +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