Skip to content

Commit e71b96f

Browse files
committed
Reorganize new parsing modules
1 parent 71e28f6 commit e71b96f

File tree

7 files changed

+53
-1106
lines changed

7 files changed

+53
-1106
lines changed

src/robot/parsing/newparser/builder.py renamed to src/robot/parsing/builder.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,28 @@
1+
# Copyright 2008-2015 Nokia Networks
2+
# Copyright 2016- Robot Framework Foundation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
116
import os
217

318
from robot.errors import DataError
419
from robot.output import LOGGER
5-
from robot.parsing.vendor import yacc
6-
from robot.parsing.lexer import TestCaseFileLexer, ResourceFileLexer
720
from robot.utils import Utf8Reader
821

22+
from .lexer import TestCaseFileLexer, ResourceFileLexer
923
from .nodes import TestCaseSection
1024
from .parser import RobotFrameworkParser
25+
from .vendor import yacc
1126

1227

1328
def get_test_case_file_ast(source):

src/robot/parsing/newparser/__init__.py

Whitespace-only changes.

src/robot/parsing/newparser/nodes.py renamed to src/robot/parsing/nodes.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
# Copyright 2008-2015 Nokia Networks
2+
# Copyright 2016- Robot Framework Foundation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
116
from ast import AST
217
import re
318

src/robot/parsing/newparser/parser.py renamed to src/robot/parsing/parser.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
1-
from robot.parsing.lexer.tokens import Token
2-
1+
# Copyright 2008-2015 Nokia Networks
2+
# Copyright 2016- Robot Framework Foundation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
from .lexer import Token
317
from .nodes import (
418
DataFile, SettingSection, VariableSection, TestCaseSection,
519
KeywordSection, Variable, DocumentationSetting, SuiteSetupSetting,
@@ -8,7 +22,8 @@
822
ForceTagsSetting, DefaultTagsSetting, LibrarySetting,
923
ResourceSetting, VariablesSetting, SetupSetting, TeardownSetting,
1024
TimeoutSetting, TagsSetting, TemplateSetting, ArgumentsSetting,
11-
ReturnSetting, TemplateArguments, TestCase, Keyword, KeywordCall, ForLoop)
25+
ReturnSetting, TemplateArguments, TestCase, Keyword, KeywordCall, ForLoop
26+
)
1227

1328

1429
class RobotFrameworkParser(object):

0 commit comments

Comments
 (0)