[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[coldsync-hackers] Weirdness when adding new tokens to parser



I am new to ColdSync but interested in trying out some modifications.  Not
wanting to break anything that is already there, I am attempting to add my
stuff by modifying the parser to recognize a new listen type.

I used the listen types of NET and SERIAL as a model for adding the new one.
I believe I have made all the right changes in parser.y and lexer.l.  And
yet, it does not work.  When the new keyword is encountered in a listen
block in my coldsyncrc file, the trace just says "Found word [myword],"
followed by "Unrecognized listen type."

Feeling curious, I tried to make a simpler change and just changed one line
in lexer.l
From: "serial" { KEYWORD(SERIAL) }
To:   "serialtwo" { KEYWORD(SERIAL) }

I thought that after re-building, this change *should* allow me to
substitute

"listen serial {" with
"listen serialtwo {"

in my coldsyncrc file.  Yet, this does not work either.  So, it seems I am
missing something major about how to add a new keyword (or modify an
existing one) in lexer.l.  Does anyone have a notion where I am going wrong?

BTW, I have tried this with both v1.4.6 and 2.0.0 and see the same issue.

Best Regards,
Brian Holdsworth


-- 
This message was sent through the coldsync-hackers mailing list.  To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body.  For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.