lex
How to create a parser which tokenizes a list of words taken from a file?
I am trying to do a syntax text corrector for my compilers\' class. The idea is: I have some rules, which are inherent to the language (in my case, Portuguese), like \"A valid phrase is SUBJECT VERB A[详细]
2023-01-05 06:00 分类:问答getting started with lex
I need to format some hexdump like this: 00010: 02 03 04 05 00020:开发者_如何学编程 02 03 04 08[详细]
2022-12-30 16:53 分类:问答Tools to build a UI markup language parser
For a school project, I need to implement a parser for a (probably XML-based) markup language for User Interfaces. Based on the input it generates a HTML document with various UI components (textareas[详细]
2022-12-30 08:23 分类:问答Indentation control while developing a small python like language
I\'m developing a small python like language using flex, byacc (for lexical and parsing) and C++, but i have a few questions regarding scope control.[详细]
2022-12-29 04:40 分类:问答Do lex and yacc provide optimized code?
Do Lex and Yacc provide optimized code or is it re开发者_JAVA百科quired that we write our own code manually for higher performance?The code you write has a substantial effect on the speed, especially[详细]
2022-12-29 03:26 分类:问答unrecognized rule in lex
I\'m writing a program in lex, and it gives me the following error: scanner.l:49: unrecognized rule Line 49 is: {number}{return(NUM);}[详细]
2022-12-28 06:06 分类:问答what should the output of a lexer be in c?
#include&开发者_如何学JAVAlt;stdio.h> int main() { int a,b; a=a+b; printf(\"%d\",a); return 0; } what should be the output if this code is passed through a lexerthe lexer just tokenizes the stre[详细]
2022-12-27 20:05 分类:问答Unintentional concatenation in Bison/Yacc grammar
I am experimenting with lex and yacc and have run into a strange issue, but I think it would be best to show you my code before detailing the issue. This is my lexer:[详细]
2022-12-27 17:29 分类:问答error in coding a lexer in c
#include<stdio.h> #include<ctype.h> #include<string.h> /* this is a lexer which recognizes constants , variables ,symbols, identifiers , functions , comments and also header files .[详细]
2022-12-27 04:49 分类:问答how to parse from command line arguements in yacc?
how to parse from command line arguements in yacc ? of course i undefined input in both lex & yacc and then wrote[详细]
2022-12-27 01:18 分类:问答