diff options
author | Adrian Thurston <thurston@colm.net> | 2020-12-09 10:06:59 -0800 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2020-12-09 10:06:59 -0800 |
commit | ee828d42d730aa73f5d579c2650819aff22d7f2c (patch) | |
tree | 33baae9a70f3f946ba10feac3bb15c9a3623eae6 | |
parent | 368a8d850061dcae69bf2f7a7b2dc9ef209de2c9 (diff) | |
download | colm-ee828d42d730aa73f5d579c2650819aff22d7f2c.tar.gz |
don't use InputLoc in GenAction so we can keep it trivial.
-rw-r--r-- | src/redbuild.cc | 4 | ||||
-rw-r--r-- | src/redfsm.cc | 2 | ||||
-rw-r--r-- | src/redfsm.h | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/redbuild.cc b/src/redbuild.cc index 7e0396d7..7f600ee7 100644 --- a/src/redbuild.cc +++ b/src/redbuild.cc @@ -382,8 +382,8 @@ void RedFsmBuild::newAction( int anum, char *name, int line, int col, Action *ac { redFsm->allActions[anum].actionId = anum; redFsm->allActions[anum].name = name; - redFsm->allActions[anum].loc.line = line; - redFsm->allActions[anum].loc.col = col; + redFsm->allActions[anum].loc_line = line; + redFsm->allActions[anum].loc_col = col; redFsm->allActions[anum].inlineList = action->inlineList; redFsm->allActions[anum].objField = action->objField; redFsm->allActions[anum].markType = action->markType; diff --git a/src/redfsm.cc b/src/redfsm.cc index d79a1e32..6d5c426b 100644 --- a/src/redfsm.cc +++ b/src/redfsm.cc @@ -41,7 +41,7 @@ string nameOrLoc( GenAction *genAction ) return string(genAction->name); else { ostringstream ret; - ret << genAction->loc.line << ":" << genAction->loc.col; + ret << genAction->loc_line << ":" << genAction->loc_col; return ret.str(); } } diff --git a/src/redfsm.h b/src/redfsm.h index 618fbd61..65a43c6c 100644 --- a/src/redfsm.h +++ b/src/redfsm.h @@ -60,7 +60,8 @@ struct ObjectField; struct GenAction { /* Data collected during parse. */ - InputLoc loc; + int loc_line; + int loc_col; char *name; InlineList *inlineList; int actionId; |