Lines Matching defs:lexer

61  * 4 Unable to allocate memory for, or create lexer.
177 * quit macro is used instead of exit. quit always trys to close the lexer
241 isc_lex_t *lexer = NULL; /*%< lexer for use to use in parsing input */
242 isc_mem_t *lex_mctx = NULL; /*%< memory context for lexer */
244 isc_buffer_t lex_buffer; /*%< buffer for lexer during add operation */
542 isc_token_t token; /* token from lexer */
556 result = isc_lex_gettoken(lexer, opt, &token);
607 " Skipping line.", isc_lex_getsourceline(lexer) - 1);
610 "line %lu. Skipping line\n", isc_lex_getsourceline(lexer) - 1);
636 isc_lex_getsourceline(lexer));
719 /*% Create & open lexer to parse input data */
725 /* check if we already opened the lexer, if we did, return success */
726 if (lexer != NULL)
729 /* allocate memory for lexer, and verify it was allocated */
732 fprintf(stderr, "unexpected error creating lexer\n");
736 /* create lexer */
737 result = isc_lex_create(lex_mctx, 1500, &lexer);
739 fprintf(stderr, "unexpected error creating lexer\n");
742 isc_lex_setcomments(lexer, ISC_LEXCOMMENT_C | /* Allow C comments */
751 /*% Close the lexer, and cleanup memory */
756 /* If lexer is still open, close it & destroy it. */
757 if (lexer != NULL) {
758 isc_lex_close(lexer);
759 isc_lex_destroy(&lexer);
762 /* if lexer memory is still allocated, destroy it. */
780 /* if open lexer fails it alread prints error messages. */
788 /* tell lexer to use buffer as input */
789 if (isc_lex_openbuffer(lexer, &lex_buffer) != ISC_R_SUCCESS) {
790 fprintf(stderr, "unexpected error opening lexer buffer");
811 /* if open lexer fails it already prints error messages. */
817 if (isc_lex_openstream(lexer, stdin) != ISC_R_SUCCESS) {
818 fprintf(stderr, "unexpected error opening stdin by lexer.");
821 } else if (isc_lex_openfile(lexer, bulk_file) != ISC_R_SUCCESS) {
822 fprintf(stderr, "unexpected error opening %s by lexer.", bulk_file);