Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
b52d2107
Commit
b52d2107
authored
May 14, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Emit ec::unexpected_newline automatically
parent
4c894a79
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
libcaf_core/caf/detail/parser/fsm.hpp
libcaf_core/caf/detail/parser/fsm.hpp
+10
-6
libcaf_core/caf/detail/parser/read_atom.hpp
libcaf_core/caf/detail/parser/read_atom.hpp
+0
-1
No files found.
libcaf_core/caf/detail/parser/fsm.hpp
View file @
b52d2107
...
...
@@ -18,6 +18,13 @@
#pragma once
#define CAF_FSM_EVAL_MISMATCH_EC \
if (mismatch_ec == ec::unexpected_character) \
ps.code = ch != '\n' ? mismatch_ec : ec::unexpected_newline; \
else \
ps.code = mismatch_ec; \
return;
#define start() \
char ch = ps.current(); \
goto s_init; \
...
...
@@ -28,8 +35,7 @@
static constexpr ec mismatch_ec = ec::unexpected_character
#define state(name) \
ps.code = mismatch_ec; \
return; \
CAF_FSM_EVAL_MISMATCH_EC \
} \
{ \
static constexpr ec mismatch_ec = ec::unexpected_character; \
...
...
@@ -39,8 +45,7 @@
e_##name : __attribute__((unused));
#define term_state(name) \
ps.code = mismatch_ec; \
return; \
CAF_FSM_EVAL_MISMATCH_EC \
} \
{ \
static constexpr ec mismatch_ec = ec::trailing_character; \
...
...
@@ -50,8 +55,7 @@
e_##name : __attribute__((unused));
#define fin() \
ps.code = mismatch_ec; \
return; \
CAF_FSM_EVAL_MISMATCH_EC \
} \
s_fin: \
ps.code = ec::success; \
...
...
libcaf_core/caf/detail/parser/read_atom.hpp
View file @
b52d2107
...
...
@@ -64,7 +64,6 @@ void read_atom(state<Iterator, Sentinel>& ps, Consumer& consumer) {
state
(
read_chars
)
{
input
(
is_char
<
'\''
>
,
done
)
checked_action
(
is_legal
,
read_chars
,
append
(
ch
),
ec
::
too_many_characters
)
invalid_input
(
is_char
<
'\n'
>
,
ec
::
unexpected_newline
)
}
term_state
(
done
)
{
input
(
is_char
<
' '
>
,
done
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment