summaryrefslogtreecommitdiff
path: root/tests/lexers/ezhil
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2021-01-18 21:24:00 +0100
committerGeorg Brandl <georg@python.org>2021-01-18 22:08:36 +0100
commit2a3d3a7d5b9c60dedf6638d876161d9563faebcf (patch)
tree809c0b4a686db98f5954afa1944404cd9652c6b2 /tests/lexers/ezhil
parentf0445be718da83541ea3401aad882f3937147263 (diff)
downloadpygments-git-examplefiles.tar.gz
Move test_examplefiles to new tests/lexers scheme.examplefiles
Diffstat (limited to 'tests/lexers/ezhil')
-rw-r--r--tests/lexers/ezhil/example.txt884
1 files changed, 884 insertions, 0 deletions
diff --git a/tests/lexers/ezhil/example.txt b/tests/lexers/ezhil/example.txt
new file mode 100644
index 00000000..970b695c
--- /dev/null
+++ b/tests/lexers/ezhil/example.txt
@@ -0,0 +1,884 @@
+---input---
+# (C) முத்தையா அண்ணாமலை 2013
+# (A) என். சொக்கன்
+# எழில் தமிழ் நிரலாக்க மொழி உதாரணம்
+# Muthu A granted permission for this to be included under the BSD license
+# https://bitbucket.org/birkenfeld/pygments-main/pull-requests/443/ezhil-language-lexer-for-pygments/diff
+
+## Prime Factors Example
+## பகா எண் கூறுகளைக் கண்டறியும் உதாரணம்
+
+## இது நிரல் தரப்பட்ட எண்ணின் பகாஎண் கூறுகளைக் கண்டறியும்
+
+நிரல்பாகம் பகாஎண்ணா(எண்1)
+
+ ## இது நிரல்பாகம் தரப்பட்ட எண் பகு எண்ணா அல்லது பகா எண்ணா என்று கண்டறிந்து சொல்லும்
+ ## பகுஎண் என்றால் 0 திரும்பத் தரப்படும்
+ ## பகாஎண் என்றால் 1 திரும்பத் தரப்படும்
+
+ @(எண்1 < 0) ஆனால்
+
+ ## எதிர்மறை எண்களை நேராக்குதல்
+
+ எண்1 = எண்1 * (-1)
+
+ முடி
+
+ @(எண்1 < 2) ஆனால்
+
+ ## பூஜ்ஜியம், ஒன்று ஆகியவை பகா எண்கள் அல்ல
+
+ பின்கொடு 0
+
+ முடி
+
+ @(எண்1 == 2) ஆனால்
+
+ ## இரண்டு என்ற எண் ஒரு பகா எண்
+
+ பின்கொடு 1
+
+ முடி
+
+ மீதம் = எண்1%2
+
+ @(மீதம் == 0) ஆனால்
+
+ ## இரட்டைப்படை எண், ஆகவே, இது பகா எண் அல்ல
+
+ பின்கொடு 0
+
+ முடி
+
+ எண்1வர்க்கமூலம் = எண்1^0.5
+
+ @(எண்2 = 3, எண்2 <= எண்1வர்க்கமூலம், எண்2 = எண்2 + 2) ஆக
+
+ மீதம்1 = எண்1%எண்2
+
+ @(மீதம்1 == 0) ஆனால்
+
+ ## ஏதேனும் ஓர் எண்ணால் முழுமையாக வகுபட்டுவிட்டது, ஆகவே அது பகா எண் அல்ல
+
+ பின்கொடு 0
+
+ முடி
+
+ முடி
+
+ பின்கொடு 1
+
+முடி
+
+நிரல்பாகம் பகுத்தெடு(எண்1)
+
+ ## இது எண் தரப்பட்ட எண்ணின் பகா எண் கூறுகளைக் கண்டறிந்து பட்டியல் இடும்
+
+ கூறுகள் = பட்டியல்()
+
+ @(எண்1 < 0) ஆனால்
+
+ ## எதிர்மறை எண்களை நேராக்குதல்
+
+ எண்1 = எண்1 * (-1)
+
+ முடி
+
+ @(எண்1 <= 1) ஆனால்
+
+ ## ஒன்று அல்லது அதற்குக் குறைவான எண்களுக்குப் பகா எண் விகிதம் கண்டறியமுடியாது
+
+ பின்கொடு கூறுகள்
+
+ முடி
+
+ @(பகாஎண்ணா(எண்1) == 1) ஆனால்
+
+ ## தரப்பட்ட எண்ணே பகா எண்ணாக அமைந்துவிட்டால், அதற்கு அதுவே பகாஎண் கூறு ஆகும்
+
+ பின்இணை(கூறுகள், எண்1)
+ பின்கொடு கூறுகள்
+
+ முடி
+
+ தாற்காலிகஎண் = எண்1
+
+ எண்2 = 2
+
+ @(எண்2 <= தாற்காலிகஎண்) வரை
+
+ விடை1 = பகாஎண்ணா(எண்2)
+ மீண்டும்தொடங்கு = 0
+
+ @(விடை1 == 1) ஆனால்
+
+ விடை2 = தாற்காலிகஎண்%எண்2
+
+ @(விடை2 == 0) ஆனால்
+
+ ## பகா எண்ணால் முழுமையாக வகுபட்டுள்ளது, அதனைப் பட்டியலில் இணைக்கிறோம்
+
+ பின்இணை(கூறுகள், எண்2)
+ தாற்காலிகஎண் = தாற்காலிகஎண்/எண்2
+
+ ## மீண்டும் இரண்டில் தொடங்கி இதே கணக்கிடுதலைத் தொடரவேண்டும்
+
+ எண்2 = 2
+ மீண்டும்தொடங்கு = 1
+
+ முடி
+
+ முடி
+
+ @(மீண்டும்தொடங்கு == 0) ஆனால்
+
+ ## அடுத்த எண்ணைத் தேர்ந்தெடுத்துக் கணக்கிடுதலைத் தொடரவேண்டும்
+
+ எண்2 = எண்2 + 1
+
+ முடி
+
+ முடி
+
+ பின்கொடு கூறுகள்
+
+முடி
+
+அ = int(உள்ளீடு("உங்களுக்குப் பிடித்த ஓர் எண்ணைத் தாருங்கள்: "))
+
+பகாஎண்கூறுகள் = பட்டியல்()
+
+பகாஎண்கூறுகள் = பகுத்தெடு(அ)
+
+பதிப்பி "நீங்கள் தந்த எண்ணின் பகா எண் கூறுகள் இவை: ", பகாஎண்கூறுகள்
+
+---tokens---
+'# (C) முத்தையா அண்ணாமலை 2013\n' Comment.Single
+
+'# (A) என். சொக்கன்\n' Comment.Single
+
+'# எழில் தமிழ் நிரலாக்க மொழி உதாரணம்\n' Comment.Single
+
+'# Muthu A granted permission for this to be included under the BSD license\n' Comment.Single
+
+'# https://bitbucket.org/birkenfeld/pygments-main/pull-requests/443/ezhil-language-lexer-for-pygments/diff\n' Comment.Single
+
+'\n' Text
+
+'## Prime Factors Example\n' Comment.Single
+
+'## பகா எண் கூறுகளைக் கண்டறியும் உதாரணம்\n' Comment.Single
+
+'\n' Text
+
+'## இது நிரல் தரப்பட்ட எண்ணின் பகாஎண் கூறுகளைக் கண்டறியும்\n' Comment.Single
+
+'\n' Text
+
+'நிரல்பாகம்' Keyword
+' ' Text
+'பகாஎண்ணா' Name
+'(' Punctuation
+'எண்1' Name
+')' Punctuation
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'## இது நிரல்பாகம் தரப்பட்ட எண் பகு எண்ணா அல்லது பகா எண்ணா என்று கண்டறிந்து சொல்லும்\n' Comment.Single
+
+' ' Text
+'## பகுஎண் என்றால் 0 திரும்பத் தரப்படும்\n' Comment.Single
+
+' ' Text
+'## பகாஎண் என்றால் 1 திரும்பத் தரப்படும்\n' Comment.Single
+
+'\n' Text
+
+' ' Text
+'@' Operator
+'(' Punctuation
+'எண்1' Name
+' ' Text
+'<' Operator
+' ' Text
+'0' Literal.Number.Integer
+')' Punctuation
+' ' Text
+'ஆனால்' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'## எதிர்மறை எண்களை நேராக்குதல்\n' Comment.Single
+
+'\n' Text
+
+' ' Text
+'எண்1' Name
+' ' Text
+'=' Operator
+' ' Text
+'எண்1' Name
+' ' Text
+'*' Operator
+' ' Text
+'(' Punctuation
+'-' Operator
+'1' Literal.Number.Integer
+')' Punctuation
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'முடி' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'@' Operator
+'(' Punctuation
+'எண்1' Name
+' ' Text
+'<' Operator
+' ' Text
+'2' Literal.Number.Integer
+')' Punctuation
+' ' Text
+'ஆனால்' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'## பூஜ்ஜியம், ஒன்று ஆகியவை பகா எண்கள் அல்ல\n' Comment.Single
+
+'\n' Text
+
+' ' Text
+'பின்கொடு' Keyword
+' ' Text
+'0' Literal.Number.Integer
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'முடி' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'@' Operator
+'(' Punctuation
+'எண்1' Name
+' ' Text
+'==' Operator
+' ' Text
+'2' Literal.Number.Integer
+')' Punctuation
+' ' Text
+'ஆனால்' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'## இரண்டு என்ற எண் ஒரு பகா எண்\n' Comment.Single
+
+'\n' Text
+
+' ' Text
+'பின்கொடு' Keyword
+' ' Text
+'1' Literal.Number.Integer
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'முடி' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'மீதம்' Name
+' ' Text
+'=' Operator
+' ' Text
+'எண்1' Name
+'%' Operator
+'2' Literal.Number.Integer
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'@' Operator
+'(' Punctuation
+'மீதம்' Name
+' ' Text
+'==' Operator
+' ' Text
+'0' Literal.Number.Integer
+')' Punctuation
+' ' Text
+'ஆனால்' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'## இரட்டைப்படை எண், ஆகவே, இது பகா எண் அல்ல\n' Comment.Single
+
+'\n' Text
+
+' ' Text
+'பின்கொடு' Keyword
+' ' Text
+'0' Literal.Number.Integer
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'முடி' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'எண்1வர்க்கமூலம்' Name
+' ' Text
+'=' Operator
+' ' Text
+'எண்1' Name
+'^' Operator
+'0.5' Literal.Number.Float
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'@' Operator
+'(' Punctuation
+'எண்2' Name
+' ' Text
+'=' Operator
+' ' Text
+'3' Literal.Number.Integer
+',' Operator
+' ' Text
+'எண்2' Name
+' ' Text
+'<=' Operator
+' ' Text
+'எண்1வர்க்கமூலம்' Name
+',' Operator
+' ' Text
+'எண்2' Name
+' ' Text
+'=' Operator
+' ' Text
+'எண்2' Name
+' ' Text
+'+' Operator
+' ' Text
+'2' Literal.Number.Integer
+')' Punctuation
+' ' Text
+'ஆக' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'மீதம்1' Name
+' ' Text
+'=' Operator
+' ' Text
+'எண்1' Name
+'%' Operator
+'எண்2' Name
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'@' Operator
+'(' Punctuation
+'மீதம்1' Name
+' ' Text
+'==' Operator
+' ' Text
+'0' Literal.Number.Integer
+')' Punctuation
+' ' Text
+'ஆனால்' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'## ஏதேனும் ஓர் எண்ணால் முழுமையாக வகுபட்டுவிட்டது, ஆகவே அது பகா எண் அல்ல\n' Comment.Single
+
+'\n' Text
+
+' ' Text
+'பின்கொடு' Keyword
+' ' Text
+'0' Literal.Number.Integer
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'முடி' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'முடி' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'பின்கொடு' Keyword
+' ' Text
+'1' Literal.Number.Integer
+'\n' Text
+
+'\n' Text
+
+'முடி' Keyword
+'\n' Text
+
+'\n' Text
+
+'நிரல்பாகம்' Keyword
+' ' Text
+'பகுத்தெடு' Name
+'(' Punctuation
+'எண்1' Name
+')' Punctuation
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'## இது எண் தரப்பட்ட எண்ணின் பகா எண் கூறுகளைக் கண்டறிந்து பட்டியல் இடும்\n' Comment.Single
+
+'\n' Text
+
+' ' Text
+'கூறுகள்' Name
+' ' Text
+'=' Operator
+' ' Text
+'பட்டியல்' Name
+'(' Punctuation
+')' Punctuation
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'@' Operator
+'(' Punctuation
+'எண்1' Name
+' ' Text
+'<' Operator
+' ' Text
+'0' Literal.Number.Integer
+')' Punctuation
+' ' Text
+'ஆனால்' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'## எதிர்மறை எண்களை நேராக்குதல்\n' Comment.Single
+
+'\n' Text
+
+' ' Text
+'எண்1' Name
+' ' Text
+'=' Operator
+' ' Text
+'எண்1' Name
+' ' Text
+'*' Operator
+' ' Text
+'(' Punctuation
+'-' Operator
+'1' Literal.Number.Integer
+')' Punctuation
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'முடி' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'@' Operator
+'(' Punctuation
+'எண்1' Name
+' ' Text
+'<=' Operator
+' ' Text
+'1' Literal.Number.Integer
+')' Punctuation
+' ' Text
+'ஆனால்' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'## ஒன்று அல்லது அதற்குக் குறைவான எண்களுக்குப் பகா எண் விகிதம் கண்டறியமுடியாது\n' Comment.Single
+
+'\n' Text
+
+' ' Text
+'பின்கொடு' Keyword
+' ' Text
+'கூறுகள்' Name
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'முடி' Keyword
+'\n' Text
+
+' ' Text
+'\n' Text
+
+' ' Text
+'@' Operator
+'(' Punctuation
+'பகாஎண்ணா' Name
+'(' Punctuation
+'எண்1' Name
+')' Punctuation
+' ' Text
+'==' Operator
+' ' Text
+'1' Literal.Number.Integer
+')' Punctuation
+' ' Text
+'ஆனால்' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'## தரப்பட்ட எண்ணே பகா எண்ணாக அமைந்துவிட்டால், அதற்கு அதுவே பகாஎண் கூறு ஆகும்\n' Comment.Single
+
+'\n' Text
+
+' ' Text
+'பின்இணை' Name
+'(' Punctuation
+'கூறுகள்' Name
+',' Operator
+' ' Text
+'எண்1' Name
+')' Punctuation
+'\n' Text
+
+' ' Text
+'பின்கொடு' Keyword
+' ' Text
+'கூறுகள்' Name
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'முடி' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'தாற்காலிகஎண்' Name
+' ' Text
+'=' Operator
+' ' Text
+'எண்1' Name
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'எண்2' Name
+' ' Text
+'=' Operator
+' ' Text
+'2' Literal.Number.Integer
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'@' Operator
+'(' Punctuation
+'எண்2' Name
+' ' Text
+'<=' Operator
+' ' Text
+'தாற்காலிகஎண்' Name
+')' Punctuation
+' ' Text
+'வரை' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'விடை1' Name
+' ' Text
+'=' Operator
+' ' Text
+'பகாஎண்ணா' Name
+'(' Punctuation
+'எண்2' Name
+')' Punctuation
+'\n' Text
+
+' ' Text
+'மீண்டும்தொடங்கு' Name
+' ' Text
+'=' Operator
+' ' Text
+'0' Literal.Number.Integer
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'@' Operator
+'(' Punctuation
+'விடை1' Name
+' ' Text
+'==' Operator
+' ' Text
+'1' Literal.Number.Integer
+')' Punctuation
+' ' Text
+'ஆனால்' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'விடை2' Name
+' ' Text
+'=' Operator
+' ' Text
+'தாற்காலிகஎண்' Name
+'%' Operator
+'எண்2' Name
+'\n' Text
+
+' ' Text
+'\n' Text
+
+' ' Text
+'@' Operator
+'(' Punctuation
+'விடை2' Name
+' ' Text
+'==' Operator
+' ' Text
+'0' Literal.Number.Integer
+')' Punctuation
+' ' Text
+'ஆனால்' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'## பகா எண்ணால் முழுமையாக வகுபட்டுள்ளது, அதனைப் பட்டியலில் இணைக்கிறோம்\n' Comment.Single
+
+'\n' Text
+
+' ' Text
+'பின்இணை' Name
+'(' Punctuation
+'கூறுகள்' Name
+',' Operator
+' ' Text
+'எண்2' Name
+')' Punctuation
+'\n' Text
+
+' ' Text
+'தாற்காலிகஎண்' Name
+' ' Text
+'=' Operator
+' ' Text
+'தாற்காலிகஎண்' Name
+'/' Operator
+'எண்2' Name
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'## மீண்டும் இரண்டில் தொடங்கி இதே கணக்கிடுதலைத் தொடரவேண்டும்\n' Comment.Single
+
+'\n' Text
+
+' ' Text
+'எண்2' Name
+' ' Text
+'=' Operator
+' ' Text
+'2' Literal.Number.Integer
+'\n' Text
+
+' ' Text
+'மீண்டும்தொடங்கு' Name
+' ' Text
+'=' Operator
+' ' Text
+'1' Literal.Number.Integer
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'முடி' Keyword
+'\n' Text
+
+' ' Text
+'\n' Text
+
+' ' Text
+'முடி' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'@' Operator
+'(' Punctuation
+'மீண்டும்தொடங்கு' Name
+' ' Text
+'==' Operator
+' ' Text
+'0' Literal.Number.Integer
+')' Punctuation
+' ' Text
+'ஆனால்' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'## அடுத்த எண்ணைத் தேர்ந்தெடுத்துக் கணக்கிடுதலைத் தொடரவேண்டும்\n' Comment.Single
+
+'\n' Text
+
+' ' Text
+'எண்2' Name
+' ' Text
+'=' Operator
+' ' Text
+'எண்2' Name
+' ' Text
+'+' Operator
+' ' Text
+'1' Literal.Number.Integer
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'முடி' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'முடி' Keyword
+'\n' Text
+
+'\n' Text
+
+' ' Text
+'பின்கொடு' Keyword
+' ' Text
+'கூறுகள்' Name
+'\n' Text
+
+'\n' Text
+
+'முடி' Keyword
+'\n' Text
+
+'\n' Text
+
+'அ' Name
+' ' Text
+'=' Operator
+' ' Text
+'int' Name
+'(' Punctuation
+'உள்ளீடு' Name
+'(' Punctuation
+'"உங்களுக்குப் பிடித்த ஓர் எண்ணைத் தாருங்கள்: "' Literal.String
+')' Punctuation
+')' Punctuation
+'\n' Text
+
+'\n' Text
+
+'பகாஎண்கூறுகள்' Name
+' ' Text
+'=' Operator
+' ' Text
+'பட்டியல்' Name
+'(' Punctuation
+')' Punctuation
+'\n' Text
+
+'\n' Text
+
+'பகாஎண்கூறுகள்' Name
+' ' Text
+'=' Operator
+' ' Text
+'பகுத்தெடு' Name
+'(' Punctuation
+'அ' Name
+')' Punctuation
+'\n' Text
+
+'\n' Text
+
+'பதிப்பி' Keyword
+' ' Text
+'"நீங்கள் தந்த எண்ணின் பகா எண் கூறுகள் இவை: "' Literal.String
+',' Operator
+' ' Text
+'பகாஎண்கூறுகள்' Name
+' ' Text
+'\n' Text