Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit a35d66e

Browse files
perostOpenModelica-Hudson
authored andcommitted
Fix parsing of imports.
- Fixed the Modelica parser so that it conforms to the Modelica syntax and rejects fully qualified imports.
1 parent 5816b70 commit a35d66e

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

Parser/Modelica.g

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,24 +1383,14 @@ name_path2 returns [void* ast]
13831383
;
13841384
13851385
name_path_star returns [void* ast, int unqual, void* lst]
1386-
@init{ dot = 0; np.lst = 0; np.unqual = 0; } :
1387-
(dot=DOT)? np=name_path_star2
1388-
{
1389-
$ast = dot ? Absyn__FULLYQUALIFIED(np.ast) : np.ast;
1390-
$unqual = np.unqual;
1391-
$lst = np.lst;
1392-
}
1393-
;
1394-
1395-
name_path_star2 returns [void* ast, int unqual, void* lst]
13961386
@init{ id = 0; uq = 0; mlst = 0; p.ast = 0; p.lst = 0; } :
13971387
{ LA(2) != DOT || LA(3) == LBRACE }? (id=IDENT|id=CODE) ( uq=STAR_EW | DOT LBRACE mlst=name_path_group RBRACE )?
13981388
{
13991389
$ast = Absyn__IDENT(token_to_scon(id));
14001390
$unqual = uq != 0;
14011391
$lst = mlst;
14021392
}
1403-
| (id=IDENT|id=CODE) DOT p=name_path_star2
1393+
| (id=IDENT|id=CODE) DOT p=name_path_star
14041394
{
14051395
$ast = Absyn__QUALIFIED(token_to_scon(id),p.ast);
14061396
$unqual = p.unqual;

0 commit comments

Comments
 (0)