pautlen's Issues
First test output
211
211
400
100
206
101
201
200
108
200
211
211
208
212
200
211
211
109
200
211
211
207
P2: Questions
- Which should be the error message when an identifier is not allowed
-
abcç
should be an error or an identifier (test 3) - Correct output of test 5 ??
-
int a;int b
should be OK or bad identifier? - Also:
int x=9==(ab7/2
should or should not be error?
P2: Tests
Test format
New tests should be added to the testSrc directory following the same format of the already created ones:
{ Input source code }
----------
{ Output that Flex should generate }
----------
{ Error messages that pruebaMorfo should output to stderr }
If deemed necessary, comments could be added to the tests. They should start with ten hash's "##########" and they last until the end of the line. As an example, tests 1 through 4 have a comment at the beginning indicating the main goal of the test and then an empty comment to separate the previous one from the c code.
Test execution
To run the tests, just execute make test
, which should split the tests into the appropriate files and compare the output of the code against them.
If everything works correctly, the output should resemble the following sample, in which only test 3 failed with differences both in the error output and in the actual output.
Running 5 tests
Test 1 OK
Test 2 OK
Test 3 ERROR
Differences in the errors
1c1 < ****Error en [lin 4, col 1]: simbolo no permitido (�) --- > ****Error en [lin 4, col 4]: simbolo no permitido (�)
Differences in the output
2a3 > TOK_IDENTIFICADOR 300 abc
Test 4 OK
Test 5 OK
Even though make test
already outputs the differences, during debugging, it could be useful to compare the expected output (test/salida{i}.txt
) with the output generated by the program (testOut/salida{i}.txt
), i
being the test number.
P5: Make sure check list
- vectors of size 0 not allowed
- free tables on exit
- Remove
printf
s -
Acceso a variable no declarada(%s)
without format
P5: Questions
-
Exit code not 0 if other value in eax
-
Exit -1 on error?
Si -
Lectura de parámetro permitida ?
Si -
Which error exp_identificador
{} has been declared as a {}. Use custom errors -
Arrays ??
Only index arrays if we can know the integer value at compile time or if it is a variable. Therefore arbitrary expressions are not allowed -
printf abc()
should work or nah?
Should work -
What to do returning local variables?
Return by value
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.