Commit graph

8 commits

Author SHA1 Message Date
Colin Cross
ff48d3de3c Add missing header include to libedify
parser.yy uses va_start and should include stdarg.h.

Bug: 190084016
Test: m USE_HOST_MUSL=true libedify
Change-Id: I2747c1233667717fe0a34050a008370502de184a
2021-12-20 15:41:06 -08:00
Steven Moreland
ee3dd45c07 edify: update for bison 3.5
Getting rid of warning, so using new define for turning on verbose
errors:
%define parse.error verbose

Bug: 31194194
Test: N/A
Change-Id: I47c200a1e669b5c5fc53d392f32b4c264a42182d
2020-01-14 20:56:40 +00:00
Tao Bao
d8d514fa33 edify: Rename parse_string to ParseString and let it take std::string.
Also simplify the helper function expect() in {edify,updater}_test.cpp.

Test: Run recovery_component_test on marlin.
Change-Id: If54febba4b5013f6d71546318a1ca6b635204ac8
2018-07-10 06:27:50 +00:00
Tao Bao
e6f7f95d34 edify: Export the header and move to Soong.
Also make matching changes to applypatch modules which include
edify/expr.h.

Test: mmma bootable/recovery
Change-Id: Ia72be3caa010d7f56a70add2da345e631b306378
2017-10-09 14:08:00 -07:00
Tianjie Xu
c3c3496ab2 Suppress the unused variable warning in parser.yy
The warning says: bootable/recovery/edify/parser.yy:123.3-9: warning:
unused value: $1

Bug: 36678950
Test: mma
Change-Id: Ic734c416a5a8f62fb5e516669102c1d2b4ad5083
2017-03-28 12:44:10 -07:00
Tianjie Xu
c444732540 Remove malloc in edify functions
And switch them to std::vector & std::unique_ptr

Bug: 32117870
Test: recovery tests passed on sailfish
Change-Id: I5a45951c4bdf895be311d6d760e52e7a1b0798c3
2017-03-22 14:20:57 -07:00
Tao Bao
39119ad8ec edify: Some clean-ups to libedify.
- Remove dead declarations in expr.h: SetError(), GetError(),
  ClearError().
- Remove the declaration of Build() out of expr.h.
- Use std::unordered_map to implement RegisterFunction() and
  FindFunction(); kill FinishRegistration().
- Add a testcase for calling unknown functions.

Test: mmma bootable/recovery; recovery_component_test passes.
Change-Id: I9af6825ae677f92b22d716a4a5682f58522af03b
2016-10-12 23:29:59 -07:00
Ying Wang
c577660702 Rename .l/.y to .ll/.yy
Now to generate .cpp you need to use .ll/.yy.

Bug: 26492989
Change-Id: Ib078e03b3b0758f7a62595c343e52ae856bcb33f
2016-01-12 21:09:10 -08:00
Renamed from edify/parser.y (Browse further)