We use continous integration as collaboration mode, the reason is explained here
Plese follow the following steps when adding new features
-
git checkout master
to position your self to the main branch (the master branch) -
git pull
to fetch latest commits from the default remote repository and merging them to your master branch -
git checkout -b <theme-feature>
create a new branch from the master branch, please pay attention to the branch namefor example, if your are working on
lexcial analyse of inner classes
which is part ofle langage des classes
, your checkout command could begit checkout -b classes-add-lexical-analyse-to-inner-classes
plase note that branch name should in kebab case
-
Working on new features
-
Adding corresponding test in the directory
Evaluator
, make sure you have passed all test and not making any regressions with the shell script./test
-
git commit -m <theme: feature>
your contributionsfor example, if your are working on
lexcial analyse of inner classes
which is part ofle langage des classes
, your commit message could begit commit -m "classes: add lexcial analyse to inner classes"
-
git push
to push your branch to the default remote repository -
git checkout master
to reposition your self to the main branch -
git pull
to refetch latest commits from the default remote repository and remerging them to your master branch -
git merge <theme-feature>
to merge your feature branch to the main branch -
If your have confilts, plase follow the steps here
-
git push
to push the latest main branch, then others can develop new features based on your contributions
use the following flag to compile the runnable
ocamlbuild Main.byte -yaccflag --dump
then analyse the automaton at the folder ./_build/Parsing/Parser.automaton
- one conflict on
OP_SUB
OP_INC
OP_DEC
LPAREN
IDENTIFIER
- another conflict on
ELSE
If you want to reuse an existing ocaml library. Start by installing it with opam.
For example, to use colored terminal output you use
opam install ANSITerminal
Then you must inform ocamlbuild to use the ocamlfind tool :
ocamlbuild -use-ocamlfind Main.byte -- tests/UnFichierDeTest.java
et vous devez ajouter au fichier _tags la librarie en question par exemple:
true: package(ANSITerminal)
We have two collaboration mode, namely:
- adding features step by step, also merging them step by step, this is what we called Incremental development and continuous integration respectively
- working seperately, one team member adds a series of features at one time, then merging all seprate features together right before the deadline
It becomes obvious that the second collaboration mode has several disadvantages:
- working separately means you knows a little about what others are working on. It can be dangrous when we come to the merging step.
- making a huge merging is difficult and time-consuming compared continous integration. For example, we may have declared same varibles, then we need to rename them one by one in the merging step, or, we may have written reusable block of code, then we have to eliminate the duplication in the merging step.
- Ocaml Tutorials
- Lexer and parser generators (ocamllex, ocamlyacc)
- Menhir Reference Manual
- The Java Language Specification, Second Edition
- Regular Expression 101