Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(left.Length == 1) {
- if (left.ToCharArray()[0] >= 65 && left.ToCharArray()[0] <= 90) {
- // regular
- if (right.Length == 2) {
- if (right.ToCharArray()[0] >= 97 && right.ToCharArray()[0] <= 122 && right.ToCharArray()[1] >= 65 && right.ToCharArray()[1] <= 90) {
- type.Add("Regular");
- }
- else {
- if (right.ToCharArray()[1] >= 97 && right.ToCharArray()[1] <= 122 && right.ToCharArray()[0] >= 65 && right.ToCharArray()[0] <= 90) {
- type.Add("Regular");
- }
- else {
- type.Add("Libre de contexto");
- }
- }
- }
- else {
- if (right.Length == 1) {
- if (right.ToCharArray()[0] >= 97 && right.ToCharArray()[0] <= 122) {
- type.Add("Regular");
- }
- else {
- type.Add("Libre de contexto");
- }
- }
- else {
- type.Add("Libre de contexto");
- }
- }
- }
- else {
- type.Add("Error");
- }
- }
- else {
- bool valid = false;
- foreach (char letter in left.ToCharArray()) {
- if (letter >= 65 && letter <= 90) {
- valid = true;
- }
- }
- if (valid) {
- if (left.Length <= right.Length) {
- type.Add("Sensitiva al contexto");
- }
- else {
- type.Add("Irrestricta");
- }
- }
- else {
- type.Add("Error");
- }
- }
- }
- else {
- type.Add("Error");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement