7 More Discussions You Might Find Interesting
hello, actually i want to generate rgram in yacc able to do do several operations separated by ';' and after show all the results separated by ';' again.
My code do just one operations and i couldn' t find solution to do several ones separated by ';'. I thought may be i can do a do... while but i... (0 Replies)
Discussion started by: zolafencer
I'm struggling with a simple but at the same time complicated problem related to yacc :wall: Maybe someone can help me with this :confused:
I'm working on a big project and it's hard for me to show the problem exactly on my code, but I will give a model of it.
Before I had this kind... (2 Replies)
Discussion started by: sisi
How to specify the token length in a yacc file?
sample input format
<field1,data type ans,fixed length 6> followed by <field2,data type ans,fixed length 3>
Example i/p and o/p
Sample Input: "ab* d2 9o"
O/p : "Field1 Field2 "
record :... (1 Reply)
Discussion started by: sungita
I need to develop a parser which should match something like
1. text a=5 " a=20";
2. text a=..."
3 text a=..."
I have used this regular expression in my Lex file to generate the tokens:
\".\s*.*\s.\" (8 Replies)
Discussion started by: vishwa787
I am using lex for my application scanning and I need to skip some lines for which I don't know the exact pattern.
So, could anybody tell me the regular expression to display lines NOT beginning with the specified pattern.
I know how to display lines beginning with the... (1 Reply)
Discussion started by: axes
I need to read one chinese char using lex. I tried using "." ( period ) for pattern matching but in vain.
Could anyone suggest me how do i proceeed.
Sample pgm: to read a chinese char in single quotes.
. ... (0 Replies)
Discussion started by: suman_jakkula
7. Shell Programming and Scripting
this is my lex file ------------ test.l
how do i compile it
$ lex test.l cc lex.yy.c -o test -ll <------|
if this is correct do i add this line--------| @the command line or does it... (0 Replies)
Discussion started by: sinner
YACC(1) BSD General Commands Manual YACC(1)
yacc -- an LALR(1) parser generator
yacc [-dlrtv] [-b file_prefix] [-o output_filename] [-p symbol_prefix] filename
Yacc reads the grammar specification in the file filename and generates an LR(1) parser for it. The parsers consist of a set of LALR(1)
parsing tables and a driver routine written in the C programming language. Yacc normally writes the parse tables and the driver routine to
the file y.tab.c.
The following options are available:
Change the prefix prepended to the output file names to the string denoted by file_prefix. The default prefix is the character y.
-d Cause the header file y.tab.h to be written.
-l If the -l option is not specified, yacc will insert #line directives in the generated code. The #line directives let the C compiler
relate errors in the generated code to the user's original code. If the -l option is specified, yacc will not insert the #line
directives. Any #line directives specified by the user will be retained.
Cause yacc to write the generated code to output_filename instead of the default file, y.tab.c.
Change the prefix prepended to yacc-generated symbols to the string denoted by symbol_prefix. The default prefix is the string yy.
-r Cause yacc to produce separate files for code and tables. The code file is named y.code.c, and the tables file is named y.tab.c.
-t Change the preprocessor directives generated by yacc so that debugging statements will be incorporated in the compiled code.
-v Cause a human-readable description of the generated parser to be written to the file y.output.
If the environment variable TMPDIR is set, the string denoted by TMPDIR will be used as the name of the directory where the temporary files
If there are rules that are never reduced, the number of such rules is reported on standard error. If there are any LALR(1) conflicts, the
number of conflicts is reported on standard error.
May 24, 1993 BSD