Skip to content

Commit 93923d5

Browse files
Update README.md
1 parent f2d4a6c commit 93923d5

File tree

1 file changed

+36
-15
lines changed

1 file changed

+36
-15
lines changed

README.md

+36-15
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,50 @@
11

2-
<sub>** This work is being done as part of the Course Fundamentals of computer modeling **</sub>
2+
<sub>** This work is being done as part of the Course Method development translator **</sub>
33
# MethodsDevelopmentTranslator
44
<div>
55
<p>The repository has translator from C to C#, on the language C++</p>
66
<h3>Syntax Analisator</h3>
77
<p>Base file: (russian language: Vishnikov Y.M. BalabaevaI.Y. PDF):</p>
88
[](https://github.com/StrongerProgrammer7/MethodsDevelopmentTranslator/files/10741055/_.pdf)
9+
<p>
10+
<h4> 7 Classes </h4>
11+
<ul>
12+
<li>Translator (parent) </li>
13+
<li>LexicalAnalisator (inherit up, parent) </li>
14+
<li>LexicalAnalisator (inherit up, parent) </li>
15+
<li>ReversePolishNotation (inherit up, parent) </li>
16+
<li>SyntaxAnalisator (inherit up, parent) </li>
17+
<li>Translate_csharp (inherit up, parent) </li>
18+
<li>TranslatroFromCToCSharp(inherit up, parent) </li>
19+
</ul>
20+
Users should use last class. Last class using next methods:
21+
<ul>
22+
<li>lexicalAnalyze</li>
23+
<li>reversePolishNotAnalyze</li>
24+
<li>syntaxAnalyze</li>
25+
<li>translateToCSharp</li>
26+
</ul>
27+
</p>
928
<p> Using:
10-
<pre>SyntaxAnalisator analisator
11-
&emsp;marshalString(String^ textBox nameFile,std::string namefile)
29+
<pre>TranslatorFromCToCSharp translator
30+
&emsp;translator.lexicalAnalyze(fileText_C);
31+
&emsp;translator.reversePolishNotAnalyze();
32+
&emsp;In condition(if) translator.syntaxAnalyze() == true
33+
&emsp;translator.translateToCSharp();
1234
</pre>
13-
marshalString -> translate String^ -> std::string <br>
14-
textBox nameFile -> user input to text box name file<br>
15-
namefile -> record name file for program
16-
<pre> analisator.analyze(origin_file,file_save)</pre>
17-
origin_file -> include language C <br>
18-
file_save -> save Syntax analyze
35+
<p> All method save file to folder "translator_file"</p>
1936
</p>
20-
<h3>Reverse Polish Notation</h3>
21-
<p>Using:
22-
<pre>ReversePolishNotation RPN
23-
&emsp;marshalString(String^ textBox nameFile,std::string namefile)
24-
&emsp;RPN.reversePolishNotationAnalyze(file, "RPN.txt")</pre>
37+
<h3> TODO </h3>
38+
<p>
39+
Multiple inheritance is present.<br> The reason for this table decision.<br>
40+
Solution <br>
41+
1) What is, and inherit tables (identifiers, constants, etc.)<br>
42+
2) All classes will be inherited from the same class, as they should be "Translator",
43+
<br>but then you have to pass in the table constructor, and make them open or apply getters.
44+
3)Maybe using pattern "Template"
2545
</p>
26-
<p align="center"><img src="https://user-images.githubusercontent.com/71569051/220768107-19408d38-aa38-4276-893a-e7386115b499.png"></p>
46+
47+
<p align="center"><img src="https://user-images.githubusercontent.com/71569051/232427242-16bbfa23-dd7b-4844-9fc9-bade42491847.png"></p>
2748
</div>
2849
<h3>Development tools and Programming Language</h3>
2950
<p align="justify"> Microsoft Visual Studio Profession 2019</p>

0 commit comments

Comments
 (0)