/*************************************************************************** * Copyright (c) 2011, Broadcom Corporation * All Rights Reserved * Confidential Property of Broadcom Corporation * * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. * * $brcm_Workfile: $ * $brcm_Revision: $ * $brcm_Date: $ * * Module Description: parser for CCAD input file format * * Revision History: * * $brcm_Log: $ * * ***************************************************************************/ #if !defined(__input_parser_h__) #define __input_parser_h__ #define MATCHED_EOF 99 #define MATCHED_ADDR 5 #define MATCHED_PID 9 #define MATCHED_MSG 13 /* routines to parse hex files of messages */ /* initialize parser */ void iparser_init(unsigned char * buffer, unsigned int size); /* process character */ int iparser_process(int ch); /* return size of the output so far */ unsigned int iparser_size(void); /* routines to parse keyword=number format */ /* initialize keyword parser */ void iparser_init_keyw(void); /* process expected keyword character */ int iparser_process_keyw(int ch); #define MATCHED_XNUMBER 2 /* initialize hex parser */ void iparser_init_hex(void); /* process expected hex character */ int iparser_process_hex(int ch, int * value); #endif