Skip to content

Commit

Permalink
Merge 1.4.2 ply changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexeh committed Nov 17, 2023
1 parent e2efeff commit fbe7743
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 328 deletions.
8 changes: 4 additions & 4 deletions src/joystick_diagrams/adaptors/dcs_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import logging
from shutil import ExecError
from ply import lex, yacc
import joystick_diagrams.adaptors.dcs_world_lex # pylint: disable=unused-import
import joystick_diagrams.adaptors.dcs_world_parse # pylint: disable=unused-import
#import joystick_diagrams.adaptors.dcs_world_lex # pylint: disable=unused-import
#import joystick_diagrams.adaptors.dcs_world_parse # pylint: disable=unused-import
import joystick_diagrams.adaptors.joystick_diagram_interface as jdi

_logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -202,7 +202,7 @@ def t_NUMBER(t): # pylint: disable=invalid-name
return t

def t_STRING(t): # pylint: disable=invalid-name
r"\"[\w|\/|\(|\)|\-|\:|\+|\,|\&|\.|\'|\s]+\" "
r"\"[\w|\/|\(|\)|\-|\:|\+|\,|\&|\.|\'|\<|\>|\s]+\" "
t.value = t.value[1:-1]
return t

Expand Down Expand Up @@ -267,7 +267,7 @@ def p_error(t): # pylint: disable=invalid-name
)

# Build the parser
parser = yacc.yacc(debug=False, optimize=1, tabmodule="dcs_world_parse")
parser = yacc.yacc(debug=False, optimize=1, tabmodule="dcs_world_yacc")

# Parse the data
try:
Expand Down
53 changes: 8 additions & 45 deletions src/joystick_diagrams/adaptors/dcs_world_lex.py
Original file line number Diff line number Diff line change
@@ -1,47 +1,10 @@
# dcs_world_lex.py. This file automatically created by PLY (version 3.11). Don't edit!
_tabversion = "3.10"
_lextokens = set(
(
"COMMA",
"DOUBLE_VAL",
"EQUALS",
"FALSE",
"LBRACE",
"LCURLY",
"NUMBER",
"RBRACE",
"RCURLY",
"STRING",
"TRUE",
)
)
_lexreflags = 96
_lexliterals = ""
_lexstateinfo = {"INITIAL": "inclusive"}
_lexstatere = {
"INITIAL": [
(
'(?P<t_DOUBLE_VAL>(\\+|\\-)?[0-9]+\\.[0-9]+)|(?P<t_NUMBER>[0-9]+)|(?P<t_STRING>\\"[\\w|\\/|\\(|\\)|\\-|\\:|\\+|\\,|\\&|\\.|\\\'|\\s]+\\")|(?P<t_TRUE>(true))|(?P<t_FALSE>(false))|(?P<t_LCURLY>\\{)|(?P<t_RCURLY>\\})|(?P<t_LBRACE>\\[)|(?P<t_RBRACE>\\])|(?P<t_COMMA>\\,)|(?P<t_EQUALS>\\=)',
[
None,
("t_DOUBLE_VAL", "DOUBLE_VAL"),
None,
("t_NUMBER", "NUMBER"),
("t_STRING", "STRING"),
("t_TRUE", "TRUE"),
None,
("t_FALSE", "FALSE"),
None,
(None, "LCURLY"),
(None, "RCURLY"),
(None, "LBRACE"),
(None, "RBRACE"),
(None, "COMMA"),
(None, "EQUALS"),
],
)
]
}
_lexstateignore = {"INITIAL": " \t\n"}
_lexstateerrorf = {"INITIAL": "t_error"}
_tabversion = '3.10'
_lextokens = set(('COMMA', 'DOUBLE_VAL', 'EQUALS', 'FALSE', 'LBRACE', 'LCURLY', 'NUMBER', 'RBRACE', 'RCURLY', 'STRING', 'TRUE'))
_lexreflags = 96
_lexliterals = ''
_lexstateinfo = {'INITIAL': 'inclusive'}
_lexstatere = {'INITIAL': [('(?P<t_DOUBLE_VAL>(\\+|\\-)?[0-9]+\\.[0-9]+)|(?P<t_NUMBER>[0-9]+)|(?P<t_STRING>\\"[\\w|\\/|\\(|\\)|\\-|\\:|\\+|\\,|\\&|\\.|\\\'|\\<|\\>|\\s]+\\" )|(?P<t_TRUE>(true))|(?P<t_FALSE>(false))|(?P<t_LCURLY>\\{)|(?P<t_RCURLY>\\})|(?P<t_LBRACE>\\[)|(?P<t_RBRACE>\\])|(?P<t_COMMA>\\,)|(?P<t_EQUALS>\\=)', [None, ('t_DOUBLE_VAL', 'DOUBLE_VAL'), None, ('t_NUMBER', 'NUMBER'), ('t_STRING', 'STRING'), ('t_TRUE', 'TRUE'), None, ('t_FALSE', 'FALSE'), None, (None, 'LCURLY'), (None, 'RCURLY'), (None, 'LBRACE'), (None, 'RBRACE'), (None, 'COMMA'), (None, 'EQUALS')])]}
_lexstateignore = {'INITIAL': ' \t\n'}
_lexstateerrorf = {'INITIAL': 't_error'}
_lexstateeoff = {}
279 changes: 0 additions & 279 deletions src/joystick_diagrams/adaptors/dcs_world_parse.py

This file was deleted.

Loading

0 comments on commit fbe7743

Please sign in to comment.