Bug fixed
This commit is contained in:
parent
21b64e6287
commit
1d51112f96
|
@ -250,6 +250,16 @@ bool parse::scalars_reduction()
|
||||||
parser.push(t);
|
parser.push(t);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if((tbl[2]!=__scalar) && (tbl[2]!=__identifier) && (tbl[1]==__sub_operator) && (tbl[0]==__scalar))
|
||||||
|
{
|
||||||
|
parse_unit t;
|
||||||
|
t.type=__scalar;// !
|
||||||
|
t.line=parser.top().line;
|
||||||
|
for(int i=0;i<2;++i)
|
||||||
|
parser.pop();
|
||||||
|
parser.push(t);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
else if(((tbl[2]==__identifier) || (tbl[2]==__identifiers)) && (tbl[1]==__comma) && (tbl[0]==__scalar))
|
else if(((tbl[2]==__identifier) || (tbl[2]==__identifiers)) && (tbl[1]==__comma) && (tbl[0]==__scalar))
|
||||||
{
|
{
|
||||||
parse_unit t;
|
parse_unit t;
|
||||||
|
@ -291,6 +301,16 @@ bool parse::identifier_check()
|
||||||
parser.push(t);
|
parser.push(t);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if((tbl[2]!=__scalar) && (tbl[2]!=__identifier) && (tbl[1]==__sub_operator) && (tbl[0]==__identifier))
|
||||||
|
{
|
||||||
|
parse_unit t;
|
||||||
|
t.type=__identifier;
|
||||||
|
t.line=parser.top().line;
|
||||||
|
for(int i=0;i<2;++i)
|
||||||
|
parser.pop();
|
||||||
|
parser.push(t);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
else if((tbl[2]==__identifier) && (tbl[1]==__dot) && (tbl[0]==__identifier))
|
else if((tbl[2]==__identifier) && (tbl[1]==__dot) && (tbl[0]==__identifier))
|
||||||
{
|
{
|
||||||
parse_unit t;
|
parse_unit t;
|
||||||
|
@ -1119,6 +1139,7 @@ void parse::print_parser(token_list& lexer)
|
||||||
bool reduction_complete=false;
|
bool reduction_complete=false;
|
||||||
while(!reduction_complete)
|
while(!reduction_complete)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(scalars_reduction())
|
if(scalars_reduction())
|
||||||
{
|
{
|
||||||
std::cout<<"line "<<parser.top().line<<": Scalars"<<std::endl;
|
std::cout<<"line "<<parser.top().line<<": Scalars"<<std::endl;
|
||||||
|
|
Loading…
Reference in New Issue