summaryrefslogtreecommitdiffstats
path: root/aidl_language_l.l
diff options
context:
space:
mode:
authorCasey Dahlin <sadmac@google.com>2015-10-05 18:18:43 -0700
committerCasey Dahlin <sadmac@google.com>2015-10-06 10:59:46 -0700
commit0559875033cc2a747e53b442c2a3a81dc8470e7d (patch)
treea08aef714f83761bb466589e8915d2092b726569 /aidl_language_l.l
parentf7a421c02d43c3289ca45f0d5ccdf8d27e605f5a (diff)
downloadandroid_system_tools_aidl-0559875033cc2a747e53b442c2a3a81dc8470e7d.tar.gz
android_system_tools_aidl-0559875033cc2a747e53b442c2a3a81dc8470e7d.tar.bz2
android_system_tools_aidl-0559875033cc2a747e53b442c2a3a81dc8470e7d.zip
Do generic parsing in parser, not lexer
Change-Id: I223caa8358e4f7f0554eaa9d198eb6366c141ce1 Test: Unit tests and full android rebuild Bug: 24680682 Signed-off-by: Casey Dahlin <sadmac@google.com>
Diffstat (limited to 'aidl_language_l.l')
-rw-r--r--aidl_language_l.l7
1 files changed, 3 insertions, 4 deletions
diff --git a/aidl_language_l.l b/aidl_language_l.l
index 34ab720..41c6c3c 100644
--- a/aidl_language_l.l
+++ b/aidl_language_l.l
@@ -80,8 +80,7 @@ idvalue (0|[1-9][0-9]*)
\n+ { yylloc->lines(yyleng); yylloc->step(); }
-{whitespace} { /* begin_extra_text(yylineno, WHITESPACE);
- append_extra_text(yytext); */ }
+{whitespace} {}
; { SET_BUFFER(';'); return ';'; }
\{ { SET_BUFFER('{'); return '{'; }
@@ -93,6 +92,8 @@ idvalue (0|[1-9][0-9]*)
\) { return ')'; }
\[ { return '['; }
\] { return ']'; }
+\< { return '<'; }
+\> { return '>'; }
/* keywords */
parcelable { SET_BUFFER(yy::parser::token::PARCELABLE); return yy::parser::token::PARCELABLE; }
@@ -105,8 +106,6 @@ inout { return yy::parser::token::INOUT; }
{idvalue} { SET_BUFFER(yy::parser::token::IDVALUE); return yy::parser::token::IDVALUE; }
{identifier} { SET_BUFFER(yy::parser::token::IDENTIFIER); return yy::parser::token::IDENTIFIER; }
-{identifier}\<{whitespace}*{identifier}({whitespace}*,{whitespace}*{identifier})*{whitespace}*\> {
- SET_BUFFER(yy::parser::token::GENERIC); return yy::parser::token::GENERIC; }
/* syntax error! */
. { printf("UNKNOWN(%s)", yytext);