search for: equal_assign

Displaying 2 results from an estimated 2 matches for "equal_assign".

2009 Nov 25
1
Question R's parser : - parsing "x=\n 1"
...; { return xxvalue($1,3,&@1); } | expr_or_assign ';' { return xxvalue($1,4,&@1); } | error { YYABORT; } ; So this should be of the 3rd form. Also, the expr_or_assign is of the 2nd form in expr_or_assign : expr { $$ = $1; } | equal_assign { $$ = $1; } ; where equal_assign is equal_assign : expr EQ_ASSIGN expr_or_assign { $$ = xxbinary($2,$1,$3); } When the parser sees 'x' and '=' it expects an expr_or_assign and we know it will receive an expr. However, the expr can...
2019 Jul 05
0
parse() drops parse data when encountering `` (bug?)
...in parse(text = target_text2, keep.source = TRUE, srcfile = tstfile): /tmp/RtmpXuGaL1/file5434ebd1f95:1:9: unexpected '{' #> 1: foo = 1 { #> ^ getParseData(tstfile) #> line1 col1 line2 col2 id parent token terminal text #> 8 1 1 1 7 8 0 equal_assign FALSE #> 1 1 1 1 3 1 3 SYMBOL TRUE foo #> 3 1 1 1 3 3 8 expr FALSE #> 2 1 5 1 5 2 8 EQ_ASSIGN TRUE = #> 4 1 7 1 7 4 5 NUM_CONST TRUE 1 #> 5 1 7 1...