aboutsummaryrefslogtreecommitdiff
path: root/automata_caracteres.py
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-11-15 08:08:06 -0600
committerIván Ávalos <avalos@disroot.org>2022-11-15 08:08:06 -0600
commitc78465010691d45f5e5bfa6a36a96800d30962ac (patch)
tree93521b0c9788712823937e4c48212bc02f0b04b5 /automata_caracteres.py
parenta3097d32c66cbdff04de14481923c7464b0a8a29 (diff)
downloadjavanol-c78465010691d45f5e5bfa6a36a96800d30962ac.tar.gz
javanol-c78465010691d45f5e5bfa6a36a96800d30962ac.tar.bz2
javanol-c78465010691d45f5e5bfa6a36a96800d30962ac.zip
Se elimina código de interfaz y se reorganizan directorios
Diffstat (limited to 'automata_caracteres.py')
-rw-r--r--automata_caracteres.py51
1 files changed, 0 insertions, 51 deletions
diff --git a/automata_caracteres.py b/automata_caracteres.py
deleted file mode 100644
index 341100a..0000000
--- a/automata_caracteres.py
+++ /dev/null
@@ -1,51 +0,0 @@
-class automata_car:
- stateN = 0
-
-
- def isAccepted(self, _str):
- i = len(_str)
- _len = len(_str)
-
- for i in range(len):
- if self.stateN == 0:
- self.start(_str[i])
- if self.stateN == 1:
- self.state1(_str[i])
- if self.stateN == 2:
- self.state2(_str[i])
- if self.stateN == 3:
- self.state3(_str[i])
- else:
- return 0
- if self.stateN == 3:
- return 1
- else:
- return 0
-
- def start(self,c):
- if (c == '\''):
- self.stateN = 1
- else:
- self.stateN = -1
-
- def state1(self,c):
- if (c != '\''):
- self.stateN = 2
- else:
- self.stateN = 3
-
- def state2(self,c):
- if (c == '\''):
- self.stateN = 3
- else:
- self.stateN = -1
-
- def state3(self,c):
- self.stateN = -1
-
- def verified(self,token){
- if isAccepted(token):
- return true
- else:
- return false
- }