Skip to content
Snippets Groups Projects
Commit 2fceafcc authored by Claire GIROT--PERSON's avatar Claire GIROT--PERSON
Browse files

debut_q6.1

parent f042cf13
No related branches found
No related tags found
No related merge requests found
*** These modified files were found in JOE when it aborted on Tue Mar 8 11:29:53 2022
*** JOE was aborted because the terminal closed
*** Fichier '(Sans nom)'
/homes/c21girot/.gitconfig
*** Fichier '/homes/c21girot/.gitconfig'
eci est le fichier de configuration personnel de Git.
[user]
# Veuillez adapter et décommenter les lignes suivantes :
# name = Claire GIROT--PERSON
# email = c21girot@fl-tp-br-428.imta.fr
*** Fichier '* Startup Log *'
Traitement de '/etc/joe/editorrc'...Traitement de '/etc/joe/ftyperc'...Finished processing /etc/joe/ftyperc
Finished processing /etc/joe/editorrc
{
open Parser
open Ast
let mk_int nb =
try INT (int_of_string nb)
......@@ -23,6 +24,13 @@ rule token = parse
(* integers *)
| digit+ as nb { mk_int nb }
(* commands *)
(***** TO COMPLETE *****)
(* | "push" {Push (mkint nb)} ne se fait pas que avec ocamllex - push 12 est une phrase, push et 12 sont deux unités lexicales, wtf *)
| "pop" {Pop}
| "swap" {Swap}
| "add" {Add}
| "sub" {Sub}
| "mul" {Mul}
| "div" {Div}
| "rem" {Rem}
(* illegal characters *)
| _ as c { failwith (Printf.sprintf "Illegal character '%c': " c) }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment