incomplete error message by CST when encountering a parsing error
Issue #2355
resolved
I am trying to stress test the presync read/write parser and code generator code. As such I am construction a thorn with bad input. Unfortunately using this schedule.ccl
file, which may contain actually incorrect input:
# Schedule definitions for thorn TestReadWrite
STORAGE: Var1[2] Var2 TestGroup[3] UnusedVar
STOREAGE: results
SCHEDULE TestReadWrite_TestC_A AT initial
{
WRITE: groupvar
WRITE: var1
LANG: C
} "Test Read / Write Statements"
SCHEDULE TestReadWrite_TestC_B AT initial AFTER TestReadWrite_TestC_A
{
WRITE: var2
LANG: C
} "Test Read / Write Statements"
# check that union of variables is used when constructing macro
SCHEDULE TestReadWrite_TestC_B IN GroupThatDoesNotExist
{
WRITE: groupvar
READ: var1
LANG: C
} "Test Read / Write Statements"
SCHEDULE TestReadWrite_TestC AT initial AFTER TestReadWrite_TestC_B
{
WrITE: varpastlevelc, grouppastlevelc
ReAD: Var1, Var1_p
READ: var2
READ: groupvar_pp
WrITE: VarCurrentLevelC GroupCurrentLevelC
LANG: C
} "Record results in grid scalars"
I get the following error message from CST:
Parsing schedule files...
Cactus
0 schedule blocks.
TestReadWrite
Parse Error at /home/rhaas/postdoc/gr/cactus/ET_trunk/repos/flesh/lib/sbin/CSTUtils.pl line 966.
main::parse_ccl(Grammar=HASH(0x55ffc79624e8), "sched", "/home/rhaas/postdoc/gr/cactus/ET_trunk/arrangements/CactusTes"..., "/home/rhaas/postdoc/gr/cactus/ET_trunk/repos/flesh/lib/sbin/."...) called at /home/rhaas/postdoc/gr/cactus/ET_trunk/repos/flesh/lib/sbin/ScheduleParser.pl line 95
main::create_schedule_database("TestReadWrite", "/home/rhaas/postdoc/gr/cactus/ET_trunk/arrangements/CactusTes"..., "Cactus", "/home/rhaas/postdoc/gr/cactus/ET_trunk/src") called at /home/rhaas/postdoc/gr/cactus/ET_trunk/lib/sbin/CST line 168
CST ERROR IN FILE '/home/rhaas/postdoc/gr/cactus/ET_trunk/arrangements/CactusTest/TestReadWrite/schedule.ccl' make[1]: *** [/home/rhaas/postdoc/gr/cactus/ET_trunk/lib/make/make.configuration:213: /home/rhaas/postdoc/gr/cactus/ET_trunk/configs/testrdwr/config-data/make.thornlist] Error 255
which is not very helpful since it does not seem to give any indication what (or even what line) caused the parse error.
Comments (2)
-
reporter -
reporter - changed status to resolved
- Log in to comment
One thing that is wrong is obviously the use of
STOREAGE
instead ofSTORAGE
, though fixing that doe s not yet makeschedule.ccl
parse (or produce a more helpful error message).Using
WRITES
andREADS
and using a command “,” in between the variables in the lists lets the file parse.Note that this ticket is not about
schedule.ccl
not parsing but about the fact that the produced error message is not helpful in finding out what is wrong with it.