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
cd9aa667
Commit
cd9aa667
authored
Nov 15, 2005
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapted to antlr-2.7.4
parent
07b75a8b
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1784 additions
and
1738 deletions
+1784
-1738
wb/lib/wb/src/wb_vrepwbl.cpp
wb/lib/wb/src/wb_vrepwbl.cpp
+5
-4
wb/lib/wb/src/wb_wbllexer.cpp
wb/lib/wb/src/wb_wbllexer.cpp
+1556
-1552
wb/lib/wb/src/wb_wbllexer.hpp
wb/lib/wb/src/wb_wbllexer.hpp
+12
-9
wb/lib/wb/src/wb_wblparser.cpp
wb/lib/wb/src/wb_wblparser.cpp
+152
-158
wb/lib/wb/src/wb_wblparser.hpp
wb/lib/wb/src/wb_wblparser.hpp
+35
-9
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 @
cd9aa667
/*
* Proview $Id: wb_vrepwbl.cpp,v 1.4
6 2005-10-21 16:11:23
claes Exp $
* Proview $Id: wb_vrepwbl.cpp,v 1.4
7 2005-11-15 15:43:29
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1339,9 +1339,10 @@ int wb_vrepwbl::load_files( const char *file_spec)
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
);
ASTFactory
wblfactory
(
"ref_wblnode"
,
wb_wblnode
::
factory
);
file
[
file_cnt
]
->
parser
->
initializeASTFactory
(
wblfactory
);
file
[
file_cnt
]
->
parser
->
setASTNodeFactory
(
&
wblfactory
);
// file[file_cnt]->parser->setASTNodeFactory( wb_wblnode::factory);
try
{
// Parse the input expression
...
...
wb/lib/wb/src/wb_wbllexer.cpp
View file @
cd9aa667
This source diff could not be displayed because it is too large. You can
view the blob
instead.
wb/lib/wb/src/wb_wbllexer.hpp
View file @
cd9aa667
#ifndef INC_wb_wbllexer_hpp_
#define INC_wb_wbllexer_hpp_
#include
"antlr/config.hpp"
/* $ANTLR 2.7.
1
: "wb_wbllexer.g" -> "wb_wbllexer.hpp"$ */
#include
"antlr/CommonToken.hpp"
#include
"antlr/InputBuffer.hpp"
#include
"antlr/BitSet.hpp"
#include
<antlr/config.hpp>
/* $ANTLR 2.7.
4
: "wb_wbllexer.g" -> "wb_wbllexer.hpp"$ */
#include
<antlr/CommonToken.hpp>
#include
<antlr/InputBuffer.hpp>
#include
<antlr/BitSet.hpp>
#include "wb_wblvocabTokenTypes.hpp"
#include
"antlr/CharScanner.hpp"
class
wb_wbllexer
:
public
ANTLR_USE_NAMESPACE
(
antlr
)
CharScanner
,
public
wb_wblvocabTokenTypes
{
#include
<antlr/CharScanner.hpp>
class
CUSTOM_API
wb_wbllexer
:
public
ANTLR_USE_NAMESPACE
(
antlr
)
CharScanner
,
public
wb_wblvocabTokenTypes
{
#line 1 "wb_wbllexer.g"
#line 15 "wb_wbllexer.hpp"
private:
void
initLiterals
();
public
:
bool
getCaseSensitiveLiterals
()
const
;
bool
getCaseSensitiveLiterals
()
const
{
return
true
;
}
public
:
wb_wbllexer
(
ANTLR_USE_NAMESPACE
(
std
)
istream
&
in
);
wb_wbllexer
(
ANTLR_USE_NAMESPACE
(
antlr
)
InputBuffer
&
ib
);
...
...
wb/lib/wb/src/wb_wblparser.cpp
View file @
cd9aa667
This diff is collapsed.
Click to expand it.
wb/lib/wb/src/wb_wblparser.hpp
View file @
cd9aa667
#ifndef INC_wb_wblparser_hpp_
#define INC_wb_wblparser_hpp_
#include
"antlr/config.hpp"
/* $ANTLR 2.7.
1
: "wb_wblparser.g" -> "wb_wblparser.hpp"$ */
#include
"antlr/TokenStream.hpp"
#include
"antlr/TokenBuffer.hpp"
#include
<antlr/config.hpp>
/* $ANTLR 2.7.
4
: "wb_wblparser.g" -> "wb_wblparser.hpp"$ */
#include
<antlr/TokenStream.hpp>
#include
<antlr/TokenBuffer.hpp>
#include "wb_wblparserTokenTypes.hpp"
#include
"antlr/LLkParser.hpp"
#include
<antlr/LLkParser.hpp>
#line 8 "wb_wblparser.g"
...
...
@@ -19,11 +19,14 @@ extern int wblparser_error_cnt;
#include "wb_wblnode.h"
#line 24 "wb_wblparser.hpp"
class
wb_wblparser
:
public
ANTLR_USE_NAMESPACE
(
antlr
)
LLkParser
,
public
wb_wblparserTokenTypes
{
class
CUSTOM_API
wb_wblparser
:
public
ANTLR_USE_NAMESPACE
(
antlr
)
LLkParser
,
public
wb_wblparserTokenTypes
{
// This_declarations_should_be_moved_inside_parser_class_in_wb_wblparser_hpp_!!
void
reportError
(
const
RecognitionException
&
ex
);
#line 1 "wb_wblparser.g"
#line 28 "wb_wblparser.hpp"
public
:
void
initializeASTFactory
(
ANTLR_USE_NAMESPACE
(
antlr
)
ASTFactory
&
factory
);
protected
:
wb_wblparser
(
ANTLR_USE_NAMESPACE
(
antlr
)
TokenBuffer
&
tokenBuf
,
int
k
);
public
:
...
...
@@ -33,6 +36,19 @@ protected:
public
:
wb_wblparser
(
ANTLR_USE_NAMESPACE
(
antlr
)
TokenStream
&
lexer
);
wb_wblparser
(
const
ANTLR_USE_NAMESPACE
(
antlr
)
ParserSharedInputState
&
state
);
int
getNumTokens
()
const
{
return
wb_wblparser
::
NUM_TOKENS
;
}
const
char
*
getTokenName
(
int
type
)
const
{
if
(
type
>
getNumTokens
()
)
return
0
;
return
wb_wblparser
::
tokenNames
[
type
];
}
const
char
*
const
*
getTokenNames
()
const
{
return
wb_wblparser
::
tokenNames
;
}
public
:
void
unit
();
public
:
void
volume
();
public
:
void
sobject
();
...
...
@@ -44,12 +60,22 @@ public:
public
:
void
value
();
public
:
void
oname
();
public
:
ref_wblnode
getAST
();
ANTLR_USE_NAMESPACE
(
antlr
)
RefAST
getAST
()
{
return
ANTLR_USE_NAMESPACE
(
antlr
)
RefAST
(
returnAST
);
}
protected
:
ref_wblnode
returnAST
;
private
:
static
const
char
*
_tokenNames
[];
static
const
char
*
tokenNames
[];
#ifndef NO_STATIC_CONSTS
static
const
int
NUM_TOKENS
=
36
;
#else
enum
{
NUM_TOKENS
=
36
};
#endif
static
const
unsigned
long
_tokenSet_0_data_
[];
static
const
ANTLR_USE_NAMESPACE
(
antlr
)
BitSet
_tokenSet_0
;
...
...
wb/lib/wb/src/wb_wblparserTokenTypes.hpp
View file @
cd9aa667
#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.4: "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
,
...
...
@@ -39,5 +46,7 @@ struct wb_wblparserTokenTypes {
SWEC
=
35
,
NULL_TREE_LOOKAHEAD
=
3
};
#ifdef __cplusplus
};
#endif
#endif
/*INC_wb_wblparserTokenTypes_hpp_*/
wb/lib/wb/src/wb_wblparserTokenTypes.txt
View file @
cd9aa667
// $ANTLR 2.7.
1
: wb_wblparser.g -> wb_wblparserTokenTypes.txt$
// $ANTLR 2.7.
4
: 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 @
cd9aa667
#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.4: "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
,
...
...
@@ -39,5 +46,7 @@ struct wb_wblvocabTokenTypes {
SWEC
=
35
,
NULL_TREE_LOOKAHEAD
=
3
};
#ifdef __cplusplus
};
#endif
#endif
/*INC_wb_wblvocabTokenTypes_hpp_*/
wb/lib/wb/src/wb_wblvocabTokenTypes.txt
View file @
cd9aa667
// $ANTLR 2.7.
1
: wb_wbllexer.g -> wb_wblvocabTokenTypes.txt$
// $ANTLR 2.7.
4
: 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