计算机科学形式语言课程中的正则表达式
Regular Expressions in a CS Formal Languages Course
AI总结:
本文提出在自动机理论与形式语言课程中用基于编程的方法讲授正则表达式,借助内置正则表达式类型的 FSM 语言,将正则表达式视为可编程的单词生成算法,以激发学生兴趣并促进相关算法学习。
摘要:
在自动机理论与形式语言课程中,正则表达式大多被当作一个纯理论主题来对待。也就是说,课程在某种程度上讨论它们的数学性质以及它们在描述语言方面的作用。这种方法未能吸引大多数计算机科学学生的兴趣。这错失了一个让计算机科学学生参与进来的机会,因为他们更受理论的实际应用所激励。为此,正则表达式可以被讨论为一种生成语言中单词的算法的描述,而这种算法很容易编程实现。本文描述了一种基于编程的方法论,用于在自动机理论与形式语言课程中向学生介绍正则表达式。教学语言是 FSM,其中内置了正则表达式类型。因此,这有助于研究正则表达式以及基于正则表达式的算法。
英文摘要:
Regular expressions in an Automata Theory and Formal Languages course are mostly treated as a theoretical topic. That is, to some degree their mathematical properties and their role to describe languages is discussed. This approach fails to capture the interest of most Computer Science students. It is a missed opportunity to engage Computer Science students that are far more motivated by practical applications of theory. To this end, regular expressions may be discussed as the description of an algorithm to generate words in a language that is easily programmed. This article describes a programming-based methodology to introduce students to regular expressions in an Automata Theory and Formal Languages course. The language of instruction is FSM in which there is a regular expression type. Thus, facilitating the study of regular expressions and of algorithms based on regular expressions.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。