Re: Purpose of $default and $end

2009-05-06 Thread Akim Demaille
Le 2 mai 09 à 11:21, Samkit Jain a écrit : When I checked the states generated by the parser, I found that there is a difference in the way $default and $end are created for some states. Can someone please tell me basic principle behind $end and $default terminal symbols. $default is no

Re: Purpose of $default and $end

2009-05-02 Thread Samkit Jain
Small correction: The 2 rules are: sentence: /* empty */ | sentence line optional_comma '$'{ printf("\nInput line: >>>%s ::: %s <<<\n", $2, $3); } ; sentence: line optional_comma '$'{ printf("\nInput line: >>>%s ::: %s <<<\n", $2, $3); } ; On Sat, May 2, 2

Purpose of $default and $end

2009-05-02 Thread Samkit Jain
Hi, And I created a small program to test some small fundamentals and found that there is a lot of difference between the below 2 rules. sentence: /* empty */ | sentence line optional_comma '$'{ printf("\nInput line: >>>%s ::: %s <<<\n", $2, $3); } ; sentence: sentence