Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
9d918ba5
Commit
9d918ba5
authored
Apr 20, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to install antlr 2.7.3 (failed)
parent
d0384dce
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
53 additions
and
7 deletions
+53
-7
wb/lib/wb/src/wb_vrepwbl.cpp
wb/lib/wb/src/wb_vrepwbl.cpp
+6
-1
wb/lib/wb/src/wb_wblnode.h
wb/lib/wb/src/wb_wblnode.h
+23
-0
wb/lib/wb/src/wb_wblparserTokenTypes.hpp
wb/lib/wb/src/wb_wblparserTokenTypes.hpp
+11
-2
wb/lib/wb/src/wb_wblparserTokenTypes.txt
wb/lib/wb/src/wb_wblparserTokenTypes.txt
+1
-1
wb/lib/wb/src/wb_wblvocabTokenTypes.hpp
wb/lib/wb/src/wb_wblvocabTokenTypes.hpp
+11
-2
wb/lib/wb/src/wb_wblvocabTokenTypes.txt
wb/lib/wb/src/wb_wblvocabTokenTypes.txt
+1
-1
No files found.
wb/lib/wb/src/wb_vrepwbl.cpp
View file @
9d918ba5
...
...
@@ -1210,12 +1210,17 @@ int wb_vrepwbl::load_files( const char *file_spec)
file
[
file_cnt
]
->
parser
=
new
wb_wblparser
(
*
file
[
file_cnt
]
->
lexer
);
file
[
file_cnt
]
->
parser
->
setFilename
(
found_file
);
// Antlr 2.7.3 seems to want an ASTFactory here...
// wb_wblfactory *factory = new wb_wblfactory();
// file[file_cnt]->parser->setASTNodeFactory( factory);
file
[
file_cnt
]
->
parser
->
setASTNodeFactory
(
wb_wblnode
::
factory
);
try
{
// Parse the input expression
file
[
file_cnt
]
->
parser
->
unit
();
file
[
file_cnt
]
->
rootAST
=
file
[
file_cnt
]
->
parser
->
getAST
();
AST
*
a
=
file
[
file_cnt
]
->
parser
->
getAST
();
file
[
file_cnt
]
->
rootAST
=
(
wb_wblnode
*
)
a
;
if
(
!
file
[
file_cnt
]
->
rootAST
)
{
error
(
"File empty"
,
found_file
,
0
);
file_cnt
--
;
...
...
wb/lib/wb/src/wb_wblnode.h
View file @
9d918ba5
...
...
@@ -3,6 +3,7 @@
#include <iostream.h>
#include "antlr/CommonAST.hpp"
#include "antlr/ASTFactory.hpp"
#include "pwr.h"
#include "wb_name.h"
#include "wb_wblfile.h"
...
...
@@ -262,6 +263,28 @@ public:
wbl_object
*
o
;
};
#if 0
// Factory is needed in Antrl 2.7.3, not used in 2.7.1
class wb_wblfactory : public ASTFactory {
public:
typedef RefAST (*factory_type)();
wb_wblfactory() : nodeFactory(&wb_wblnode::factory) {}
ref_wblnode create( ref_wblnode tr) {
if ( !tr)
return (ref_wblnode) nullAST;
ref_wblnode t = (ref_wblnode)(nodeFactory)();
t->initialize(tr);
return t;
}
ref_wblnode dup( ref_wblnode t) {
return create(t);
}
private:
factory_type nodeFactory;
};
#endif
#endif
...
...
wb/lib/wb/src/wb_wblparserTokenTypes.hpp
View file @
9d918ba5
#ifndef INC_wb_wblparserTokenTypes_hpp_
#define INC_wb_wblparserTokenTypes_hpp_
/* $ANTLR 2.7.1: "wb_wblparser.g" -> "wb_wblparserTokenTypes.hpp"$ */
struct
wb_wblparserTokenTypes
{
/* $ANTLR 2.7.3 (20040413-1): "wb_wblparser.g" -> "wb_wblparserTokenTypes.hpp"$ */
#ifndef CUSTOM_API
# define CUSTOM_API
#endif
#ifdef __cplusplus
struct
CUSTOM_API
wb_wblparserTokenTypes
{
#endif
enum
{
EOF_
=
1
,
OBJECT
=
4
,
...
...
@@ -38,5 +45,7 @@ struct wb_wblparserTokenTypes {
SWEC
=
34
,
NULL_TREE_LOOKAHEAD
=
3
};
#ifdef __cplusplus
};
#endif
#endif
/*INC_wb_wblparserTokenTypes_hpp_*/
wb/lib/wb/src/wb_wblparserTokenTypes.txt
View file @
9d918ba5
// $ANTLR 2.7.
1
: wb_wblparser.g -> wb_wblparserTokenTypes.txt$
// $ANTLR 2.7.
3 (20040413-1)
: wb_wblparser.g -> wb_wblparserTokenTypes.txt$
wb_wblparser // output token vocab name
OBJECT=4
ENDOBJECT=5
...
...
wb/lib/wb/src/wb_wblvocabTokenTypes.hpp
View file @
9d918ba5
#ifndef INC_wb_wblvocabTokenTypes_hpp_
#define INC_wb_wblvocabTokenTypes_hpp_
/* $ANTLR 2.7.1: "wb_wbllexer.g" -> "wb_wblvocabTokenTypes.hpp"$ */
struct
wb_wblvocabTokenTypes
{
/* $ANTLR 2.7.3 (20040413-1): "wb_wbllexer.g" -> "wb_wblvocabTokenTypes.hpp"$ */
#ifndef CUSTOM_API
# define CUSTOM_API
#endif
#ifdef __cplusplus
struct
CUSTOM_API
wb_wblvocabTokenTypes
{
#endif
enum
{
EOF_
=
1
,
OBJECT
=
4
,
...
...
@@ -38,5 +45,7 @@ struct wb_wblvocabTokenTypes {
SWEC
=
34
,
NULL_TREE_LOOKAHEAD
=
3
};
#ifdef __cplusplus
};
#endif
#endif
/*INC_wb_wblvocabTokenTypes_hpp_*/
wb/lib/wb/src/wb_wblvocabTokenTypes.txt
View file @
9d918ba5
// $ANTLR 2.7.
1
: wb_wbllexer.g -> wb_wblvocabTokenTypes.txt$
// $ANTLR 2.7.
3 (20040413-1)
: wb_wbllexer.g -> wb_wblvocabTokenTypes.txt$
wb_wblvocab // output token vocab name
OBJECT=4
ENDOBJECT=5
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment