Lines Matching defs:lexer

52  * 4 Unable to allocate memory for, or create lexer.
168 * quit macro is used instead of exit. quit always trys to close the lexer
232 isc_lex_t *lexer = NULL; /*%< lexer for use to use in parsing input */
233 isc_mem_t *lex_mctx = NULL; /*%< memory context for lexer */
235 isc_buffer_t lex_buffer; /*%< buffer for lexer during add operation */
533 isc_token_t token; /* token from lexer */
547 result = isc_lex_gettoken(lexer, opt, &token);
598 " Skipping line.", isc_lex_getsourceline(lexer) - 1);
601 "line %lu. Skipping line\n", isc_lex_getsourceline(lexer) - 1);
627 isc_lex_getsourceline(lexer));
710 /*% Create & open lexer to parse input data */
716 /* check if we already opened the lexer, if we did, return success */
717 if (lexer != NULL)
720 /* allocate memory for lexer, and verify it was allocated */
723 fprintf(stderr, "unexpected error creating lexer\n");
727 /* create lexer */
728 result = isc_lex_create(lex_mctx, 1500, &lexer);
730 fprintf(stderr, "unexpected error creating lexer\n");
733 isc_lex_setcomments(lexer, ISC_LEXCOMMENT_C | /* Allow C comments */
742 /*% Close the lexer, and cleanup memory */
747 /* If lexer is still open, close it & destroy it. */
748 if (lexer != NULL) {
749 isc_lex_close(lexer);
750 isc_lex_destroy(&lexer);
753 /* if lexer memory is still allocated, destroy it. */
771 /* if open lexer fails it alread prints error messages. */
779 /* tell lexer to use buffer as input */
780 if (isc_lex_openbuffer(lexer, &lex_buffer) != ISC_R_SUCCESS) {
781 fprintf(stderr, "unexpected error opening lexer buffer");
802 /* if open lexer fails it already prints error messages. */
808 if (isc_lex_openstream(lexer, stdin) != ISC_R_SUCCESS) {
809 fprintf(stderr, "unexpected error opening stdin by lexer.");
812 } else if (isc_lex_openfile(lexer, bulk_file) != ISC_R_SUCCESS) {
813 fprintf(stderr, "unexpected error opening %s by lexer.", bulk_file);