diff options
author | 2024-07-24 12:34:57 +0200 | |
---|---|---|
committer | 2024-07-24 12:34:57 +0200 | |
commit | d0ad5177aac3051be772f869005b857705c48eb7 (patch) | |
tree | 7dc51bc1078c184ac015cdc916a393da42a9787c | |
parent | cc2a942dd4a04d1b4e7a728ddcc50111b8bdc436 (diff) | |
download | properties-d0ad5177aac3051be772f869005b857705c48eb7.tar.gz properties-d0ad5177aac3051be772f869005b857705c48eb7.zip |
Re-align the lexer code
-rw-r--r-- | properties.l | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/properties.l b/properties.l index 4e6f04b..4e8f1d2 100644 --- a/properties.l +++ b/properties.l @@ -4,11 +4,11 @@ %% -=|: return DIV; -^[ \t]*[a-zA-Z0-9\.]*[ \t]* yylval.value = strdup(yytext); return KEY; -\n ; /* Ignores empty lines with a single newline */ -^[ \t]*#.* ; /* Ignores comments */ -^[ \t]*/\r?\n ; /* /\r?\n get the end of line, ref: https://stackoverflow.com/a/56104754 */ -. yylval.value = strdup(yytext); return VALUE; +=|: return DIV; +^[ \t]*[a-zA-Z0-9\.]*[ \t]* yylval.value = strdup(yytext); return KEY; +\n ; /* Ignores empty lines with a single newline */ +^[ \t]*#.* ; /* Ignores comments */ +^[ \t]*/\r?\n ; /* /\r?\n get the end of line, ref: https://stackoverflow.com/a/56104754 */ +. yylval.value = strdup(yytext); return VALUE; %% |