Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (43)
Showing
with 410 additions and 40 deletions
stages:
- build
- lexer
- simplelexer
- generatedlexer
- descentparser
- generatedparser
- astparser
- visitors
- codegenerator
build_all:
stage: build
image: czen/ubuntu_xbuild
script:
- ./prebuild.sh
- ./build.sh
tags:
- docker
artifacts:
paths:
- ./NunitReportParser/bin/Debug/NunitReportParser.exe
- ./TestSimpleLexer/bin/Debug/TestSimpleLexer.dll
- ./TestLexer/bin/Debug/TestLexer.dll
- ./TestGeneratedLexer/bin/Debug/TestGeneratedLexer.dll
- ./TestDescentParser/bin/Debug/TestDescentParser.dll
- ./TestGeneratedParser/bin/Debug/TestGeneratedParser.dll
- ./TestASTParser/bin/Debug/TestASTParser.dll
- ./TestVisitors/bin/Debug/TestVisitors.dll
- ./TestCodeGenerator/bin/Debug/TestCodeGenerator.dll
# expire_in: 1 week
testsimplelexer:
stage: simplelexer
image: czen/ubuntu_xbuild
allow_failure: true
script:
- ./prebuild.sh
- ./build.sh
- mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestSimpleLexer/bin/Debug/TestSimpleLexer.dll || FAILED=true
- mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN}
- if [ $FAILED ]
- then false
- fi
tags:
- docker
testlexer:
stage: lexer
image: czen/ubuntu_xbuild
allow_failure: true
script:
- ./prebuild.sh
- ./build.sh
- mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestLexer/bin/Debug/TestLexer.dll || FAILED=true
- mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN}
- if [ $FAILED ]
- then false
- fi
tags:
- docker
testgeneratedlexer:
stage: generatedlexer
image: czen/ubuntu_xbuild
allow_failure: true
script:
- ./prebuild.sh
- ./build.sh
- mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestGeneratedLexer/bin/Debug/TestGeneratedLexer.dll || FAILED=true
- mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN}
- if [ $FAILED ]
- then false
- fi
tags:
- docker
testdescentparser:
stage: descentparser
image: czen/ubuntu_xbuild
allow_failure: true
script:
- ./prebuild.sh
- ./build.sh
- mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestDescentParser/bin/Debug/TestDescentParser.dll || FAILED=true
- mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN}
- if [ $FAILED ]
- then false
- fi
tags:
- docker
testgeneratedparser:
stage: generatedparser
image: czen/ubuntu_xbuild
allow_failure: true
script:
- ./prebuild.sh
- ./build.sh
- mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestGeneratedParser/bin/Debug/TestGeneratedParser.dll || FAILED=true
- mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN}
- if [ $FAILED ]
- then false
- fi
tags:
- docker
testastparser:
stage: astparser
image: czen/ubuntu_xbuild
allow_failure: true
script:
- ./prebuild.sh
- ./build.sh
- mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestASTParser/bin/Debug/TestASTParser.dll || FAILED=true
- mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN}
- if [ $FAILED ]
- then false
- fi
tags:
- docker
testvisitors:
stage: visitors
image: czen/ubuntu_xbuild
allow_failure: true
script:
- ./prebuild.sh
- ./build.sh
- mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestVisitors/bin/Debug/TestVisitors.dll || FAILED=true
- mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN}
- if [ $FAILED ]
- then false
- fi
tags:
- docker
testcodegenerator:
stage: codegenerator
image: czen/ubuntu_xbuild
allow_failure: true
script:
- ./prebuild.sh
- ./build.sh
- mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestCodeGenerator/bin/Debug/TestCodeGenerator.dll || FAILED=true
- mono NunitReportParser/bin/Debug/NunitReportParser.exe ${CI_PROJECT_DIR} ${GITLAB_USER_LOGIN}
- if [ $FAILED ]
- then false
- fi
tags:
- docker
FROM gitpod/workspace-dotnet
RUN sudo apt-get update && sudo apt install -y nuget
image:
file: .gitpod.Dockerfile
tasks:
- init: nuget restore Compilers.sln
command: echo "Nuget packages restored"
vscode:
extensions:
- patcx.vscode-nuget-gallery@0.0.20:ogiC/AHEtkvJiOuDFESvdQ==
- jsw.csharpextensions@1.3.5:IAR0yr75KBtC7ZW0lqOD3w==
- genuitecllc.codetogether@2.0.0:V/RKT60bcDRMrXqiAcuNzQ==
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"type": "shell",
"command": "xbuild",
"args": [
// Ask msbuild to generate full paths for file names.
//"/property:GenerateFullPaths=true",
//"/t:build",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
//"/consoleloggerparameters:NoSummary",
"/p:TargetFrameworkVersion=\"v4.0\""
],
"group": "build",
"presentation": {
// Reveal the output only if unrecognized errors occur.
"reveal": "silent"
},
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile"
},
{
"label": "test lexer",
"type": "shell",
"command": "mono",
"args": [
"packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe",
" --labels=All",
"TestLexer/bin/Debug/TestLexer.dll"
],
"group": "test",
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile"
},
{
"label": "test simple lexer",
"type": "shell",
"command": "mono",
"args": [
"packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe",
" --labels=All",
"TestSimpleLexer/bin/Debug/TestSimpleLexer.dll"
],
"group": "test",
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile"
},
{
"label": "test generated lexer",
"type": "shell",
"command": "mono",
"args": [
"packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe",
" --labels=All",
"TestGeneratedLexer/bin/Debug/TestGeneratedLexer.dll"
],
"group": "test",
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile"
},
{
"label": "test descent parser",
"type": "shell",
"command": "mono",
"args": [
"packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe",
" --labels=All",
"TestDescentParser/bin/Debug/TestDescentParser.dll"
],
"group": "test",
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile"
},
{
"label": "test generated parser",
"type": "shell",
"command": "mono",
"args": [
"packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe",
" --labels=All",
"TestGeneratedParser/bin/Debug/TestGeneratedParser.dll"
],
"group": "test",
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile"
},
{
"label": "test ast parser",
"type": "shell",
"command": "mono",
"args": [
"packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe",
" --labels=All",
"TestASTParser/bin/Debug/TestASTParser.dll"
],
"group": "test",
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile"
},
{
"label": "test visitors",
"type": "shell",
"command": "mono",
"args": [
"packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe",
" --labels=All",
"TestVisitors/bin/Debug/TestVisitors.dll"
],
"group": "test",
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile"
},
{
"label": "test code generator",
"type": "shell",
"command": "mono",
"args": [
"packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe",
" --labels=All",
"TestCodeGenerator/bin/Debug/TestCodeGenerator.dll"
],
"group": "test",
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile"
}
]
}
\ No newline at end of file
language: csharp
solution: Compilers.sln
mono:
- latest
- 6.4.0
install:
- sudo apt-get install nunit-console
......@@ -25,3 +25,7 @@ script:
- mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG}
- mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe --labels=ON TestCodeGenerator/bin/Debug/TestCodeGenerator.dll
- mono NunitReportParser/bin/Debug/NunitReportParser.exe ${TRAVIS_BUILD_DIR} ${TRAVIS_REPO_SLUG}
branches:
only:
- master
#FROM gitpod/workspace-dotnet
FROM ubuntu:latest
RUN apt-get update && apt install -y nuget mono-devel mono-xbuild
RUN nuget update -self
RUN mkdir /compilers
WORKDIR /compilers
\ No newline at end of file
......@@ -98,7 +98,4 @@
<ProjectExtensions>
<VisualStudio AllowExistingFolder="true" />
</ProjectExtensions>
<PropertyGroup>
<PreBuildEvent>dir</PreBuildEvent>
</PropertyGroup>
</Project>
\ No newline at end of file
</Project>
#!/bin/bash
mono ../gplex/bin/Gplex.exe /noparser SimpleLex.lex
#!/bin/bash
mono ../gplex/bin/Gplex.exe /unicode SimpleLex.lex
mono ../gppg/bin/Gppg.exe /no-lines /gplex SimpleYacc.y
#!/bin/bash
mono ../gplex/bin/Gplex.exe /unicode SimpleLex.lex
mono ../gppg/bin/Gppg.exe /no-lines /gplex SimpleYacc.y
#!/bin/bash
mono ../gplex/bin/Gplex.exe /unicode SimpleLex.lex
mono ../gppg/bin/Gppg.exe /no-lines /gplex SimpleYacc.y
#!/bin/bash
mono ../gplex/bin/Gplex.exe /unicode SimpleLex.lex
mono ../gppg/bin/Gppg.exe /no-lines /gplex SimpleYacc.y
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.CompilerServices;
......@@ -84,6 +84,10 @@ namespace NunitReport
{
configPath = basePath + @"/grades/Grades.json";
}
else
{
configPath = @"C:/work/CS311/MMCS_CS311/grades/Grades.json";
}
JObject grades = JObject.Parse(File.ReadAllText(configPath));
......@@ -138,7 +142,7 @@ namespace NunitReport
if (g.Value > 0)
{
double grade = g.Value;
grade *= 0.6;
grade *= 0.4;
System.Console.Out.WriteLine("submodule #" + g.Key.ToString() + " = " + grade.ToString());
......@@ -161,13 +165,20 @@ namespace NunitReport
basePath = args[0];
filePath = basePath + @"/TestResult.xml";
//userName = args[1].Split('/')[0];
string repoName = args[1].Split('/')[1];
userName = repoName.Substring(23, repoName.Length - 23);
var nameparts = args[1].Split('/');
string repoName = "";
if (nameparts.Length > 1) {
repoName = nameparts[1];
userName = repoName.Substring(23, repoName.Length - 23);
} else {
userName = args[1];
}
}
else
{
userName = "czen";
userName = "bostanigor";
filePath = @"./TestResult.xml";
//filePath = @"C:/work/CS311/MMCS_CS311/TestResult.xml";
}
System.Console.WriteLine("user name: " + userName);
System.Console.WriteLine("base path: " + basePath);
......
......@@ -2,9 +2,15 @@
git clone --recurse-submodules <репозиторий>
Необходимы следующие NuGet пакеты:
* NUnit
* NUnit3TestAdapter
* NUnit.ConsoleRunner
### Как запустить тесты из репозитория
[Инструкция](https://github.com/czen/MMCS_CS311/wiki/Как-запустить-тесты-из-репозитория)
[Инструкция](http://gitlab.mmcs.sfedu.ru/mmcs/Compilers/-/wikis/%D0%9A%D0%B0%D0%BA_%D0%B7%D0%B0%D0%BF%D1%83%D1%81%D1%82%D0%B8%D1%82%D1%8C_%D1%82%D0%B5%D1%81%D1%82%D1%8B_%D0%B8%D0%B7_%D1%80%D0%B5%D0%BF%D0%BE%D0%B7%D0%B8%D1%82%D0%BE%D1%80%D0%B8%D1%8F)
### Учебная карта дисциплины
......@@ -18,45 +24,48 @@ git clone --recurse-submodules <репозиторий>
[Страница курса на Moodle](http://edu.mmcs.sfedu.ru/course/view.php?id=194)
#### Скан лекций
### Авторы курса
[Скан лекций](http://it.mmcs.sfedu.ru/files?func=fileinfo&id=1937) (2008/09 уч. год)
* Лекции, практические задания - С.С. Михалкович
* дополнительные задания, подготовка и сопровождение материалов - А.П. Баглий
#### Лекции
[Наброски к лекциям](../../wiki/Наброски_к_лекциям_"Методы_построения_компиляторов" "wikilink")
[Лекции](https://drive.google.com/drive/folders/1GNQJ-3dKUgvm2moGDhBxUR06i_0gqkEm?usp=sharing)
#### Практические занятия
Тема 1. [Синтаксические диаграммы автоматных языков и реализация распознавателей на их основе](../../wiki/Синтаксические_диаграммы_автоматных_языков_и_реализация_распознавателей_на_их_основе "wikilink")
Тема 1. [Синтаксические диаграммы автоматных языков и реализация распознавателей на их основе](http://gitlab.mmcs.sfedu.ru/mmcs/Compilers/-/wikis/Синтаксические_диаграммы_автоматных_языков_и_реализация_распознавателей_на_их_основе)
Тема 2. [ Создание ручного лексического анализатора простого языка программирования](http://gitlab.mmcs.sfedu.ru/mmcs/Compilers/-/wikis/Создание_лексического_анализатора_простого_языка_программирования)
Тема 2. [ Создание ручного лексического анализатора простого языка программирования](../../wiki/Создание_лексического_анализатора_простого_языка_программирования "wikilink")
Тема 3. [Создание лексического анализатора с помощью программы GPLex](http://gitlab.mmcs.sfedu.ru/mmcs/Compilers/-/wikis/Создание_лексического_анализатора_с_помощью_программы_GPLex)
Тема 3. [Создание лексического анализатора с помощью программы GPLex](../../wiki/Создание_лексического_анализатора_с_помощью_программы_GPLex "wikilink")
Тема 4. [ Создание ручного синтаксического анализатора простого языка программирования](http://gitlab.mmcs.sfedu.ru/mmcs/Compilers/-/wikis/Создание_синтаксического_анализатора_простого_языка_программирования)
Тема 4. [ Создание ручного синтаксического анализатора простого языка программирования](../../wiki/Создание_синтаксического_анализатора_простого_языка_программирования "wikilink")
Тема 5. [Создание синтаксического анализатора с помощью программы GPPG](http://gitlab.mmcs.sfedu.ru/mmcs/Compilers/-/wikis/Создание_синтаксического_анализатора_с_помощью_программы_GPPG)
Тема 5. [Создание синтаксического анализатора с помощью программы GPPG](../../wiki/Создание_синтаксического_анализатора_с_помощью_программы_GPPG "wikilink")
Тема 6. [Семантические действия при синтаксическом разборе. Построение синтаксического дерева программы](http://gitlab.mmcs.sfedu.ru/mmcs/Compilers/-/wikisемантические_действия_при_синтаксическом_разборе._Построение_синтаксического_дерева_программы)
Тема 6. [Семантические действия при синтаксическом разборе. Построение синтаксического дерева программы](../../wiki/Семантические_действия_при_синтаксическом_разборе._Построение_синтаксического_дерева_программы "wikilink")
Тема 7. [Визиторы по синтаксическому дереву](http://gitlab.mmcs.sfedu.ru/mmcs/Compilers/-/wikis/Визиторы_по_синтаксическому_дереву)
Тема 7. [Визиторы по синтаксическому дереву](../../wiki/Визиторы_по_синтаксическому_дереву "wikilink")
Тема 8. [Генерация и выполнение IL-кода](http://gitlab.mmcs.sfedu.ru/mmcs/Compilers/-/wikis/Генерация_и_выполнение_IL-кода)
Тема 8. [Генерация и выполнение IL-кода](../../wiki/Генерация_и_выполнение_IL-кода "wikilink")
Дополнительные темы. [Индивидуальные задания](http://gitlab.mmcs.sfedu.ru/mmcs/Compilers/-/wikis/Индивидуальные_задания)
#### Устаревшие темы
Тема 1. [Конечные автоматы и реализация распознавателей на их основе](../../wiki/Конечные_автоматы_и_реализация_распознавателей_на_их_основе "wikilink")
Тема 1. [Конечные автоматы и реализация распознавателей на их основе](http://gitlab.mmcs.sfedu.ru/mmcs/Compilers/-/wikis/Конечные_автоматы_и_реализация_распознавателей_на_их_основе)
Тема 6. [Создание парсеров на основе GPLEX+GPPG](../../wiki/Создание_парсеров_на_основе_GPLEX+GPPG "wikilink")
Тема 6. [Создание парсеров на основе GPLEX+GPPG](http://gitlab.mmcs.sfedu.ru/mmcs/Compilers/-/wikis/Создание_парсеров_на_основе_GPLEX+GPPG)
Тема 7. [Семантические действия в синтаксическом анализаторе. Построение дерева программы](../../wiki/Семантические_действия_в_синтаксическом_анализаторе._Построение_дерева_программы "wikilink")
Тема 7. [Семантические действия в синтаксическом анализаторе. Построение дерева программы](http://gitlab.mmcs.sfedu.ru/mmcs/Compilers/-/wikis/Семантические_действия_в_синтаксическом_анализаторе._Построение_дерева_программы)
[Устаревшие вспомогательные материалы к теме Yacc-файл и его формат](../../wiki/Занятие_4_по_курсу_МПК "wikilink")
[Устаревшие вспомогательные материалы к теме Yacc-файл и его формат](http://gitlab.mmcs.sfedu.ru/mmcs/Compilers/-/wikis/Занятие_4_по_курсу_МПК)
[Устаревшие задания](http://pascalabc.net/wiki/index.php/GPLex_%2B_GPPG)
[ Индивидуальное задание 3 на зачет 2011 г.](../../wiki/Задания_на_зачет_2011 "wikilink")
[ Индивидуальное задание 3 на зачет 2011 г.](http://gitlab.mmcs.sfedu.ru/mmcs/Compilers/-/wikis/Задания_на_зачет_2011)
Выполнить:
......
......@@ -76,6 +76,7 @@ namespace TestASTParser
}
[TestFixture]
[Ignore("This test is disabled")]
public class WriteTests
{
......@@ -93,6 +94,7 @@ namespace TestASTParser
{
[Test]
[Ignore("This test is disabled")]
public void TestIf()
{
Assert.Fail();
......@@ -100,6 +102,7 @@ namespace TestASTParser
}
[Test]
[Ignore("This test is disabled")]
public void TestVarDef()
{
Assert.Fail();
......
......@@ -26,6 +26,7 @@ namespace TestDescentParser
}
[Test]
[Ignore("This test is disabled")]
public void TestWhile()
{
Assert.IsTrue(Parse(@"begin while 5 do a:=2 end"));
......@@ -58,7 +59,7 @@ namespace TestDescentParser
Assert.IsTrue(Parse(@"begin
for a:=1 to 5 do
begin
b:=b+1
b:=1
end
end"));
......@@ -66,14 +67,15 @@ namespace TestDescentParser
for a:=1 to 5 do
begin
for i:=1 to 6 do
c:=c-1;
b:=b+1
c:=1;
b:=1
end
end"));
}
[Test]
[Ignore("This test is disabled")]
public void TestIf()
{
Assert.IsTrue(Parse(@"begin
......@@ -99,6 +101,7 @@ namespace TestDescentParser
}
[Test]
[Ignore("This test is disabled")]
public void TestExpr()
{
Assert.IsTrue(Parse(@"begin
......
......@@ -40,6 +40,7 @@ namespace TestGeneratedLexer
}
[Test]
[Ignore("This test is disabled")]
public void TestString()
{
LexerAddon lexer = new LexerAddon(@"3 389 3 'ssfsf ' ");
......@@ -49,6 +50,7 @@ namespace TestGeneratedLexer
}
[Test]
[Ignore("This test is disabled")]
public void TestSingleLineCmt()
{
LexerAddon lexer = new LexerAddon(@"i22d1 5.6 // i 32 id3
......@@ -61,6 +63,7 @@ namespace TestGeneratedLexer
}
[Test]
[Ignore("This test is disabled")]
public void TestMultiLineCmt()
{
LexerAddon lexer = new LexerAddon(@"i22d1 5.6 { i 32 id3
......@@ -73,6 +76,7 @@ namespace TestGeneratedLexer
}
[Test]
[Ignore("This test is disabled")]
public void TestMultiLineCmtIds()
{
LexerAddon lexer = new LexerAddon(@"i22d1 5.6 { i 32 id3
......
using System;
using System;
using NUnit.Framework;
using Lexer;
......@@ -133,6 +133,7 @@ namespace TestLexer
}
[TestFixture]
[Ignore("This test is disabled")]
public class TestIntNotZeroLexer
{
[Test]
......@@ -177,6 +178,7 @@ namespace TestLexer
}
[TestFixture]
[Ignore("This test is disabled")]
public class TestLetterDigitLexer
{
......@@ -216,6 +218,7 @@ namespace TestLexer
[TestFixture]
[Ignore("This test is disabled")]
public class TestLetterListLexer
{
[Test]
......@@ -278,6 +281,7 @@ namespace TestLexer
}
[TestFixture]
[Ignore("This test is disabled")]
public class TestDigitListLexer
{
[Test]
......@@ -326,6 +330,7 @@ namespace TestLexer
}
[TestFixture]
[Ignore("This test is disabled")]
public class TestLetterDigitGroupLexer
{
[Test]
......@@ -376,28 +381,28 @@ namespace TestLexer
}
[TestFixture]
[Ignore("This test is disabled")]
public class TestDoubleLexer
{
public TestDoubleLexer()
{
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
}
[Test]
public void TestDoubleParse()
{
DoubleLexer l = new DoubleLexer("123.4");
Assert.IsTrue(l.Parse(), "Не понимает 123.4");
Assert.AreEqual(l.ParseResult, 123.4, "Неправильно прочитал 123.4");
Assert.AreEqual(123.4, l.ParseResult, 0.01, "Неправильно прочитал 123.4");
l = new DoubleLexer("123");
Assert.IsTrue(l.Parse(), "Не понимает 123");
Assert.AreEqual(l.ParseResult, 123, "Неправильно прочитал 123");
Assert.AreEqual(123, l.ParseResult, 0.01, "Неправильно прочитал 123");
l = new DoubleLexer("0.4");
Assert.IsTrue(l.Parse(), "Не понимает 0.4");
Assert.AreEqual(l.ParseResult, 0.4, "Неправильно прочитал 0.4");
l = new DoubleLexer("0.4");
Assert.IsTrue(l.Parse(), "Не понимает 0.4");
Assert.AreEqual(l.ParseResult, 0.4, "Неправильно прочитал 0.4");
Assert.AreEqual(0.4, l.ParseResult, 0.01, "Неправильно прочитал 0.4");
}
[Test]
......@@ -419,6 +424,7 @@ namespace TestLexer
}
[TestFixture]
[Ignore("This test is disabled")]
public class TestQuotedStringLexer
{
......@@ -454,6 +460,7 @@ namespace TestLexer
}
[TestFixture]
[Ignore("This test is disabled")]
public class TestCommentLexer
{
......@@ -488,6 +495,7 @@ namespace TestLexer
}
[Ignore("This test is disabled")]
[TestFixture]
public class TestIdChainLexer
{
......
......@@ -19,6 +19,7 @@ namespace TestSimpleLexer
}
[TestFixture]
[Ignore("This test is disabled")]
public class TestSimpleLexer
{
public static List< KeyValuePair<Tok, string> > getLexerOutput(Lexer l)
......@@ -55,6 +56,7 @@ namespace TestSimpleLexer
}
[TestFixture]
[Ignore("This test is disabled")]
public class TestSimpleLexerOps
{
[Test]
......@@ -124,6 +126,7 @@ namespace TestSimpleLexer
}
[TestFixture]
[Ignore("This test is disabled")]
public class TestSimpleLexerAssigns
{
[Test]
......@@ -161,6 +164,7 @@ namespace TestSimpleLexer
public class TestSimpleLexerComparisons
{
[Test]
[Ignore("This test is disabled")]
public void TestComparisons()
{
string text = @"><>>=<=+<> > <=";
......@@ -214,6 +218,7 @@ namespace TestSimpleLexer
}
[TestFixture]
[Ignore("This test is disabled")]
public class TestSimpleLexerLineCmt
{
[Test]
......@@ -275,6 +280,7 @@ namespace TestSimpleLexer
}
[TestFixture]
[Ignore("This test is disabled")]
public class TestSimpleLexerMultLineCmt
{
[Test]
......
......@@ -20,6 +20,7 @@ namespace TestVisitors
}
[TestFixture]
[Ignore("This test is disabled")]
public class TestAvgOpCount: ParserTest
{
[Test]
......@@ -71,6 +72,7 @@ namespace TestVisitors
}
[TestFixture]
[Ignore("This test is disabled")]
public class TestCommonVariable: ParserTest
{
[Test]
......@@ -95,6 +97,7 @@ namespace TestVisitors
}
[TestFixture]
[Ignore("This test is disabled")]
public class TestExprComplexity: ParserTest
{
[Test]
......@@ -199,6 +202,7 @@ namespace TestVisitors
}
[TestFixture]
[Ignore("This test is disabled")]
public class TestIfCycleNest: ParserTest
{
[Test]
......