yacc
How to write flex and bison file parsing this language?
Let\'s define a language: VAR := [0-9A-Za-z_]+ Exp := VAR VAR,\'=\',VAR \'(\', Exp, \')\' Exp, \'&\', Exp[详细]
2023-04-12 04:09 分类:问答Bison/YACC - avoid reduce/reduce conflict with two negation rules
The following grammar (where INTEGER is a sequence of digits) gives rise to a reduce/reduce conflict, because e.g. -4 can be reduced by expr -> -expr or expr -> num -> -INTEGER. In开发者_JAVA技巧 my g[详细]
2023-04-10 10:24 分类:问答building c++ config file parser using lex and yacc
I am trying to build config file parser (c++ application)from scratch using tools like lex and yacc. The parser will be able to parse files like[详细]
2023-04-10 02:44 分类:问答yacc - field has incomplete type
yacc doesn\'t seem to like when my tokens are of a type that I defined. At the top of my grammar (.y) file in a %{ ... %} block, I include a header file that defines the following structure:[详细]
2023-04-10 02:33 分类:问答error with bison
I have a simple rule in my开发者_如何学Go grammar which looks for sequence of whitespaces: ws: ws|\' \';[详细]
2023-04-05 20:41 分类:问答Where can I find a yacc grammar for ECMAscript/Actionscript/Javascript [closed]
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari[详细]
2023-04-05 02:29 分类:问答How to replace macros with a grammar-based parser?
I need a parser for an exotic programming language. I wrote a grammar for it and used a parser generator (PEGjs) to generate the parser. That works perfectly... except for one thing: macros (that repl[详细]
2023-04-04 17:06 分类:问答warning Bison compilation
am developping a compiler using flex/bison. I have this warning in my build output. warning:type c开发者_开发问答lash (\'s\' \'\') on default action[详细]
2023-04-03 06:29 分类:问答Bison: print stack with names on error
How can I display items on stack in yyerror function? I\'ve found yy_stack_print but it only prints numb开发者_开发知识库ers and requires 2 arguments which I don\'t how how to obtain.Unfortunately the[详细]
2023-03-29 08:41 分类:问答assigning ASCII values to variables in bison
I want my parser to handle case like: a=\'A\'; // a should be set with ASCII(A) i.e 65 My token declaration looks like :[详细]
2023-03-27 19:19 分类:问答