Podudaranje paterna
U računarskoj nauci, podudaranje paterna je čin provere datog niza tokena za prisustvo sastojaka nekog paterna. Za razliku od prepoznavanja paterna, podudaranje obično mora biti precizno: „ili će biti ili neće biti podudaranja“. Paterni uglavnom imaju oblik sekvenci ili struktura stabla. Upotrebe podudaranja paterna uključuju ispisivanje lokacija (ako ih ima) paterna unutar sekvence tokena, da bi se prikazala neka komponenta podudarnog paterna i zamena odgovarajućeg paterna nekom drugom sekvencom tokena (tj. pretraga i zamena[1][2][3]).
Paterni niza (npr. tekstualni niz) se često opisuju pomoću regularnih izraza i uparuju pomoću tehnika kao što je bektreking.
Paterni stabla se koriste u nekim programskim jezicima kao opšte sredstvo za obradu podataka na osnovu njihove strukture, npr. C#,[4] F#,[5] Haskel,[6] ML, Piton,[7] Rubi,[8] Rust,[9] Skala,[10] Svift[11] i simbolički matematički jezik Matematika imaju posebnu sintaksu za izražavanje paterna stabla i jezičku konstrukciju za uslovno izvršenje i pronalaženje vrednosti na osnovu toga.
Reference
[уреди | уреди извор]- ^ Goyvaerts, Jan. „Regular Expression Tutorial - Learn How to Use Regular Expressions”. Regular-Expressions.info. Архивирано из оригинала 2016-11-01. г. Приступљено 2016-10-31.
- ^ Mitkov, Ruslan (2003). The Oxford Handbook of Computational Linguistics. Oxford University Press. стр. 754. ISBN 978-0-19-927634-9. Архивирано из оригинала 2017-02-28. г. Приступљено 2016-07-25.
- ^ Lawson, Mark V. (17. 9. 2003). Finite Automata. CRC Press. стр. 98—100. ISBN 978-1-58488-255-8. Архивирано из оригинала 27. 2. 2017. г. Приступљено 25. 7. 2016.
- ^ „Pattern Matching - C# Guide”.
- ^ „Pattern Matching - F# Guide”.
- ^ A Gentle Introduction to Haskell: Patterns
- ^ „What's New In Python 3.10 — Python 3.10.0b3 documentation”. docs.python.org. Приступљено 2021-07-06.
- ^ „pattern_matching - Documentation for Ruby 3.0.0”. docs.ruby-lang.org. Приступљено 2021-07-06.
- ^ „Pattern Syntax - The Rust Programming Language”.
- ^ „Pattern Matching”. Scala Documentation. Приступљено 2021-01-17.
- ^ „Patterns — The Swift Programming Language (Swift 5.1)”.
Literatura
[уреди | уреди извор]- The Mathematica Book, chapter Section 2.3: Patterns
- The Haskell 98 Report, chapter 3.17 Pattern Matching.
- Python Reference Manual, chapter 6.3 Assignment statements.
- The Pure Programming Language, chapter 4.3: Patterns
- Christopher Alexander, Sara Ishikawa, Murray Silverstein (1974). 'A Collection of Patterns which Generate Multi-Service Centres' in Declan and Margrit Kennedy (eds.): The Inner City. Architects Year Book 14, Elek, London. ISBN 0 236 15431 1.
- Alexander, C (1977). A Pattern Language: Towns, Buildings, Construction. USA: Oxford University Press. ISBN 978-0-19-501919-3..
- Alexander, C (1979). The Timeless Way of Building. USA: Oxford University Press. ISBN 978-0-19-502402-9..
- Schuler, D (2008). Liberating Voices: A Pattern Language for Communication Revolution. USA: MIT Press. ISBN 978-0-262-69366-0..
- Leitner, Helmut (2015): Pattern Theory: Introduction and Perspectives on the Tracks of Christopher Alexander. ISBN 1505637430.
- Fincher, Sally (септембар 1999). „Analysis of design: an exploration of patterns and pattern languages for pedagogy”. Journal of Computers in Mathematics and Science Teaching. 18 (3): 331—348.
- Cloutier, Robert J.; Verma, Dinesh (јун 2007). „Applying the concept of patterns to systems architecture”. Systems Engineering. 10 (2): 138—154. S2CID 16218191. doi:10.1002/sys.20066.
- Cloutier, Robert J.; Muller, Gerrit; Verma, Dinesh; Nilchiani, Roshanak; Hole, Eirik; Bone, Mary (март 2010). „The concept of reference architectures”. Systems Engineering. 13 (1): 14—27. S2CID 10835558. doi:10.1002/sys.20129.
- „Liberating Voices Pattern Language”. publicsphereproject.org. Приступљено 6. 3. 2017.
- „Group Pattern Language Project”. groupworksdeck.org. Приступљено 6. 3. 2017.
- Jacke, Dave; Toensmeier, Eric (2005). „A Forest Garden Pattern Language”. Edible Forest Gardens, Volume II: Ecological Design And Practice for Temperate-Climate Permaculture. White River Junction, VT: Chelsea Green Publishing. стр. 63—139. ISBN 1-931498-80-6.
- Cunningham, Ward; Mehaffy, Michael W. (2013). „Wiki as pattern language”. Proceedings of the 20th Conference on Pattern Languages of Programs, October 23–26, 2013, Monticello, Illinois. PLoP '13. Corryton, TN: The Hillside Group. стр. 32:1—32:14. ISBN 9781941652008.
Spoljašnje veze
[уреди | уреди извор]- Views: An Extension to Haskell Pattern Matching
- Nikolaas N. Oosterhof, Philip K. F. Hölzenspies, and Jan Kuper. Application patterns. A presentation at Trends in Functional Programming, 2005
- JMatch: the Java language extended with pattern matching
- ShowTrend: Online pattern matching for stock prices
- An incomplete history of the QED Text Editor by Dennis Ritchie - provides the history of regular expressions in computer programs
- The Implementation of Functional Programming Languages, pages 53–103 Simon Peyton Jones, published by Prentice Hall, 1987.
- Nemerle, pattern matching.
- Erlang, pattern matching.
- Prop: a C++ based pattern matching language, 1999
- PatMat: a C++ pattern matching library based on SNOBOL/SPITBOL
- Temur Kutsia. Flat Matching. Journal of Symbolic Computation 43(12): 858–873. Describes in details flat matching in Mathematica.
- EasyPattern language pattern matching language for non-programmers